Re: [PATCH net v1] net/mlx5: Fix HWS L2-to-L3 tunnel reformat release

From: Yevgeny Kliteynik

Date: Thu May 07 2026 - 06:06:26 EST


On 05-May-26 19:26, Alexander Lobakin wrote:
From: Prathamesh Deshpande <prathameshdeshpande7@xxxxxxxxx>
Date: Mon, 4 May 2026 23:19:17 +0100

mlx5_cmd_hws_packet_reformat_alloc() allocates
MLX5_REFORMAT_TYPE_L2_TO_L3_TUNNEL objects from el2tol3tnl_pools with
MLX5HWS_ACTION_TYP_REFORMAT_L2_TO_TNL_L3.

The deallocation path uses el2tol2tnl_pools with
MLX5HWS_ACTION_TYP_REFORMAT_L2_TO_TNL_L2 instead. This releases the
packet-reformat entry through the wrong pool, corrupting pool accounting
and potentially moving the bulk entry onto the wrong pool list.

Use the matching L2-to-L3 tunnel pool and action type when releasing the
object.

Fixes: aecd9d1020e3 ("net/mlx5: fs, add HWS packet reformat API function")
Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@xxxxxxxxx>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>


Reviewed-by: Yevgeny Kliteynik <kliteyn@xxxxxxxxxx>

---
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Thanks,
Olek