Skip to content

Commit

Permalink
pkt_sched: sch_sfq: dump a real number of flows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Jul 24, 2008
1 parent 6f75a9b commit f867e6a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion net/sched/sch_sfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,14 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)

opt.limit = q->limit;
opt.divisor = SFQ_HASH_DIVISOR;
opt.flows = q->limit;
opt.flows = 0;
if (q->tail != SFQ_DEPTH) {
unsigned int i;

for (i = 0; i < SFQ_HASH_DIVISOR; i++)
if (q->ht[i] != SFQ_DEPTH)
opt.flows++;
}

NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);

Expand Down

0 comments on commit f867e6a

Please sign in to comment.