Ofa_kernel_headers alternatives use equal priority on Debian, causing DKMS modules to build against stale kernel headers

Hi,

On Debian 13.6 with MLNX_OFED 26.01.OFED.26.01.1.0.0.1, installing modules for a new kernel does not update /usr/src/ofa_kernel/default.

Header trees exist for all installed kernels, but every alternative has priority 17:

/usr/src/ofa_kernel/x86_64/6.12.73+deb13-amd64   priority 17
/usr/src/ofa_kernel/x86_64/6.12.74+deb13+1-amd64 priority 17
/usr/src/ofa_kernel/x86_64/6.12.96+deb13-amd64   priority 17

The issue is that auto mode keeps the link on the oldest kernel:

# readlink -f /usr/src/ofa_kernel/default
/usr/src/ofa_kernel-dkms/x86_64/6.12.73+deb13-amd64

The workaround is to set the link manually:

# update-alternatives --set ofa_kernel_headers \
  "/usr/src/ofa_kernel/x86_64/$(uname -r)"

Should the MLNX_OFED DKMS/package scripts update this alternative for the target kernel, or otherwise avoid registering every kernel tree with the same priority?

The stale link can cause dependent external modules to compile against the wrong OFED headers and Module.symvers.

Thanks!

Kilian

Hi Killian,

Thank you for posting your query on NVIDIA Community.

Based on the DOCA 3.3 documentation, Debian-based host installations use DKMS for driver builds. At the same time, the supported host OS matrix for DOCA 3.3 lists Debian 13.x only up to 13.3 (x<=3).

Since your setup is Debian 13.6, it is outside the published tested support matrix. When using an untested OS version, we cannot guarantee the package behavior or how the build flow will work, including alternative handling for OFED headers.

We recommend reproducing the issue on a supported matrix first, including supported OS, kernel, driver / DOCA-OFED or MLNX_OFED version, firmware, and the relevant dependent modules.

Relevant documentation:

If the same behavior is reproduced on a supported matrix and you need deeper investigation, please open an enterprise support case with a valid support entitlement.

For contracts, please reach out to Networking-Contracts@nvidia.com

Thanks,
NVEX Networking Technical Support Team