]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: CT: Fix header-rewrite re-use for tupels
authorPaul Blakey <paulb@nvidia.com>
Mon, 23 May 2022 16:12:21 +0000 (19:12 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 31 May 2022 20:40:54 +0000 (13:40 -0700)
commit1f2856cde64baa78475e6d3c601fb7b7f693a161
treeffd6beef267f95c959cd9ae2bf7659ccc76993f4
parent66cb64e292d21588bdb831f08a7ec0ff04d6380d
net/mlx5: CT: Fix header-rewrite re-use for tupels

Tuple entries that don't have nat configured for them
which are added to the ct nat table will always create
a new modify header, as we don't check for possible
re-use on them. The same for tuples that have nat configured
for them but are added to ct table.

Fix the above by only avoiding wasteful re-use lookup
for actually natted entries in ct nat table.

Fixes: 7fac5c2eced3 ("net/mlx5: CT: Avoid reusing modify header context for natted entries")
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Ariel Levkovich <lariel@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c