mbox series

[net-next,v2,0/4] net/sched: transition actions to pcpu stats and rcu

Message ID 20230214211534.735718-1-pctammela@mojatatu.com (mailing list archive)
Headers show
Series net/sched: transition actions to pcpu stats and rcu | expand

Message

Pedro Tammela Feb. 14, 2023, 9:15 p.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 16, 2023, 10:10 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 14 Feb 2023 18:15:30 -0300 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/4] net/sched: act_nat: transition to percpu stats and rcu
    https://git.kernel.org/netdev/net-next/c/7d12057b45fb
  - [net-next,v2,2/4] net/sched: act_connmark: transition to percpu stats and rcu
    https://git.kernel.org/netdev/net-next/c/288864effe33
  - [net-next,v2,3/4] net/sched: act_gate: use percpu stats
    https://git.kernel.org/netdev/net-next/c/7afd073e5521
  - [net-next,v2,4/4] net/sched: act_pedit: use percpu overlimit counter when available
    https://git.kernel.org/netdev/net-next/c/2d2e75d2d4a2

You are awesome, thank you!