[PATCH] net/mlx5: destroy DR domains after ASO close

Dariusz Sosnowski dsosnowski at nvidia.com
Fri Nov 27 10:44:25 CET 2026


On Wed, Nov 11, 2026 at 03:34:52PM +0200, Bing Zhao wrote:
> ASO age, meter and connection tracking actions are created in the
> shared DR domains and released only when the ASO management is
> closed. That close runs in mlx5_free_shared_dev_ctx(), while the
> domains are destroyed earlier in mlx5_os_free_shared_dr(). Freeing
> a domain-bound action after the domain is gone crashes on close.
> 
> The domains belong to the shared context, as the ASO managers do.
> Destroy them in mlx5_free_shared_dev_ctx() after the ASO managers.
> One port close then cannot drop them while another port still uses
> the shared context.
> 
> Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")
> Fixes: c99b4f8bc2f1 ("net/mlx5: support ASO meter action")
> Fixes: ce12974cce72 ("net/mlx5: fix ASO CT object release")
> Cc: stable at dpdk.org
> 
> Suggested-by: Matan Azrad <matan at nvidia.com>
> Signed-off-by: Bing Zhao <bingz at nvidia.com>

[snip]

> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index e2dbd2977b..4168d62039 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -2130,6 +2130,12 @@ mlx5_free_shared_dev_ctx(struct mlx5_dev_ctx_shared *sh)
>  	}
>  	if (sh->mtrmng)
>  		mlx5_aso_flow_mtrs_mng_close(sh);
> +	/*
> +	 * DR domains belong to the shared context, as the ASO managers do.
> +	 * ASO steering actions are created in these domains, so destroy the
> +	 * domains only after those actions are released.
> +	 */
> +	mlx5_os_free_shared_domains(sh);

nit: In my opinion, this comment is redundant and can be removed
When this function must be called is already documented in
function declaration

[snip]

Other than that:

Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>


More information about the stable mailing list