pkt_sched: sch_sfq: dump a real number of flows

Dump the "flows" number according to the number of active flows
instead of repeating the "limit".

Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jarek Poplawski and committed by
David S. Miller
f867e6af 6f75a9b6

+8 -1
+8 -1
net/sched/sch_sfq.c
··· 536 536 537 537 opt.limit = q->limit; 538 538 opt.divisor = SFQ_HASH_DIVISOR; 539 - opt.flows = q->limit; 539 + opt.flows = 0; 540 + if (q->tail != SFQ_DEPTH) { 541 + unsigned int i; 542 + 543 + for (i = 0; i < SFQ_HASH_DIVISOR; i++) 544 + if (q->ht[i] != SFQ_DEPTH) 545 + opt.flows++; 546 + } 540 547 541 548 NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); 542 549