Unverified Commit 9b400874 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9332 net/sched: taprio: always validate TCA_TAPRIO_ATTR_PRIOMAP

parents 7a9d968b eec73289
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -1186,16 +1186,13 @@ static int taprio_parse_mqprio_opt(struct net_device *dev,
{
	bool allow_overlapping_txqs = TXTIME_ASSIST_IS_ENABLED(taprio_flags);

	if (!qopt && !dev->num_tc) {
	if (!qopt) {
		if (!dev->num_tc) {
			NL_SET_ERR_MSG(extack, "'mqprio' configuration is necessary");
			return -EINVAL;
		}

	/* If num_tc is already set, it means that the user already
	 * configured the mqprio part
	 */
	if (dev->num_tc)
		return 0;
	}

	/* taprio imposes that traffic classes map 1:n to tx queues */
	if (qopt->num_tc > dev->num_tx_queues) {