[PATCH] net/mlx5: fix HWS meter ASO SQ leak on multi-port init

Dariusz Sosnowski dsosnowski at nvidia.com
Mon Oct 19 10:11:00 CEST 2026


> -----Original Message-----
> From: Maayan Kashani <mkashani at nvidia.com>
> Sent: Sunday, October 18, 2026 10:55 AM
> To: dev at dpdk.org
> Cc: Maayan Kashani <mkashani at nvidia.com>; Raslan Darawsheh
> <rasland at nvidia.com>; stable at dpdk.org; Dariusz Sosnowski
> <dsosnowski at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>; Bing
> Zhao <bingz at nvidia.com>; Ori Kam <orika at nvidia.com>; Suanming Mou
> <suanmingm at nvidia.com>; Matan Azrad <matan at nvidia.com>; Alexander
> Kozyrev <akozyrev at nvidia.com>
> Subject: [PATCH] net/mlx5: fix HWS meter ASO SQ leak on multi-port init
> 
> When multiple ports on the same device initialize HWS meters via
> rte_flow_configure(), mlx5_aso_mtr_queue_init() recreates the shared
> pools_mng ASO send queue without destroying the previous one. Each
> additional port with meters configured leaks one SQ/CQ pair until the shared
> device context is torn down.
> 
> This is observed as steady growth of hugepage allocations (dump socket_mem
> count alloc) when repeatedly attaching and detaching a device with multiple SF
> representors configured with meters in HWS mode.
> 
> Create pools_mng.sq only when its DevX object is missing. A send-queue id of
> zero is valid, so sqn cannot be used as the existence check.
> 
> Do not destroy that queue from mlx5_flow_meter_uninit(). It is shared by every
> port on the device, and releasing it when one port closes breaks meters still
> configured on the others. The queue is released with the shared context in
> mlx5_aso_flow_mtrs_mng_close().
> 
> Fixes: 24865366e495 ("net/mlx5: support flow meter action for HWS")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Maayan Kashani <mkashani at nvidia.com>

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

Best regards,
Dariusz Sosnowski


More information about the stable mailing list