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)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 30 Sep 2021 21:07:55 +0000 (14:07 -0700)
commita586775f83bd729ad60b56352dbe067f4bb0beee
tree1563c690c53f899e7a05fdd7b747e0fcd9130255
parent7dbc849b2ab3b8ea8f767361c46f914bb2b7779d
net/mlx5: E-Switch, Fix double allocation of acl flow counter

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>
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/egress_lgcy.c
drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_lgcy.c