diff options
author | Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> | 2007-07-30 20:13:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-31 05:28:20 -0400 |
commit | 0773192b0f8914222cd27e682c49f978a6c7860a (patch) | |
tree | 0703cbc095825c3839422347c91fa0de03d5e180 | |
parent | ffc8fefaf289fa485bc5c33e71572e6ce559d569 (diff) |
[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>
-rw-r--r-- | net/sched/sch_prio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 71bafde353a6..4a49db65772e 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -238,11 +238,13 @@ static int prio_tune(struct Qdisc *sch, struct rtattr *opt) | |||
238 | /* If we're multiqueue, make sure the number of incoming bands | 238 | /* If we're multiqueue, make sure the number of incoming bands |
239 | * matches the number of queues on the device we're associating with. | 239 | * matches the number of queues on the device we're associating with. |
240 | * If the number of bands requested is zero, then set q->bands to | 240 | * If the number of bands requested is zero, then set q->bands to |
241 | * dev->egress_subqueue_count. | 241 | * dev->egress_subqueue_count. Also, the root qdisc must be the |
242 | * only one that is enabled for multiqueue, since it's the only one | ||
243 | * that interacts with the underlying device. | ||
242 | */ | 244 | */ |
243 | q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]); | 245 | q->mq = RTA_GET_FLAG(tb[TCA_PRIO_MQ - 1]); |
244 | if (q->mq) { | 246 | if (q->mq) { |
245 | if (sch->handle != TC_H_ROOT) | 247 | if (sch->parent != TC_H_ROOT) |
246 | return -EINVAL; | 248 | return -EINVAL; |
247 | if (netif_is_multiqueue(sch->dev)) { | 249 | if (netif_is_multiqueue(sch->dev)) { |
248 | if (q->bands == 0) | 250 | if (q->bands == 0) |