Unable to build OFED from sources for Linux kernel 4.14

Hi,

I have a ConnectX-3 Pro NIC and trying to use it with dpdk.

Since I have a 4.14.14-1.el7.elrepo.x86_64 kernel I tried to use rdma-core_v16 first.

I successfully built rpm’s and installed them.

After that I built dpdk with Mellanox support but unfortunately a testpmd runs with error:


PMD: net_mlx4: 0xda13c0: cannot attach flow rules (code 95, "Operation

not supported"), flow error type 2, cause 0x7f2869cdab80, message:

flow rule rejected by device


I also have a server with older kernel and MLX OFED installed and testpmd runs normally on it.

So I decided to try MLX OFED on server with kernel 4.14 too.

I downloaded OFED sources and tried to build drivers but during compilation got several errors, like:


CC [M] /var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/infiniband/core/umem.o

/var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/net/ethernet/mellanox/mlx4/en_netdev.c:4149:2: error: initialization from incompatible pointer type [-Werror]

.ndo_setup_tc = mlx4_en_setup_tc,

^

/var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/net/ethernet/mellanox/mlx4/en_netdev.c:4149:2: error: (near initialization for ‘mlx4_netdev_base_ops.ndo_setup_tc’) [-Werror]

CC [M] /var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/net/ethernet/mellanox/mlx4/en_clock.o

cc1: all warnings being treated as errors

make[3]: *** [/var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/net/ethernet/mellanox/mlx4/en_netdev.o] Error 1

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

CC [M] /var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/net/ethernet/mellanox/mlx5/core/dev.o

In file included from /var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/infiniband/core/umem_rbtree.c:36:0:

/var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/infiniband/core/umem_rbtree.c:71:33: error: conflicting types for ‘rbt_ib_umem_insert’

node_start, node_last, , rbt_ib_umem)

^

include/linux/interval_tree_generic.h:68:15: note: in definition of macro ‘INTERVAL_TREE_DEFINE’

ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, \

^

In file included from /var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/infiniband/core/umem_rbtree.c:39:0:

/var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/include/rdma/ib_umem_odp.h:131:6: note: previous declaration of ‘rbt_ib_umem_insert’ was here

void rbt_ib_umem_insert(struct umem_odp_node *node, struct rb_root *root);

^

In file included from /var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/infiniband/core/umem_rbtree.c:36:0:

/var/tmp/OFED_topdir/BUILD/mlnx-ofa_kernel-4.2/obj/default/drivers/infiniband/core/umem_rbtree.c:71:33: error: conflicting types for ‘rbt_ib_umem_remove’

node_start, node_last, , rbt_ib_umem)

^

include/linux/interval_tree_generic.h:95:15: note: in definition of macro ‘INTERVAL_TREE_DEFINE’

ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, \

^

The full log file is attached.

How to solve these compilation errors?

mlnx-ofa_kernel-4.2.rpmbuild.log.zip (40.6 KB)

Please, check this link for the list of supported features by the card - 1. Overview of Networking Drivers — Data Plane Development Kit 18.02.0-rc1 documentation http://dpdk.org/doc/guides/nics/overview.html#id1

Kernel 4.14 is currently not supported, you might check supported configuration in Mellanox OFED v4.2 release notes - http://www.mellanox.com/related-docs/prod_software/Mellanox_OFED_Linux_Release_Notes_4_2-1_2_0_0.pdf http://www.mellanox.com/related-docs/prod_software/Mellanox_OFED_Linux_Release_Notes_4_2-1_2_0_0.pdf