diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-15 07:01:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-17 22:29:32 +0300 |
commit | 416ef9b15c688b91edbf654ebe7bc349c9151147 (patch) | |
tree | b85b4d8f31906c3a88bd89d790f98d9aa2d2bfbf /include/net | |
parent | 2d83619de8a64703cd3b0bf21b3b85f081290bf3 (diff) | |
download | linux-416ef9b15c688b91edbf654ebe7bc349c9151147.tar.xz |
net: sched: red: don't reset the backlog on every stat dump
Commit 0dfb33a0d7e2 ("sch_red: report backlog information") copied
child's backlog into RED's backlog. Back then RED did not maintain
its own backlog counts. This has changed after commit 2ccccf5fb43f
("net_sched: update hierarchical backlog too") and commit d7f4f332f082
("sch_red: update backlog as well"). Copying is no longer necessary.
Tested:
$ tc -s qdisc show dev veth0
qdisc red 1: root refcnt 2 limit 400000b min 30000b max 30000b ecn
Sent 20942 bytes 221 pkt (dropped 0, overlimits 0 requeues 0)
backlog 1260b 14p requeues 14
marked 0 early 0 pdrop 0 other 0
qdisc tbf 2: parent 1: rate 1Kbit burst 15000b lat 3585.0s
Sent 20942 bytes 221 pkt (dropped 0, overlimits 138 requeues 0)
backlog 1260b 14p requeues 14
Recently RED offload was added. We need to make sure drivers don't
depend on resetting the stats. This means backlog should be treated
like any other statistic:
total_stat = new_hw_stat - prev_hw_stat;
Adjust mlxsw.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Nogah Frankel <nogahf@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/pkt_cls.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 9c341f003091..cc23c041a6d7 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -748,6 +748,7 @@ struct tc_red_qopt_offload_params { u32 max; u32 probability; bool is_ecn; + struct gnet_stats_queue *qstats; }; struct tc_red_qopt_offload { |