Mellanox provides a wide range of high-speed interconnection solutions including Gigabit Ethernet cards and InfiniBand adapter cards. ConnectX-4 EN is one of Mellanox' flagship Ethernet adapters offering 10/25/40/50/100GbE speed. To meet the stringent demand of today's data center interconnection environments, Mellanox ConnectX-4 provides a multitude of powerful features such as SR-IOV I/O virtualization, NVGRE/VxLAN hardware offload, RDMA over Converged Ethernet, Erasure Coding offload, etc.
As of today device drivers for Mellanox ConnectX product series are not part of Linux distributions. Therefore if you want to use a ConnectX card (e.g., ConnectX-4 Lx EN), you need to build and install the driver.
Fortunately, Mellanox does a pretty good job making sure that their NIC card is accessible on all major operating system platforms via up-to-date drivers.
Here is how to compile and install Mellanox ConnectX-4 EN driver (mlx4_en) on Linux. Other Mellanox card drivers can be installed in a similar fashion.
Before building the Mellanox driver, first set up a necessary build environment by installing dependencies as follows.
Install dependencies on Debian, Ubuntu or Linux Mint
Install dependencies on CentOS, Fedora or Red Hat
Install dependencies on OpenSUSE
Compile and Install Mellanox ConnectX-4 Driver
Download the latest device driver for Mellanox ConnectX-4 card from the official website. The driver's tarball contains the device driver's source code as well as the latest NIC firmware.
Extract the tarball, and run the installation script (install.sh) as root.
$ cd mlnx-en-3.3-188.8.131.52
$ sudo ./install.sh
The script builds the Mellanox NIC driver from the source, and installs it.
Once installation is completed, the script then queries the Mellanox NIC's firmware, and updates outdated firmware automatically.
Finally, any previously installed mlnx module is unloaded and the new Mellanox NIC driver is loaded.
The installed NIC driver for Mellanox ConnectX-4 EN is named mlx4_en. Verify that is is successfully loaded as follows.
$ modinfo mlx4_en
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!