Compile MLNX_OFED 5.1-2.3.7.1 against Kernel 5.8.12?

Hej,

is there a quick fix to compile MLNX_OFED_LINUX-5.1-2.3.7.1-rhel8.2-x86_64 against Kernel 5.8.12?

Don’t get fooled by the Kernel name, it is CentOS 8.2 with a Fedora Kernel :)

CC [M] /tmp/MLNX_OFED_LINUX-5.1-2.3.7.1-5.8.12-100.fc31.x86_64/mlnx_iso.2710/OFED_topdir/BUILD/mlnx-ofa_kernel-5.1/obj/default/drivers/net/ethernet/mellanox/mlx5/core/en_sysfs.o

/tmp/MLNX_OFED_LINUX-5.1-2.3.7.1-5.8.12-100.fc31.x86_64/mlnx_iso.2710/OFED_topdir/BUILD/mlnx-ofa_kernel-5.1/obj/default/drivers/infiniband/core/umem_odp.c: In function ‘ib_umem_odp_map_dma_pages’:

/tmp/MLNX_OFED_LINUX-5.1-2.3.7.1-5.8.12-100.fc31.x86_64/mlnx_iso.2710/OFED_topdir/BUILD/mlnx-ofa_kernel-5.1/obj/default/drivers/infiniband/core/umem_odp.c:1132:25: error: ‘struct mm_struct’ has no member

down_read(&owning_mm->mmap_sem);

^~~~~~~~

mmap_base

/tmp/MLNX_OFED_LINUX-5.1-2.3.7.1-5.8.12-100.fc31.x86_64/mlnx_iso.2710/OFED_topdir/BUILD/mlnx-ofa_kernel-5.1/obj/default/drivers/infiniband/core/umem_odp.c:1163:23: error: ‘struct mm_struct’ has no member

up_read(&owning_mm->mmap_sem);

^~~~~~~~

mmap_base

/tmp/MLNX_OFED_LINUX-5.1-2.3.7.1-5.8.12-100.fc31.x86_64/mlnx_iso.2710/OFED_topdir/BUILD/mlnx-ofa_kernel-5.1/obj/default/drivers/infiniband/core/umem_odp.c: At top level:

cc1: warning: unrecognized command line option ‘-Wno-address-of-packed-member’

make[4]: *** [scripts/Makefile.build:281: /tmp/MLNX_OFED_LINUX-5.1-2.3.7.1-5.8.12-100.fc31.x86_64/mlnx_iso.2710/OFED_topdir/BUILD/mlnx-ofa_kernel-5.1/obj/default/drivers/infiniband/core/umem_odp.o] Error

make[4]: *** Waiting for unfinished jobs…

Greetings,

Bjoern

mlnx-ofa_kernel-5.1.rpmbuild.log (424 KB)

Well… I am aware that this Kernel is not supported but I was not asking if the Kernel is supported or not.

I was asking if there is an easy fix to get it compiled on this not supported Kernel

Not supported doesn’t mean it can’t be fixed. It would still be unsupported, but might work ;)

Hello Bjoern,

Thank you for posting your question on the Mellanox Community.

Unfortunately the kernel you are building the Mellanox OFED for is not a supported kernel.

You can find a list of supported OS and kernels as part of the release notes for the Mellanox OFED which can be found here:

https://docs.mellanox.com/display/OFED510660/General+Support+in+MLNX_OFED

Again thank you for your question and have a nice week.

Thank you,

Mellanox Technical Support.

Did you manage to get it working? Struggling with a similar issue on Ubuntu 20.04 / kernel 5.8