[PATCH 24.11] net/mlx5: fix min and max MTU reporting

Kevin Traynor ktraynor at redhat.com
Wed Nov 5 12:07:02 CET 2025


On 04/11/2025 17:27, Dariusz Sosnowski wrote:
> [ upstream commit 44d657109216a32e8718446f20f91272e10575dd ]
> 
> mlx5 PMD used hardcoded and incorrect values when reporting
> maximum MTU and maximum Rx packet length through rte_eth_dev_info_get().
> 
> This patch adds support for querying OS for minimum and maximum
> allowed MTU values. Maximum Rx packet length is then calculated
> based on these values.
> 
> On Linux, these values are queried through netlink,
> using IFLA_MIN_MTU and IFLA_MAX_MTU attributes added in Linux 4.18.
> 
> Windows API unfortunately does not expose minimum and maximum
> allowed MTU values. In this case, fallback hardcoded values
> (working on currently supported HW) will be used.
> 
> Bugzilla ID: 1719
> Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
> ---
>  drivers/common/mlx5/linux/mlx5_nl.c       | 108 ++++++++++++++++++++++
>  drivers/common/mlx5/linux/mlx5_nl.h       |   3 +
>  drivers/common/mlx5/version.map           |   1 +
>  drivers/net/mlx5/linux/mlx5_ethdev_os.c   |  30 ++++++
>  drivers/net/mlx5/linux/mlx5_os.c          |   2 +
>  drivers/net/mlx5/mlx5.h                   |  13 +++
>  drivers/net/mlx5/mlx5_ethdev.c            |  42 ++++++++-
>  drivers/net/mlx5/windows/mlx5_ethdev_os.c |  28 ++++++
>  drivers/net/mlx5/windows/mlx5_os.c        |   2 +
>  9 files changed, 228 insertions(+), 1 deletion(-)

Thanks Dariusz. I pushed this to 24.11 branch.



More information about the stable mailing list