diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-24 17:09:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-24 17:09:35 -0500 |
commit | 5bdc22a56549e7983c6b443298672641952ea035 (patch) | |
tree | fbfd4e7453e4fd23dfef826d4610ed2aae47b36c /net/sched/sch_fifo.c | |
parent | b6f4098897f30b7ea90a1c1edf35e9b20a9d828a (diff) | |
parent | e92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_tbf.c
Diffstat (limited to 'net/sched/sch_fifo.c')
-rw-r--r-- | net/sched/sch_fifo.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index f7290d2542c2..be33f9ddf9dd 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c | |||
@@ -45,17 +45,14 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
45 | 45 | ||
46 | static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) | 46 | static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch) |
47 | { | 47 | { |
48 | struct sk_buff *skb_head; | ||
49 | struct fifo_sched_data *q = qdisc_priv(sch); | 48 | struct fifo_sched_data *q = qdisc_priv(sch); |
50 | 49 | ||
51 | if (likely(skb_queue_len(&sch->q) < q->limit)) | 50 | if (likely(skb_queue_len(&sch->q) < q->limit)) |
52 | return qdisc_enqueue_tail(skb, sch); | 51 | return qdisc_enqueue_tail(skb, sch); |
53 | 52 | ||
54 | /* queue full, remove one skb to fulfill the limit */ | 53 | /* queue full, remove one skb to fulfill the limit */ |
55 | skb_head = qdisc_dequeue_head(sch); | 54 | __qdisc_queue_drop_head(sch, &sch->q); |
56 | sch->qstats.drops++; | 55 | sch->qstats.drops++; |
57 | kfree_skb(skb_head); | ||
58 | |||
59 | qdisc_enqueue_tail(skb, sch); | 56 | qdisc_enqueue_tail(skb, sch); |
60 | 57 | ||
61 | return NET_XMIT_CN; | 58 | return NET_XMIT_CN; |