Juniper vMX – Error: Check I40E Drivers

NOTE: I originally published this page in 2018; instructions may now be out of date.

When starting a Juniper vMX router you may get an error from the script that shows that the I40E drivers could not be checked. The error looks like this:

Check I40E drivers................................[Failed]
Log file........................................../home/vMX-17.4R1/build/vmx1/logs/vmx_1522202000.log
 Aborted!. 1 error(s) and 1 warning(s)

The first thing to do is check the log file contained in the error message. The most common cause is a compile error with the I40E module that Juniper distributes with the vMX.

Errors compiling the i40e module

When deploying release 17.4R1 on a CentOS 7.2 or 7.4 host, I got the following error from the log files:

Check I40E drivers................................
[Command] cd /home/vMX-17.4R1/drivers/i40e-1.3.46/src

[Command] rm -f i40e.ko

[Command] make install
make[1]: Entering directory `/usr/src/kernels/3.10.0-327.el7.x86_64'
  CC [M]  /home/vMX-17.4R1/drivers/i40e-1.3.46/src/i40e/i40e_main.o
/home/vMX-17.4R1-S2/drivers/i40e-1.3.46/src/i40e/i40e_main.c: In function ‘i40e_ndo_bridge_getlink’:
/home/vMX-17.4R1-S2/drivers/i40e-1.3.46/src/i40e/i40e_main.c:9086:2: error: too few arguments to function ‘ndo_dflt_bridge_getlink’
  return ndo_dflt_bridge_getlink(skb, pid, seq, dev, veb->bridge_mode);
In file included from include/net/dst.h:13:0,
                 from include/net/sock.h:68,
                 from include/linux/tcp.h:23,
                 from include/net/tcp.h:24,
                 from /home/vMX-17.4R1-S2/drivers/i40e-1.3.46/src/i40e/i40e.h:30,
                 from /home/vMX-17.4R1-S2/drivers/i40e-1.3.46/src/i40e/i40e_main.c:28:
include/linux/rtnetlink.h:87:12: note: declared here
 extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
/home/vMX-17.4R1/drivers/i40e-1.3.46/src/i40e/i40e_main.c:9088:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [/home/vMX-17.4R1/drivers/i40e-1.3.46/src/i40e/i40e_main.o] Error 1
make[1]: *** [_module_/home/vMX-17.4R1/drivers/i40e-1.3.46/src/i40e] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-327.el7.x86_64'
make: *** [i40e/i40e.ko] Error 2

The source that Juniper distributes with the vMX releases prior to 18.1R1 is missing a definition that is required for them to be compiled on CentOS hosts.

Edit the file drivers/i40e-1.3.46/src/i40e/kcompat.h. Search for the line #define NDO_DFLT_BRIDGE_GETLINK_HAS_BRFLAGS and add the following after that line:


There should be two occurances of that, both occurances need the line added. The diff for the vMX release I am deploying is:

[root@server vMX-17.4R1]# diff drivers/i40e-1.3.46/src/i40e/kcompat.h drivers/i40e-1.3.46/src/i40e/kcompat.h.original

You can then try installing the vMX again.

Kernel header files not in expected locations

The error from the log file will look like this:

[Command] make install
Makefile:69: *** Kernel header files not in any of the expected locations.
Makefile:70: *** Install the appropriate kernel development package, e.g.
Makefile:71: *** kernel-devel, for building kernel modules and try again.  Stop.

Make sure that the kernel-devel package is installed: yum install kernel-devel

If you get a message from yum saying that the package is already installed, check to make sure that the kernel version running matches the devel package version. If it doesn’t match, you will need to manually install the correct kernel-devel package for the kernel version that is running. In my case, I was running the kernel version 3.10.0-327.el7.x86_64 which was not the latest available. The package repositories I configured did not have the older version of the kernel header files that I needed, so I had to download the package manually and install it:

cd /usr/local/src
yum install kernel-devel-3.10.0-327.el7.x86_64.rpm

Leave a Reply

Your email address will not be published. Required fields are marked *