diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-07-17 12:18:18 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-07-17 12:18:18 +0800 |
commit | f5975f15ffe2b02186b5dd388b95fa0ed57a55eb (patch) | |
tree | 16876a5d6d79138fcee698e6a439d2a4dc92b22e /net/sched/sch_fifo.c | |
parent | 96195c7a758055f7c1a77b7070050c12eb949883 (diff) | |
parent | bd06e78ba67a5ba3c2f8dbf8d0b4a68ddb0fdc05 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rtlsk-v4.4-16.07-rt
Diffstat (limited to 'net/sched/sch_fifo.c')
-rw-r--r-- | net/sched/sch_fifo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index 2177eac0a61e..2e4bd2c0a50c 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c @@ -37,14 +37,18 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) { + unsigned int prev_backlog; + if (likely(skb_queue_len(&sch->q) < sch->limit)) return qdisc_enqueue_tail(skb, sch); + prev_backlog = sch->qstats.backlog; /* queue full, remove one skb to fulfill the limit */ __qdisc_queue_drop_head(sch, &sch->q); qdisc_qstats_drop(sch); qdisc_enqueue_tail(skb, sch); + qdisc_tree_reduce_backlog(sch, 0, prev_backlog - sch->qstats.backlog); return NET_XMIT_CN; } |