Commit:     0773192b0f8914222cd27e682c49f978a6c7860a
Parent:     ffc8fefaf289fa485bc5c33e71572e6ce559d569
Author:     Peter P Waskiewicz Jr <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 17:13:45 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 02:28:20 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Acked-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 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 71bafde..4a49db6 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 
        /* If we're multiqueue, make sure the number of incoming bands
         * 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
-        * 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]);
        if (q->mq) {
-               if (sch->handle != TC_H_ROOT)
+               if (sch->parent != TC_H_ROOT)
                        return -EINVAL;
                if (netif_is_multiqueue(sch->dev)) {
                        if (q->bands == 0)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to