]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable
authorPaul Blakey <paulb@nvidia.com>
Mon, 25 Jan 2021 15:31:26 +0000 (17:31 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 26 Jan 2021 23:39:04 +0000 (15:39 -0800)
commit01b86d4c8599222b4b7bd220e710e5c726da699b
treeb267b2fa4086ad92d96ded1e3430fa90dc7c3700
parentd79c9358e4e7234704c8184b2c13f6ee2abad941
net/mlx5: CT: Fix incorrect removal of tuple_nat_node from nat rhashtable

If a non nat tuple entry is inserted just to the regular tuples
rhashtable (ct_tuples_ht) and not to natted tuples rhashtable
(ct_nat_tuples_ht). Commit 8569d548e791 ("net/mlx5e: CT: Save ct entries
tuples in hashtables") mixed up the return labels and names sot that on
cleanup or failure we still try to remove for the natted tuples rhashtable.

Fix that by correctly checking if a natted tuples insertion
before removing it. While here make it more readable.

Fixes: 8569d548e791 ("net/mlx5e: CT: Save ct entries tuples in hashtables")
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c