[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230214211534.735718-1-pctammela@mojatatu.com>
Date: Tue, 14 Feb 2023 18:15:30 -0300
From: Pedro Tammela <pctammela@...atatu.com>
To: netdev@...r.kernel.org
Cc: jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, Pedro Tammela <pctammela@...atatu.com>
Subject: [PATCH net-next v2 0/4] net/sched: transition actions to pcpu stats and rcu
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
Powered by blists - more mailing lists