summaryrefslogtreecommitdiff
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-06-02 10:02:34 -0700
committerStefan Agner <stefan.agner@toradex.com>2016-06-02 10:02:34 -0700
commit430c728373dac245d0ca55aac1d0fcc456872174 (patch)
tree82b61d813ac0204316dd5a67c46fd40e41d63e01 /net/sched/sch_api.c
parent7a829b541431d70eb10d8471bc33a424da36820f (diff)
parent351d2d4d3108a9a0f0e112dabbc36c2b1446e4f8 (diff)
Merge tag 'v4.4.12' into toradex_vf_4.4-next
This is the 4.4.12 stable release
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index af1acf009866..95b560f0b253 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -744,14 +744,15 @@ static u32 qdisc_alloc_handle(struct net_device *dev)
return 0;
}
-void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
+void qdisc_tree_reduce_backlog(struct Qdisc *sch, unsigned int n,
+ unsigned int len)
{
const struct Qdisc_class_ops *cops;
unsigned long cl;
u32 parentid;
int drops;
- if (n == 0)
+ if (n == 0 && len == 0)
return;
drops = max_t(int, n, 0);
rcu_read_lock();
@@ -774,11 +775,12 @@ void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
cops->put(sch, cl);
}
sch->q.qlen -= n;
+ sch->qstats.backlog -= len;
__qdisc_qstats_drop(sch, drops);
}
rcu_read_unlock();
}
-EXPORT_SYMBOL(qdisc_tree_decrease_qlen);
+EXPORT_SYMBOL(qdisc_tree_reduce_backlog);
static void notify_and_destroy(struct net *net, struct sk_buff *skb,
struct nlmsghdr *n, u32 clid,