net/mlx5: E-Switch, Fix double allocation of acl flow counter
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 23 Sep 2021 14:57:47 +0000 (17:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 08:04:26 +0000 (10:04 +0200)
commit6e6f79e39830708f05179cc2d18f552e5cd8c43b
tree326fb015948926fc5a9504bcc37e0adb62692e2c
parentd70cb6c77ad983f37a401fd29017da4546c57093
net/mlx5: E-Switch, Fix double allocation of acl flow counter

[ Upstream commit a586775f83bd729ad60b56352dbe067f4bb0beee ]

Flow counter is allocated in eswitch legacy acl setting functions
without checking if already allocated by previous setting. Add a check
to avoid such double allocation.

Fixes: 07bab9502641 ("net/mlx5: E-Switch, Refactor eswitch ingress acl codes")
Fixes: ea651a86d468 ("net/mlx5: E-Switch, Refactor eswitch egress acl codes")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c