> -----Original Message----- > From: Maayan Kashani <[email protected]> > Sent: Sunday, October 18, 2026 10:55 AM > To: [email protected] > Cc: Maayan Kashani <[email protected]>; Raslan Darawsheh > <[email protected]>; [email protected]; Dariusz Sosnowski > <[email protected]>; Slava Ovsiienko <[email protected]>; Bing > Zhao <[email protected]>; Ori Kam <[email protected]>; Suanming Mou > <[email protected]>; Matan Azrad <[email protected]>; Alexander > Kozyrev <[email protected]> > 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: [email protected] > > Signed-off-by: Maayan Kashani <[email protected]>
Acked-by: Dariusz Sosnowski <[email protected]> Best regards, Dariusz Sosnowski

