net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues
Subsystems (3)
PATCH 1/1 net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues
sch->q.len hasn't been set if the subqueue is a NOLOCK qdisc in mq_dump() and mqprio_dump().
Fixes ce679e8df7ed ("net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mqprio")
Signed-off-by Dust Li <[email protected]>
Signed-off-by Tony Lu <[email protected]>
--- net/sched/sch_mq.c | 1 + net/sched/sch_mqprio.c | 1 + 2 files changed, 2 insertions(+)
net/sched/sch_mq.c +1 -0
@@ -153,6 +153,7 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)__gnet_stats_copy_queue (&sch->qstats, qdisc->cpu_qstats, &qdisc->qstats, qlen); + sch->q.qlen += qlen; }else { sch->q.qlen += qdisc->q.qlen; sch->bstats.bytes += qdisc->bstats.bytes;
net/sched/sch_mqprio.c +1 -0
@@ -411,6 +411,7 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb)__gnet_stats_copy_queue (&sch->qstats, qdisc->cpu_qstats, &qdisc->qstats, qlen); + sch->q.qlen += qlen; }else { sch->q.qlen += qdisc->q.qlen; sch->bstats.bytes += qdisc->bstats.bytes;
Signature · 1 line
2.19.1.3.ge56e4f7
David Miller
maintainerFrom: Dust Li <[email protected]>
Date: Tue, 3 Dec 2019 11:17:40 +0800
Quoted 6 lines
sch->q.lenhasn't been set if the subqueue is a NOLOCK qdisc inmq_dump()andmqprio_dump().Fixes ce679e8df7ed ("net: sched: add support for TCQ_F_NOLOCK subqueues to sch_mqprio")Signed-off-by Dust Li <[email protected]>Signed-off-by Tony Lu <[email protected]>
Applied and queued up for -stable, thank you.