net/mlx5: fix resource release for mirror flow
authorJiawei Wang <jiaweiw@nvidia.com>
Fri, 9 Apr 2021 12:33:28 +0000 (15:33 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 13 Apr 2021 11:38:16 +0000 (13:38 +0200)
commitca5eb60ecd5bcd9d4dfed6972ea991d7ead0e9a3
tree587449e9bf0debe6dd09aca249be51d3d6cb1d99
parent4a750d29927e750b7197dc18fb9ebd9286324108
net/mlx5: fix resource release for mirror flow

The mlx5 PMD allocated the resources of the sample actions, and then
moved these ones to the destination actions array. The original indices
were not cleared and the resources were referenced twice in the
flow object - as the fate actions and in the destination actions array.

This causes the failure on flow destroy because PMD tried to release the
same objects twice.

The patch clears the original indices, add the missed checking for zero
and eliminates multiple object releasing.

Fixes: 00c10c22118a ("net/mlx5: update translate function for mirroring")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c