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

fq_codel: return non zero qlen in class dumps

We properly scan the flow list to count number of packets,
but John passed 0 to gnet_stats_copy_queue() so we report
a zero value to user space instead of the result.

Fixes: 640158536632 ("net: sched: restrict use of qstats qlen")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
aafddbf0 064d5e6f

+1 -1
+1 -1
net/sched/sch_fq_codel.c
··· 661 661 qs.backlog = q->backlogs[idx]; 662 662 qs.drops = flow->dropped; 663 663 } 664 - if (gnet_stats_copy_queue(d, NULL, &qs, 0) < 0) 664 + if (gnet_stats_copy_queue(d, NULL, &qs, qs.qlen) < 0) 665 665 return -1; 666 666 if (idx < q->flows_cnt) 667 667 return gnet_stats_copy_app(d, &xstats, sizeof(xstats));