summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_tbf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-04-01 14:50:14 -0700
committerDavid S. Miller <davem@davemloft.net>2019-04-01 14:50:14 -0700
commitc4df1bddc4306a08bc8ec6a65d34386388d2f42f (patch)
tree394e064316a0965588c3784a36a24fca3a7b352d /net/sched/sch_tbf.c
parent0db6f8befc32c68bb13d7ffbb2e563c79e913e13 (diff)
parente5f0e8f8e456589d56e4955154ed5d468cd6d286 (diff)
Merge branch 'net-sched-fix-stats-accounting-for-child-NOLOCK-qdiscs'
Paolo Abeni says: ==================== net: sched: fix stats accounting for child NOLOCK qdiscs Currently, stats accounting for NOLOCK qdisc enslaved to classful (lock) qdiscs is buggy. Per CPU values are ignored in most places, as a result, stats dump in the above scenario always report 0 length backlog and parent backlog len is not updated correctly on NOLOCK qdisc removal. The first patch address stats dumping, and the second one child qdisc removal. I'm targeting the net tree as this is a bugfix, but it could be moved to net-next due to the relatively large diffstat. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r--net/sched/sch_tbf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 7f272a9070c5..f71578dbb9e3 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -391,8 +391,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt,
sch_tree_lock(sch);
if (child) {
- qdisc_tree_reduce_backlog(q->qdisc, q->qdisc->q.qlen,
- q->qdisc->qstats.backlog);
+ qdisc_tree_flush_backlog(q->qdisc);
qdisc_put(q->qdisc);
q->qdisc = child;
}