6.8 Kernel Breaking Changes on Mellanox OFED 5.8

1. Linux kernel recently dropped the strlcpy function

Compilation Error

/home/ubuntu/mellanox/mlnx-en-5.8-5.1.1.2-ubuntu22.04-x86_64/src/MLNX_EN_SRC-5.8-5.1.1.2/SOURCES/mlnx-en-5.8/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:46.o:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]                                              htool.o
   46 |         strlcpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver));                                                                                  n function ‘mlx5e_ethtool_get_drvinfo’:
      |         ^~~~~~~                                                                                                                                             :9: error: implicit declaration of function ‘strlcpy’; did you mean ‘s
      |         strscpy

Fix for this is to replace strlcpy with strscpy

Reference: Merge tag 'strlcpy-removal-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux - kernel/git/torvalds/linux.git - Linux kernel source tree

2. uuid_le was was moved to MEI namespace in the newer kernels

Compilation Error

/var/lib/dkms/mlnx-en/5.8/build/include/linux/mod_devicetable.h:725:9: error: unknown type name 'uuid_le'
  725 |         uuid_le uuid;
      |         ^~~~~~~

include/linux/uuid.h used to import “uapi/linux/uuid.h” which had uuid_le definition in the previous releases.

  • 5.15 Kernel: git.launchpad .net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/tree/include/linux/uuid.h?h=Ubuntu-5.15.0-125.135
  • 6.8 Kernel: git.launchpad .net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble/tree/include/linux/uuid.h?h=Ubuntu-6.8.0-38.38

Fix for now is to simply import uapi/linux/uuid.h in places uuid_le is required

Reference:

3. xdp_do_flush_map was removed

Compilation Error

/home/ubuntu/mellanox/mlnx-en-5.8-5.1.1.2-ubuntu22.04-x86_64/src/MLNX_EN_SRC-5.8-5.1.1.2/SOURCES/mlnx-en-5.8/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:630:17: error
: implicit declaration of function ‘xdp_do_flush_map’; did you mean ‘xdp_do_flush’? [-Werror=implicit-function-declaration]
  630 |                 xdp_do_flush_map();                                          
      |                 ^~~~~~~~~~~~~~~~  
      |                 xdp_do_flush      

Fix is to use xdp_do_flush

Reference:

Is there plan for OFED 5.8 to have these changes to support the 6.8 kernel any time in the future?

Any idea when 24.10 LTS would be released? 24.07 is compatible with 6.8 kernel.

Hello @abhinavms,

Thank you for posting your query on our community. Please note that MLNX_OFED v24.07-0.6.1.0 and later versions provide support for Linux kernel 6.8 as indicated in our driver release notes:
https://docs.nvidia.com/networking/display/mlnxofedv24070610/general+support

To answer your second query, MLNX_OFED v24.10 has also been released last month and is available for download. Here is the link to the driver release notes for that version:
https://docs.nvidia.com/networking/display/mlnxofedv24100700/general+support

Thanks,
Bhargavi

1 Like

Thanks for the info @sribhargavid!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.