Skip to contentSkip to conversation

net: sched: fix dump qlen for sch_mq/sch_mqprio with NOLOCK subqueues

PATCH In review Dust Li 2 participants 2 messages Dec 3, 2019

Subsystems (3)
lore
Share & tools
lore

Dust Li

author
#0 lore raw

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")
---
 net/sched/sch_mq.c     | 1 +
 net/sched/sch_mqprio.c | 1 +
 2 files changed, 2 insertions(+)
net/sched/sch_mq.c +1 -0
index 278c0b2dc523..e79f1afe0cfd 100644
@@ -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
index 0d0113a24962..de4e00a58bc6 100644
@@ -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