[NET]: Fix prio_tune() handling of root qdisc.
Fix the check in prio_tune() to see if sch->parent is TC_H_ROOT instead of sch->handle to load or reject the qdisc for multiqueue devices. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ffc8fefaf2
commit
0773192b0f
1 changed files with 4 additions and 2 deletions
|
@ -238,11 +238,13 @@ static int prio_tune(struct Qdisc *sch, struct rtattr *opt)
|
||||||
/* If we're multiqueue, make sure the number of incoming bands
|
/* If we're multiqueue, make sure the number of incoming bands
|
||||||
* matches the number of queues on the device we're associating with.
|
* matches the number of queues on the device we're associating with.
|
||||||
* If the number of bands requested is zero, then set q->bands to
|
* If the number of bands requested is zero, then set q->bands to
|
||||||
* dev->egress_subqueue_count.
|
* dev->egress_subqueue_count. Also, the root qdisc must be the
|
||||||
|
* only one that is enabled for multiqueue, since it's the only one
|
||||||
|
* that interacts with the underlying device.
|
||||||
*/
|
*/
|
||||||
q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]);
|
q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]);
|
||||||
if (q->mq) {
|
if (q->mq) {
|
||||||
if (sch->handle != TC_H_ROOT)
|
if (sch->parent != TC_H_ROOT)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (netif_is_multiqueue(sch->dev)) {
|
if (netif_is_multiqueue(sch->dev)) {
|
||||||
if (q->bands == 0)
|
if (q->bands == 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue