nvidia-peermem: Prefer ofa_kernel-dkms path for DOCA-OFED headers#1018
nvidia-peermem: Prefer ofa_kernel-dkms path for DOCA-OFED headers#1018blochl wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
|
@blochl I believe the original version for specifying the DOCA-OFED kernel path might be better. The main reason I feel this way is I am worried about the scenario where after installing a DKMS kernel, the user decides to install the non-DKMS kernel without cleaning up the previous DKMS kernel install. I believe that can leave |
The kernel build system normalizes x86_64 to x86 via scripts/subarch.include, but MOFED directories use the `uname -m` name x86_64. Add the missing mapping, consistent with the existing arm64 -> aarch64 and powerpc -> ppc64le entries. Without this, OFA_ARCH is set to x86 on x86_64 systems. Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
Since DOCA 3.2.0, DKMS is the default OFED drivers' installation method. These store the headers in /usr/src/ofa_kernel-dkms/ and create symlinks from /usr/src/ofa_kernel/ for backward compatibility. Using the -dkms path directly is more robust as it contains the actual files, avoiding potential issues with symlinks that may be missing, broken, or not yet created during package installation. Add ofa_kernel-dkms as the highest-priority candidate, drop the /var/lib/dkms/mlnx-ofed-kernel/ fallback whose directory structure never matched the expected layout, and replace the shell for-loop with $(firstword $(wildcard ...)) to match the pattern used by OFED's own DKMS submodules. Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
|
@Binary-Eater, Thanks for the review! |
New DKMS-based DOCA-OFED installations store headers in
/usr/src/ofa_kernel-dkms/and create symlinks from/usr/src/ofa_kernel/for backward compatibility.Using the
...-dkmspath directly is more robust as it contains the actual files, avoiding potential issues with symlinks that may be missing, broken, or not yet created during package installation.