Compilation with recent Kernels

Hi community,

We need to compile the OFED with Linux Kernel 5.1 instead of Ubuntu 18.04’s kernel version as we need features of that version.

However installing the OFED raises many errors which were fine before the update.

Would it be possible to get a backported patch? Or if anybody has fixed those ?

/var/tmp/mlnx-ofed-kernel/mlnx-ofed-kernel-4.6/include/net/tc_act/tc_mirred.h: In function ‘is_tcf_mirred_compat’:

/var/tmp/mlnx-ofed-kernel/mlnx-ofed-kernel-4.6/include/net/tc_act/tc_mirred.h:34:22: error: ‘const struct tc_action_ops’ has no member named ‘type’

if (a->ops && a->ops->type == TCA_ACT_MIRRED)

^~

/var/tmp/mlnx-ofed-kernel/mlnx-ofed-kernel-4.6/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function ‘mlx5e_rep_netevent_event’:

/var/tmp/mlnx-ofed-kernel/mlnx-ofed-kernel-4.6/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:743:35: warning: unused variable ‘neigh_update’ [-Wunused-variable]

struct mlx5e_neigh_update_table *neigh_update = &rpriv->neigh_update;

…and following…

Thanks,

Tom

Hi Tom,

Mellanox OFED 4.6 doesn’t officially support kernel 5.1 as you can see.

1.Try to change type to id

(a->ops && a->ops->id)

2.Regarding the warning you can build the driver separately (install the RPM) and add C flags to disable the warning -Wno-unused-variable

Br,

Marc