diff options
author | Alexei Starovoitov <ast@plumgrid.com> | 2015-04-30 20:14:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-03 23:42:03 -0400 |
commit | 087c1a601ad7f851a2d31f5fa0e5e9dfc766df55 (patch) | |
tree | ef9325c8d3b021583af7a0d1b13cf934379b6b31 /net/sched/sch_ingress.c | |
parent | a89f96c927700eeb560943847e3d00b664f341bb (diff) | |
download | linux-stable-087c1a601ad7f851a2d31f5fa0e5e9dfc766df55.tar.gz linux-stable-087c1a601ad7f851a2d31f5fa0e5e9dfc766df55.tar.bz2 linux-stable-087c1a601ad7f851a2d31f5fa0e5e9dfc766df55.zip |
net: sched: run ingress qdisc without locks
TC classifiers/actions were converted to RCU by John in the series:
http://thread.gmane.org/gmane.linux.network/329739/focus=329739
and many follow on patches.
This is the last patch from that series that finally drops
ingress spin_lock.
Single cpu ingress+u32 performance goes from 22.9 Mpps to 24.5 Mpps.
In two cpu case when both cores are receiving traffic on the same
device and go into the same ingress+u32 the performance jumps
from 4.5 + 4.5 Mpps to 23.5 + 23.5 Mpps
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_ingress.c')
-rw-r--r-- | net/sched/sch_ingress.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index 4cdbfb85686a..a89cc3278bfb 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c @@ -65,11 +65,11 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch) result = tc_classify(skb, fl, &res); - qdisc_bstats_update(sch, skb); + qdisc_bstats_update_cpu(sch, skb); switch (result) { case TC_ACT_SHOT: result = TC_ACT_SHOT; - qdisc_qstats_drop(sch); + qdisc_qstats_drop_cpu(sch); break; case TC_ACT_STOLEN: case TC_ACT_QUEUED: @@ -91,6 +91,7 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch) static int ingress_init(struct Qdisc *sch, struct nlattr *opt) { net_inc_ingress_queue(); + sch->flags |= TCQ_F_CPUSTATS; return 0; } |