Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <dust.li@linux.alibaba.com>
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dust Li and committed by
David S. Miller
2f23cd42 0d580fbd

+2
+1
net/sched/sch_mq.c
··· 153 153 __gnet_stats_copy_queue(&sch->qstats, 154 154 qdisc->cpu_qstats, 155 155 &qdisc->qstats, qlen); 156 + sch->q.qlen += qlen; 156 157 } else { 157 158 sch->q.qlen += qdisc->q.qlen; 158 159 sch->bstats.bytes += qdisc->bstats.bytes;
+1
net/sched/sch_mqprio.c
··· 411 411 __gnet_stats_copy_queue(&sch->qstats, 412 412 qdisc->cpu_qstats, 413 413 &qdisc->qstats, qlen); 414 + sch->q.qlen += qlen; 414 415 } else { 415 416 sch->q.qlen += qdisc->q.qlen; 416 417 sch->bstats.bytes += qdisc->bstats.bytes;