Manufacturing - Mellanox

Question: I installed a Mellanox ConnectX-4 Lx EN Ethernet card on my Linux server, but the NIC card is not recognized by the system. How can I install a driver for Mellanox ConnectX-4 NIC on ?

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.

Preparation

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

$ sudo apt-get install debhelper autotools-dev dkms zlib1g-dev gcc make patch gcc-c++

Install dependencies on CentOS, Fedora or Red Hat

$ sudo yum install gcc make patch gcc-c++ redhat-rpm-config rpm-build

Install dependencies on OpenSUSE

$ sudo zypper install gcc make patch gcc-c++ kernel-syms

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.

$ tar -xf mlnx-en-3.3-1.0.0.0.tgz

$ cd mlnx-en-3.3-1.0.0.0

$ sudo ./install.sh

Once installation is completed, the script then queries the Mellanox NIC's firmware, and updates outdated firmware automatically.

The installed NIC driver for Mellanox ConnectX-4 EN is named mlx4_en. Verify that is is successfully loaded as follows.

$ lsmod | grep mlx4

$ modinfo mlx4_en

source: http://ask.xmodulo.com/install-device-driver-mellanox-ethernet-card-linux.html