Commit 39ad1297 authored by Gao Feng's avatar Gao Feng Committed by David S. Miller

sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq

The commit 520ac30f ("net_sched: drop packets after root qdisc lock
is released) made a big change of tc for performance. There are two points
left in sch_prio and sch_qfq which are not changed with that commit. Now
enhance them now with __qdisc_drop.
Signed-off-by: default avatarGao Feng <gfree.wind@vip.163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a94b3a4
...@@ -80,7 +80,7 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) ...@@ -80,7 +80,7 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
if (ret & __NET_XMIT_BYPASS) if (ret & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch); qdisc_qstats_drop(sch);
kfree_skb(skb); __qdisc_drop(skb, to_free);
return ret; return ret;
} }
#endif #endif
......
...@@ -1215,7 +1215,7 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, ...@@ -1215,7 +1215,7 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
if (cl == NULL) { if (cl == NULL) {
if (err & __NET_XMIT_BYPASS) if (err & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch); qdisc_qstats_drop(sch);
kfree_skb(skb); __qdisc_drop(skb, to_free);
return err; return err;
} }
pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid); pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment