Skip to content

Commit 5583b5d

Browse files
lrw514raslandarawsheh
authored andcommitted
net/mlx5: fix indirect meter index leak
When destroying the meter_mark indirect action, PMD didn't recycle the ipool resources. Fixes: 48fbb0e ("net/mlx5: support flow meter mark indirect action with HWS") Cc: [email protected] Cc: [email protected] Signed-off-by: Rongwei Liu <[email protected]> Acked-by: Dariusz Sosnowski <[email protected]>
1 parent 495cd38 commit 5583b5d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

drivers/net/mlx5/mlx5_flow_hw.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13013,13 +13013,16 @@ flow_hw_action_handle_destroy(struct rte_eth_dev *dev, uint32_t queue,
1301313013
break;
1301413014
}
1301513015
/* Wait for ASO object completion. */
13016-
if (queue == MLX5_HW_INV_QUEUE &&
13017-
mlx5_aso_mtr_wait(priv, aso_mtr, true)) {
13018-
ret = -EINVAL;
13019-
rte_flow_error_set(error, EINVAL,
13020-
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
13021-
NULL, "Unable to wait for ASO meter CQE");
13022-
break;
13016+
if (queue == MLX5_HW_INV_QUEUE) {
13017+
if (mlx5_aso_mtr_wait(priv, aso_mtr, true)) {
13018+
ret = -EINVAL;
13019+
rte_flow_error_set(error, EINVAL,
13020+
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
13021+
NULL, "Unable to wait for ASO meter CQE");
13022+
}
13023+
mlx5_ipool_free(pool->idx_pool, idx);
13024+
if (ret < 0)
13025+
break;
1302313026
}
1302413027
aso = true;
1302513028
break;

0 commit comments

Comments
 (0)