diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-04 04:37:21 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-04 11:50:05 -0400 |
commit | 17045755193a93fbd2d97db9aad5e726fc8c2a6d (patch) | |
tree | c12afe250c532626d752f4d894f9537e9d292d0c /net/sched/sch_choke.c | |
parent | 041441d0f0d885619d48f8f7682825ace523cf59 (diff) |
net: sched: factorize code (qdisc_drop())
Use qdisc_drop() helper where possible.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_choke.c')
-rw-r--r-- | net/sched/sch_choke.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c index 81445cc8196f..cc37dd52ecf9 100644 --- a/net/sched/sch_choke.c +++ b/net/sched/sch_choke.c @@ -332,15 +332,13 @@ static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch) } q->stats.pdrop++; - sch->qstats.drops++; - kfree_skb(skb); - return NET_XMIT_DROP; + return qdisc_drop(skb, sch); - congestion_drop: +congestion_drop: qdisc_drop(skb, sch); return NET_XMIT_CN; - other_drop: +other_drop: if (ret & __NET_XMIT_BYPASS) sch->qstats.drops++; kfree_skb(skb); |