Using Gazelle to Take Over Network Interfaces
Bind a network interface to the user mode to allow the user-mode NIC driver to access NIC resources, thereby achieving higher network performance than kernel-mode network interfaces.
The procedure described in this section applies to Huawei Hi1822 NICs. If CX4 NICs are used, go to Modifying the Gazelle Configuration File after performing 1 and 2.
You can run the lspci |grep -i net command to query the NIC model.
- Enable the no-IOMMU mode of the Virtual Function I/O (VFIO) module.
1modprobe vfio enable_unsafe_noiommu_mode=1
- Load the vfio-pci driver.
1modprobe vfio-pci - Check available network interfaces on the current device.
1ip a - The command output shows that enp125s0f0 and enp3s0 are available.

- Query and record the NIC driver and the corresponding PCI address.
1ethtool -i enp3s0

- Check the name of the service network interface to be bound and disable this interface. In this example, the name of the service network interface is enp3s0.
Before running this command, check and record the MAC address of this network interface.
1ip link set enp3s0 down
- Bind the network interface to the vfio-pci driver.
1dpdk-devbind -b vfio-pci enp3s0
- After the network interface is bound, check network interfaces on the current device again.
1ip a - View the command output. It shows that the bound interface enp3s0 is not included in the available network interface list.

To unbind a NIC, perform the following steps:
- Check the network interface status. As shown in the preceding figure, the NIC whose PCI address is 0000:03:00.0 has been taken over by the DPDK.
1dpdk-devbind -s
- Bind the network interface to the driver queried in 5.
1dpdk-devbind -b hinic 0000:03:00.0
- Enable this network interface.
1ip link set enp3s0 up
- Check the network interface status. As shown in the preceding figure, the NIC whose PCI address is 0000:03:00.0 has been taken over by the DPDK.
Parent topic: Manual Configuration

