aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_fifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_fifo.c')
-rw-r--r--net/sched/sch_fifo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 6ea0db427f91..baeed6a78d28 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -40,14 +40,18 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
40static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch, 40static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch,
41 struct sk_buff **to_free) 41 struct sk_buff **to_free)
42{ 42{
43 unsigned int prev_backlog;
44
43 if (likely(skb_queue_len(&sch->q) < sch->limit)) 45 if (likely(skb_queue_len(&sch->q) < sch->limit))
44 return qdisc_enqueue_tail(skb, sch); 46 return qdisc_enqueue_tail(skb, sch);
45 47
48 prev_backlog = sch->qstats.backlog;
46 /* queue full, remove one skb to fulfill the limit */ 49 /* queue full, remove one skb to fulfill the limit */
47 __qdisc_queue_drop_head(sch, &sch->q, to_free); 50 __qdisc_queue_drop_head(sch, &sch->q, to_free);
48 qdisc_qstats_drop(sch); 51 qdisc_qstats_drop(sch);
49 qdisc_enqueue_tail(skb, sch); 52 qdisc_enqueue_tail(skb, sch);
50 53
54 qdisc_tree_reduce_backlog(sch, 0, prev_backlog - sch->qstats.backlog);
51 return NET_XMIT_CN; 55 return NET_XMIT_CN;
52} 56}
53 57