Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the MLNX_OFED Driver of the CX6 NIC

Prerequisites

If the OS is not connected to the Internet, you need to configure the OS yum, APT, or Zypper source.

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
  1. Decompress the installation package.
    1
    tar -zxvf MLNX_OFED_LINUX-5.5-1.0.3.2-openeuler20.03-aarch64.tgz
    
    Figure 2 Decompressing the installation package
  2. Check the readme file and install dependencies.
    1
    yum install perl pciutils python gcc-gfortran libxml2-python tcsh libnl.i686 libnl expat glib2 tcl libstdc++ bc tk gtk2 atk cairo numactl pkgconfig ethtool
    
  3. Install the driver.
    1
    ./mlnxofedinstall
    
    Figure 3 Installing the driver
  4. Reboot the server after the installation is complete.
    1
    reboot
    

Configuration

  1. Set OpenSM to support virtualization .
    1
    vim /etc/opensm/opensm.conf
    
    Add the parameter for enabling virtualization to the file.
    1
    virt_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

  2. Enable single-root I/O virtualization (SR-IOV).
    1
    mst start
    
    Figure 4 Enabling SR-IOV
    1
    mst status
    
    Figure 5 Viewing service status
  3. Query the device status.
    1
    mlxconfig -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:

    1
    mlxconfig -d /dev/mst/mt4125_pciconf0 set SRIOV_EN=1 NUM_OF_VFS=4
    
    Figure 7 Changing the number of VFs

    Restart the server.

  4. Adapt to the device.
    1
    mlxfwreset --device /dev/mst/mt4125_pciconf0 reset
    
    Figure 8 Adapting to the NIC
  5. Set the VF parameter for the NIC.
    1
    echo 2 >/sys/class/net/enp125s0f3/device/sriov_numvfs
    
  6. 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