[PATCH] net/mlx5: fix jump ipool entry size

Suanming Mou suanmingm at nvidia.com
Fri Sep 22 02:20:31 CEST 2023


Thanks.

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Sent: Saturday, August 26, 2023 2:44 AM
> To: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Ori Kam <orika at nvidia.com>; Suanming Mou
> <suanmingm at nvidia.com>
> Cc: dev at dpdk.org; stable at dpdk.org
> Subject: [PATCH] net/mlx5: fix jump ipool entry size
> 
> In mlx5 PMD, MLX5_IPOOL_JUMP ipool configuration is used to initialize the ipool
> containing either:
> 
> - flow table entry when DV flow engine is chosen or,
> - group table entry when HW steering flow engine is chosen.
> 
> Default configuration for MLX5_IPOOL_JUMP ipool specified entry size as size of
> mlx5_flow_tbl_data_entry struct, used with DV flow engine.
> This could lead to memory corruption when mlx5_flow_group struct (used with
> HW steering flow engine) would have bigger size than mlx5_flow_tbl_data_entry.
> 
> This patch fixes that. Entry size for MLX5_IPOOL_JUMP ipool is chosen
> dynamically based on device configuration.
> 
> Fixes: d1559d66ed2d ("net/mlx5: add table management")
> Cc: suanmingm at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Suanming Mou <suanmingm at nvidia.com>

> ---
>  drivers/net/mlx5/mlx5.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index
> b373306f98..7c79cbb7be 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c


More information about the stable mailing list