How to install MLNX_EN driver for Linux. Getting a re-definition of a C function as error in error log.

I added an extra version paramter in Make to and re-compiled my kernel and the hence the name of my kernel is 5.0.2napi-wgt0. However, it is the same as the regular 5.0.2 kernel with a very few changes such as changing certain kernel parameters. I am not sure what is causing this error with installation. Error log is attached.

./install --without-fw-update --add-kernel-support

Note: This program will create mlnx-en TGZ for ubuntu16.04 under /tmp/mlnx-en-4.6-1.0.1.1-5.0.2napi-wgt-0 directory.

See log file /tmp/mlnx-en-4.6-1.0.1.1-5.0.2napi-wgt-0/mlnx_iso.8958_logs/mlnx_ofed_iso.8958.log

Checking if all needed packages are installed…

Building mlnx-en DEBS . Please wait…

ERROR: Failed executing “MLNX_EN_SRC-4.6-1.0.1.1/install.pl --tmpdir /tmp/mlnx-en-4.6-1.0.1.1-5.0.2napi-wgt-0/mlnx_iso.8958_logs --kernel-only --kernel 5.0.2napi-wgt-0 --kernel-sources /lib/modules/5.0.2napi-wgt-0/build --builddir /tmp/mlnx-en-4.6-1.0.1.1-5.0.2napi-wgt-0/mlnx_iso.8958 --without-dkms --without-debug-symbols --build-only --distro ubuntu16.04”

ERROR: See /tmp/mlnx-en-4.6-1.0.1.1-5.0.2napi-wgt-0/mlnx_iso.8958_logs/mlnx_ofed_iso.8958.log

Failed to build mlnx-en for 5.0.2napi-wgt-0

mlnx-ofed-kernel.debbuild.log (246 KB)

Hi Aketh,

According to the log tc_en.c failed to compile due to redefinition of switchdev_parent_id structure:

“/tmp/mlnx-en-4.6-1.0.1.1-5.0.2napi-wgt-0/mlnx_iso.8958/mlnx-ofed-kernel/mlnx-ofed-kernel-4.6/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:87:13: error: redefinition of ‘switchdev_port_same_parent_id’”

Can you elaborate on the changes you performed in the kernel?

Were you able to install the driver before modifying the kernel?

Regards,

Chen