diff options
author | Eric Dumazet <edumazet@google.com> | 2013-12-05 11:12:02 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-09 19:54:47 -0500 |
commit | 95dc19299f741c986227ec33e23cbf9b3321f812 (patch) | |
tree | 603380aee1a70b573c604abded1190d4203a8ca8 /net/sched/sch_mqprio.c | |
parent | fbec3706380726e0959fe50e748dd6cda5697f56 (diff) | |
download | op-kernel-dev-95dc19299f741c986227ec33e23cbf9b3321f812.zip op-kernel-dev-95dc19299f741c986227ec33e23cbf9b3321f812.tar.gz |
pkt_sched: give visibility to mq slave qdiscs
Commit 6da7c8fcbcbd ("qdisc: allow setting default queuing discipline")
added the ability to change default qdisc from pfifo_fast to say fq
But as most modern ethernet devices are multiqueue, we cant really
see all the statistics from "tc -s qdisc show", as the default root
qdisc is mq.
This patch adds the calls to qdisc_list_add() to mq and mqprio
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_mqprio.c')
-rw-r--r-- | net/sched/sch_mqprio.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index d44c868..6749e2f 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -167,15 +167,17 @@ static void mqprio_attach(struct Qdisc *sch) { struct net_device *dev = qdisc_dev(sch); struct mqprio_sched *priv = qdisc_priv(sch); - struct Qdisc *qdisc; + struct Qdisc *qdisc, *old; unsigned int ntx; /* Attach underlying qdisc */ for (ntx = 0; ntx < dev->num_tx_queues; ntx++) { qdisc = priv->qdiscs[ntx]; - qdisc = dev_graft_qdisc(qdisc->dev_queue, qdisc); - if (qdisc) - qdisc_destroy(qdisc); + old = dev_graft_qdisc(qdisc->dev_queue, qdisc); + if (old) + qdisc_destroy(old); + if (ntx < dev->real_num_tx_queues) + qdisc_list_add(qdisc); } kfree(priv->qdiscs); priv->qdiscs = NULL; |