Skip to content

Commit aafddbf

Browse files
edumazetdavem330
authored andcommitted
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: 6401585 ("net: sched: restrict use of qstats qlen") Signed-off-by: Eric Dumazet <[email protected]> Cc: John Fastabend <[email protected]> Acked-by: John Fastabend <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 064d5e6 commit aafddbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/sch_fq_codel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static int fq_codel_dump_class_stats(struct Qdisc *sch, unsigned long cl,
661661
qs.backlog = q->backlogs[idx];
662662
qs.drops = flow->dropped;
663663
}
664-
if (gnet_stats_copy_queue(d, NULL, &qs, 0) < 0)
664+
if (gnet_stats_copy_queue(d, NULL, &qs, qs.qlen) < 0)
665665
return -1;
666666
if (idx < q->flows_cnt)
667667
return gnet_stats_copy_app(d, &xstats, sizeof(xstats));

0 commit comments

Comments
 (0)