[PATCH] net/mlx5: fix meter ASO action leak on release to pool
Raslan Darawsheh
rasland at nvidia.com
Tue Mar 24 13:22:14 CET 2026
Hi,
On 15/03/2026 10:36 AM, Shani Peretz wrote:
> flow_dv_aso_mtr_release_to_pool() uses memset to zero the entire
> mlx5_flow_meter_info struct when returning a meter to the free pool.
> This erases the meter_action_g and meter_action_y pointers without
> calling destroy_flow_action on the underlying DR ASO actions.
>
> The leak compounds on repeated meter create/destroy cycles because
> the caching check in flow_dv_mtr_alloc() — if (!fm.meter_action_g) —
> always sees NULL and allocates a new action every time instead of
> reusing the existing one.
> At shutdown, mlx5_aso_flow_mtrs_mng_close() also skips destruction
> since the pointers are already NULL.
>
> Fixed by saving and restoring meter_action_g and meter_action_y across
> the memset so the cached actions survive pool recycling and are
> properly destroyed only at shutdown.
>
> Fixes: e6100c7b6226 ("net/mlx5: add flow meter pool to manage meter object")
> Cc: stable at dpdk.org
>
> Signed-off-by: Shani Peretz <shperetz at nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
More information about the dev
mailing list