[PATCH] net/mlx5: fix interface name parameter definition
Stephen Hemminger
stephen at networkplumber.org
Mon Aug 11 06:44:20 CEST 2025
On Sun, 10 Aug 2025 16:22:59 +0300
Gregory Etelson <getelson at nvidia.com> wrote:
> The patch fixes `ifname` parameter as a character buffer.
>
> Fixes: 1256805dd54d ("net/mlx5: move Linux-specific functions")
>
> Signed-off-by: Gregory Etelson <getelson at nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> ---
This looks better but did you know that the ifname can never be as big as MLX5_NAMESIZE.
Kernel limits to IFNAMSIZ (ie 16). The largest allowable interface name in Linux is 15 characters.
Looks like:
MLX5_NAMESIZE := MXL5_FS_NAME_MAX := IBV_SYSFS_NAME_MAX + 1 = 64 + 1 = 65
Because Linux interface name length is fixed by BSD legacy ABI's it will never be longer.
More information about the dev
mailing list