]> www.infradead.org Git - users/willy/xarray.git/commit
net/mlx5: CT: Separate CT and CT-NAT tuple entries
authorChris Mi <cmi@nvidia.com>
Thu, 13 Jun 2024 21:00:32 +0000 (00:00 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 15 Jun 2024 01:53:23 +0000 (18:53 -0700)
commit49d37d05f216ce026ebd297b76a2db5bff7a4b4d
treecf76a6448608a2b7503db7a41dbb2deb39631b9b
parente575d3a6dd22123888defb622b1742aa2d45b942
net/mlx5: CT: Separate CT and CT-NAT tuple entries

Currently a ct entry is stored in both ct and ct-nat tables. ct
action is directed to the ct table, while ct nat action is directed
to the nat table. ct-nat entries perform the nat header rewrites,
if required. The current design assures that a ct action will match
in hardware even if the tuple has nat configured, it will just not
execute it. However, storing each connection in two tables increases
the system's memory consumption while reducing its insertion rate.

Offload a connection to either ct or the ct-nat table. Add a miss
fall-through rule from ct-nat table to the ct table allowing ct(nat)
action on non-natted connections.

ct action on natted connections, by default, will be handled by the
software miss path.

Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Chris Mi <cmi@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20240613210036.1125203-3-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c