]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: gred: fix qave reporting via netlink
authorDavid Ward <david.ward@ll.mit.edu>
Thu, 13 Sep 2012 05:22:34 +0000 (05:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Sep 2012 20:10:13 +0000 (16:10 -0400)
commit8a2f06a86281f3bb75786bd8ae1556cac5248cfe
treec7b84405616fc88087f174f4e4934a65a483032e
parent442f6cdd3e3230116ef2ce00816d3e82dad432f1
net_sched: gred: fix qave reporting via netlink

q->vars.qavg is a Wlog scaled value, but q->backlog is not. In order
to pass q->vars.qavg as the backlog value, we need to un-scale it.
Additionally, the qave value returned via netlink should not be Wlog
scaled, so we need to un-scale the result of red_calc_qavg().

This caused artificially high values for "Average Queue" to be shown
by 'tc -s -d qdisc', but did not affect the actual operation of GRED.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_gred.c