]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: sch_tbf: Don't overwrite backlog before dumping
authorPetr Machata <petrm@mellanox.com>
Fri, 24 Jan 2020 13:23:05 +0000 (15:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Jan 2020 09:56:30 +0000 (10:56 +0100)
commitc565fcaa77a56fb4d4f97a7a793df54f564d9744
treef14be203e8cb3d1865e84f5ae314e39a9d9c6913
parentcbd6e6196b0fa42b3da2ad17b301deb75b40387c
net: sched: sch_tbf: Don't overwrite backlog before dumping

In 2011, in commit a8b46d25e58a ("sch_tbf: report backlog information"),
TBF started copying backlog depth from the child Qdisc before dumping, with
the motivation that the backlog was otherwise not visible in "tc -s qdisc
show".

Later, in 2016, in commit d552d37cd549 ("sch_tbf: update backlog as well"),
TBF got a full-blown backlog tracking. However it kept copying the child's
backlog over before dumping.

That line is now unnecessary, so remove it.

As shown in the following example, backlog is still reported correctly:

    # tc -s qdisc show dev veth0 invisible
    qdisc tbf 1: root refcnt 2 rate 1Mbit burst 128Kb lat 82.8s
     Sent 505475370 bytes 406985 pkt (dropped 0, overlimits 812544 requeues 0)
     backlog 81972b 66p requeues 0
    qdisc bfifo 0: parent 1:1 limit 10Mb
     Sent 505475370 bytes 406985 pkt (dropped 0, overlimits 0 requeues 0)
     backlog 81972b 66p requeues 0

Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_tbf.c