]> 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)
commit2aefa6efa80a98c694446af9504b43422a014996
treeffd6beef267f95c959cd9ae2bf7659ccc76993f4
parentb6bc51460ed1f8fae87a4b98fee774d46aa35d8e
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: 174486b33ee9 ("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