aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGao Feng <gfree.wind@vip.163.com>2017-09-04 02:21:12 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-07 00:20:07 -0400
commit39ad1297a2084e0724da73d9eda2ceb9573a5d6c (patch)
tree656f10ecd9c62b74561083fb8a2ef1f0a68fec9d
parent9a94b3a4bdfdb404f1846099e880c52e144f06c0 (diff)
sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq
The commit 520ac30f4551 ("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: Gao Feng <gfree.wind@vip.163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sched/sch_prio.c2
-rw-r--r--net/sched/sch_qfq.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index f31b28f788c0..2dd6c68ae91e 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -80,7 +80,7 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
80 80
81 if (ret & __NET_XMIT_BYPASS) 81 if (ret & __NET_XMIT_BYPASS)
82 qdisc_qstats_drop(sch); 82 qdisc_qstats_drop(sch);
83 kfree_skb(skb); 83 __qdisc_drop(skb, to_free);
84 return ret; 84 return ret;
85 } 85 }
86#endif 86#endif
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
index cd661a7f81e6..6ddfd4991108 100644
--- a/net/sched/sch_qfq.c
+++ b/net/sched/sch_qfq.c
@@ -1215,7 +1215,7 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
1215 if (cl == NULL) { 1215 if (cl == NULL) {
1216 if (err & __NET_XMIT_BYPASS) 1216 if (err & __NET_XMIT_BYPASS)
1217 qdisc_qstats_drop(sch); 1217 qdisc_qstats_drop(sch);
1218 kfree_skb(skb); 1218 __qdisc_drop(skb, to_free);
1219 return err; 1219 return err;
1220 } 1220 }
1221 pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid); 1221 pr_debug("qfq_enqueue: cl = %x\n", cl->common.classid);