diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-07-24 00:34:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-24 00:34:27 -0400 |
commit | f867e6af94239a04ec23aeec2fcda5aa58e41db7 (patch) | |
tree | aba94e6be14429ab8a6556c8d10c11a04914568c /net/sched | |
parent | 6f75a9b6426e686649ac440c37ec7c249501f9a5 (diff) |
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>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_sfq.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 8589da666568..73f53844ce97 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -536,7 +536,14 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
536 | 536 | ||
537 | opt.limit = q->limit; | 537 | opt.limit = q->limit; |
538 | opt.divisor = SFQ_HASH_DIVISOR; | 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 | NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); | 548 | NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); |
542 | 549 | ||