Skip to content

Commit 2f23cd4

Browse files
Dust Lidavem330
authored andcommitted
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: ce679e8 ("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]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0d580fb commit 2f23cd4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

net/sched/sch_mq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)
153153
__gnet_stats_copy_queue(&sch->qstats,
154154
qdisc->cpu_qstats,
155155
&qdisc->qstats, qlen);
156+
sch->q.qlen += qlen;
156157
} else {
157158
sch->q.qlen += qdisc->q.qlen;
158159
sch->bstats.bytes += qdisc->bstats.bytes;

net/sched/sch_mqprio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb)
411411
__gnet_stats_copy_queue(&sch->qstats,
412412
qdisc->cpu_qstats,
413413
&qdisc->qstats, qlen);
414+
sch->q.qlen += qlen;
414415
} else {
415416
sch->q.qlen += qdisc->q.qlen;
416417
sch->bstats.bytes += qdisc->bstats.bytes;

0 commit comments

Comments
 (0)