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)
commite2194a1744e8594e82a861687808c1adca419b85
treeb267b2fa4086ad92d96ded1e3430fa90dc7c3700
parent8355060f5ec381abda77659f91f56302203df535
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 bc562be9674b ("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: bc562be9674b ("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