summaryrefslogtreecommitdiff
path: root/net/sched/sch_tbf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-06-10 11:52:24 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-10 11:52:24 -0700
commit1578b0a5e92825334760741e5c166b8873886f1b (patch)
treeac8299191f37990111f7d4b615601f4356e24fea /net/sched/sch_tbf.c
parent3d5479e92087f6249231e26a2d7327e86a8d0dfc (diff)
parent698ea54dde6768d4a96080d0fb796cb3a4eadaf8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/sched/act_police.c net/sched/sch_drr.c net/sched/sch_hfsc.c net/sched/sch_prio.c net/sched/sch_red.c net/sched/sch_tbf.c In net-next the drop methods of the packet schedulers got removed, so the bug fixes to them in 'net' are irrelevant. A packet action unload crash fix conflicts with the addition of the new firstuse timestamp. 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, 3 insertions, 0 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 1342e46574b2..7fa3d6e1291c 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -207,6 +207,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return ret;
}
+ qdisc_qstats_backlog_inc(sch, skb);
sch->q.qlen++;
return NET_XMIT_SUCCESS;
}
@@ -251,6 +252,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc *sch)
q->t_c = now;
q->tokens = toks;
q->ptokens = ptoks;
+ qdisc_qstats_backlog_dec(sch, skb);
sch->q.qlen--;
qdisc_unthrottled(sch);
qdisc_bstats_update(sch, skb);
@@ -282,6 +284,7 @@ static void tbf_reset(struct Qdisc *sch)
struct tbf_sched_data *q = qdisc_priv(sch);
qdisc_reset(q->qdisc);
+ sch->qstats.backlog = 0;
sch->q.qlen = 0;
q->t_c = ktime_get_ns();
q->tokens = q->buffer;