netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net/sched: act_skbedit: lockless data path
@ 2018-07-11 14:04 Davide Caratti
  2018-07-11 14:04 ` [PATCH net-next v2 1/2] net/sched: skbedit: use per-cpu counters Davide Caratti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Davide Caratti @ 2018-07-11 14:04 UTC (permalink / raw)
  To: Cong Wang, David S. Miller; +Cc: netdev

the data path of act_skbedit can be faster if we avoid using spinlocks:
 - patch 1 converts act_skbedit statistics to use per-cpu counters
 - patch 2 lets act_skbedit use RCU to read/update its configuration 

test procedure (using pktgen from https://github.com/netoptimizer):

 # ip link add name eth1 type dummy
 # ip link set dev eth1 up
 # tc qdisc add dev eth1 clsact
 # tc filter add dev eth1 egress matchall action skbedit priority c1a0:c1a0
 # for c in 1 2 4 ; do
 > ./pktgen_bench_xmit_mode_queue_xmit.sh -v -s 64 -t $c -n 5000000 -i eth1
 > done

test results (avg. pps/thread)

  $c | before patch |  after patch | improvement
 ----+--------------+--------------+------------
   1 | 3917464 ± 3% | 4000458 ± 3% |  irrelevant
   2 | 3455367 ± 4% | 3953076 ± 1% |        +14%
   4 | 2496594 ± 2% | 3801123 ± 3% |        +52%

v2: rebased on latest net-next

Davide Caratti (2):
  net/sched: skbedit: use per-cpu counters
  net/sched: act_skbedit: don't use spinlock in the data path

 include/net/tc_act/tc_skbedit.h |  37 ++++++++---
 net/sched/act_skbedit.c         | 113 ++++++++++++++++++++------------
 2 files changed, 98 insertions(+), 52 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-12 22:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 14:04 [PATCH net-next v2 0/2] net/sched: act_skbedit: lockless data path Davide Caratti
2018-07-11 14:04 ` [PATCH net-next v2 1/2] net/sched: skbedit: use per-cpu counters Davide Caratti
2018-07-11 14:04 ` [PATCH net-next v2 2/2] net/sched: act_skbedit: don't use spinlock in the data path Davide Caratti
2018-07-12 21:54 ` [PATCH net-next v2 0/2] net/sched: act_skbedit: lockless " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).