Installing the MLNX_OFED Driver of the CX6 NIC
Obtaining the Installation Package
MLNX_OFED_LINUX-5.5-1.0.3.2-openeuler20.03-aarch64.tgz is used as an example.
Figure 1 Driver package
- Decompress the installation package.
1tar -zxvf MLNX_OFED_LINUX-5.5-1.0.3.2-openeuler20.03-aarch64.tgz
Figure 2 Decompressing the installation package
- Check the readme file and install dependencies.
1yum install perl pciutils python gcc-gfortran libxml2-python tcsh libnl.i686 libnl expat glib2 tcl libstdc++ bc tk gtk2 atk cairo numactl pkgconfig ethtool
- Install the driver.
1./mlnxofedinstall
Figure 3 Installing the driver
- Reboot the server after the installation is complete.
1reboot
Configuration
- Set OpenSM to support
virtualization .1vim /etc/opensm/opensm.confAdd the parameter for enabling virtualization to the file.1virt_enabled 2 # Enable virtualization.
Parameter description:
The parameter has the following configuration options:
0: Ignore Virtualization - No virtualization support
1: Disable Virtualization - Disable virtualization on all virtualization supporting ports
2: Enable Virtualization - Enable virtualization on all virtualization supporting ports
- Enable single-root I/O virtualization (SR-IOV).
1mst startFigure 4 Enabling SR-IOV
1mst statusFigure 5 Viewing service status
- Query the device status.
1mlxconfig -d /dev/mst/mt4125_pciconf0 q
Figure 6 NIC status
NUM_OF_VFS indicates the number of virtual functions (VFs) provided by the VM, and SRIOV_EN indicates whether to enable SR-IOV.
The command to adjust the settings is as follows:
1mlxconfig -d /dev/mst/mt4125_pciconf0 set SRIOV_EN=1 NUM_OF_VFS=4
Figure 7 Changing the number of VFs
Restart the server.
- Adapt to the device.
1mlxfwreset --device /dev/mst/mt4125_pciconf0 reset
Figure 8 Adapting to the NIC
- Set the VF parameter for the NIC.
1echo 2 >/sys/class/net/enp125s0f3/device/sriov_numvfs
- Check whether the installation is successful.
If common commands, such as ifconfig, ip a, lspci, and ibdev2netdev, can be used, the installation is successful.
Figure 9 Running the lspci command
Figure 10 Running the ibdev2netdev command
Parent topic: Common Operations