]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/mlx5e: CT: Offload connections with hardware steering rules
authorCosmin Ratiu <cratiu@nvidia.com>
Tue, 14 Jan 2025 13:06:46 +0000 (15:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jan 2025 03:28:04 +0000 (19:28 -0800)
commit066d49c199a66f07232fdcbe5b5f5c607e804327
tree347911b9ecc733b8ecad58d250efd9525e91aa01
parent554f9773fdeef302a7fa92027a8684e53adc4935
net/mlx5e: CT: Offload connections with hardware steering rules

This is modeled similar to how software steering works:
- a reference-counted matcher is maintained for each
  combination of nat/no_nat x ipv4/ipv6 x tcp/udp/gre.
- adding a rule involves finding+referencing or creating a corresponding
  matcher, then actually adding a rule.
- updating rules is implemented using the bwc_rule update API, which can
  change a rule's actions without touching the match value.

By using a T-Rex traffic generator to initiate multi-million UDP flows
per second, a kernel running with these patches on the RX side was able
to offload ~600K flows per second, which is about ~7x larger than what
software steering could do on the same hardware (256-thread AMD EPYC,
512 GB RAM, ConnectX-7 b2b).

Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250114130646.1937192-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_hmfs.c