net/mlx5: fix indirect meter index leak
PATCH 1/1 net/mlx5: fix indirect meter index leak
When destroying the meter_mark indirect action, PMD didn't recycle the ipool resources.
Fixes 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")
Signed-off-by Rongwei Liu <[email protected]>
--- drivers/net/mlx5/mlx5_flow_hw.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/net/mlx5/mlx5_flow_hw.c +10 -7
@@ -13011,13 +13011,16 @@ flow_hw_action_handle_destroy(struct rte_eth_dev *dev, uint32_t queue,break ; }/* Wait for ASO object completion. */ -if (queue ==MLX5_HW_INV_QUEUE && -mlx5_aso_mtr_wait (priv, aso_mtr, true)) { - ret = -EINVAL ; -rte_flow_error_set (error,EINVAL , -RTE_FLOW_ERROR_TYPE_UNSPECIFIED , -NULL ,"Unable to wait for ASO meter CQE" ); -break ; +if (queue ==MLX5_HW_INV_QUEUE ) { +if (mlx5_aso_mtr_wait (priv, aso_mtr, true)) { + ret = -EINVAL ; +rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_UNSPECIFIED , +NULL ,"Unable to wait for ASO meter CQE" ); + } +mlx5_ipool_free (pool->idx_pool, idx); +if (ret <0 ) +break ; } aso = true;break ;
Signature · 1 line
2.27.0
Hi,
Quoted 9 lines · Rongwei Liu
When destroying the
meter_markindirect action, PMD didn't recycle the ipool resources.Fixes 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")Signed-off-by Rongwei Liu <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh