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>
This commit is contained in:

committed by
David S. Miller

parent
041441d0f0
commit
1704575519
@@ -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);
|
||||
|
Reference in New Issue
Block a user