Commit f867e6af authored by Jarek Poplawski's avatar Jarek Poplawski Committed by David S. Miller

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: default avatarDenys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6f75a9b6
...@@ -536,7 +536,14 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -536,7 +536,14 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
opt.limit = q->limit; opt.limit = q->limit;
opt.divisor = SFQ_HASH_DIVISOR; 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); NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment