netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] net/sched: transition actions to pcpu stats and rcu
@ 2023-02-10 20:27 Pedro Tammela
  2023-02-10 20:27 ` [PATCH net-next 1/3] net/sched: act_nat: transition to percpu " Pedro Tammela
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Pedro Tammela @ 2023-02-10 20:27 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.

Actions act_gate and act_ctinfo are changed to use the percpu stats.
act_ctinfo already relied on rcu on the datapath but it was updating the stats wrongly,
act_gate datapath has interactions with hrtimers which might require to take the per
action lock (not sure yet, so we only convert to percpu stats).

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

Pedro Tammela (3):
  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

 include/net/tc_act/tc_connmark.h |   9 ++-
 include/net/tc_act/tc_nat.h      |  10 ++-
 net/sched/act_connmark.c         | 109 ++++++++++++++++++++-----------
 net/sched/act_gate.c             |  10 +--
 net/sched/act_nat.c              |  68 +++++++++++++------
 5 files changed, 137 insertions(+), 69 deletions(-)

-- 
2.34.1


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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 20:27 [PATCH net-next 0/3] net/sched: transition actions to pcpu stats and rcu Pedro Tammela
2023-02-10 20:27 ` [PATCH net-next 1/3] net/sched: act_nat: transition to percpu " Pedro Tammela
2023-02-14  9:05   ` Paolo Abeni
2023-02-10 20:27 ` [PATCH net-next 2/3] net/sched: act_connmark: " Pedro Tammela
2023-02-14  9:03   ` Paolo Abeni
2023-02-14 14:31     ` Pedro Tammela
2023-02-10 20:27 ` [PATCH net-next 3/3] net/sched: act_gate: use percpu stats Pedro Tammela
2023-02-14  9:22   ` Paolo Abeni

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).