net/mlx5: fix meter policy creation failure handling
authorLi Zhang <lizh@nvidia.com>
Wed, 9 Jun 2021 02:07:11 +0000 (05:07 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 24 Jun 2021 11:19:48 +0000 (13:19 +0200)
commit035f4c2328e13fb5eba748dec78f9a94901380b0
tree953b4ba9d8abfa9d3c632526b533510e463e5f68
parent1fddb5205b9f50dc6efdb9d23d0b0e63a254df39
net/mlx5: fix meter policy creation failure handling

When an error appears in the policy creation,
the IDs mapping between the user policy ID to
the driver policy ID is skipped.

Wrongly, the driver tried to clean the mapping in
this case what caused an error.

Skip the clearance in this case.

Fixes: afb4aa4f122 ("net/mlx5: support meter policy operations")
Cc: stable@dpdk.org
Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_meter.c