All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] net/sched: transition actions to pcpu stats and rcu
@ 2023-02-14 21:15 Pedro Tammela
  2023-02-14 21:15 ` [PATCH net-next v2 1/4] net/sched: act_nat: transition to percpu " Pedro Tammela
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pedro Tammela @ 2023-02-14 21:15 UTC (permalink / raw)
  To: netdev
  Cc: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, Pedro Tammela

Following the work done for act_pedit[0], transition the remaining tc
actions to percpu stats and rcu, whenever possible.
Percpu stats make updating the action stats very cheap, while combining
it with rcu action parameters makes it possible to get rid of the per
action lock in the datapath.

For act_connmark and act_nat we run the following tests:
- tc filter add dev ens2f0 ingress matchall action connmark
- tc filter add dev ens2f0 ingress matchall action nat ingress any 10.10.10.10

Our setup consists of a 26 cores Intel CPU and a 25G NIC.
We use TRex to shoot 10mpps TCP packets and take perf measurements.
Both actions improved performance as expected since the datapath lock disappeared.

For act_pedit we move the drop counter to percpu, when available.
For act_gate we move the counters to percpu, when available.

[0] https://lore.kernel.org/all/20230131145149.3776656-1-pctammela@mojatatu.com/

v1->v2:
- Address comments by Paolo

Pedro Tammela (4):
  net/sched: act_nat: transition to percpu stats and rcu
  net/sched: act_connmark: transition to percpu stats and rcu
  net/sched: act_gate: use percpu stats
  net/sched: act_pedit: use percpu overlimit counter when available

 include/net/tc_act/tc_connmark.h |   9 ++-
 include/net/tc_act/tc_nat.h      |  10 ++-
 net/sched/act_connmark.c         | 107 ++++++++++++++++++++-----------
 net/sched/act_gate.c             |  30 +++++----
 net/sched/act_nat.c              |  72 ++++++++++++++-------
 net/sched/act_pedit.c            |   4 +-
 6 files changed, 148 insertions(+), 84 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-02-16 10:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 21:15 [PATCH net-next v2 0/4] net/sched: transition actions to pcpu stats and rcu Pedro Tammela
2023-02-14 21:15 ` [PATCH net-next v2 1/4] net/sched: act_nat: transition to percpu " Pedro Tammela
2023-02-14 21:15 ` [PATCH net-next v2 2/4] net/sched: act_connmark: " Pedro Tammela
2023-02-14 21:15 ` [PATCH net-next v2 3/4] net/sched: act_gate: use percpu stats Pedro Tammela
2023-02-14 21:15 ` [PATCH net-next v2 4/4] net/sched: act_pedit: use percpu overlimit counter when available Pedro Tammela
2023-02-16 10:10 ` [PATCH net-next v2 0/4] net/sched: transition actions to pcpu stats and rcu patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.