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- directory.

See log file /tmp/mlnx-en-4.6-

Checking if all needed packages are installed…

Building mlnx-en DEBS . Please wait…

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

ERROR: See /tmp/mlnx-en-4.6-

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- 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?