net/mlx5: fix sample register error flow
authorSuanming Mou <suanmingm@nvidia.com>
Wed, 28 Oct 2020 09:33:47 +0000 (17:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:04 +0000 (23:35 +0100)
commitabec3d9c4cde2c7cfcf697792e07691ae8e5c9a0
treee373a54f66f84e8e5c53dec5dc7ba7c2901397e3
parent27eb204fc2a84b254bcecce75a6f4d3044c13074
net/mlx5: fix sample register error flow

Currently, sample flow need to prepare and register the sub-actions
before sample action is created.

Once the same sample action exists, the sub-actions registered by
the second flow should be released, or these sub-actions will be
leaked. Since the exist sample action only release these same
sub-actions when the sample action itself releases.

When same sample action exists, call the sub-action release function
for the later flow to release the redundant prepared sub-actions.

Fixes: 0756228b2704 ("net/mlx5: update translate function for sample action")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c