pkt_sched: avoid requeues if possible
[cascardo/linux.git] / net / sched / sch_mqprio.c
index d1831ca..accec33 100644 (file)
@@ -132,6 +132,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
                        goto err;
                }
                priv->qdiscs[i] = qdisc;
+               qdisc->flags |= TCQ_F_ONETXQUEUE;
        }
 
        /* If the mqprio options indicate that hardware should own
@@ -205,6 +206,9 @@ static int mqprio_graft(struct Qdisc *sch, unsigned long cl, struct Qdisc *new,
 
        *old = dev_graft_qdisc(dev_queue, new);
 
+       if (new)
+               new->flags |= TCQ_F_ONETXQUEUE;
+
        if (dev->flags & IFF_UP)
                dev_activate(dev);