All Products
Search
Document Center

Elastic Compute Service:Use the VFIO driver instead of the UIO driver

Last Updated:Jan 27, 2026

This topic explains how to use the VFIO driver instead of the UIO driver on Elastic Compute Service (ECS) and Elastic Compute Service Bare Metal instances to resolve runtime issues with Data Plane Development Kit (DPDK) applications.

Prerequisites

Background information

When you deploy DPDK applications on sixth-generation instance types (such as g6, c6, and r6) and later, including General-purpose compute instance types, you may encounter runtime errors. For example, when using the pktgen-dpdk tool for packet forwarding tests, the tool may fail to detect the Network Interface Controller (NIC) bound to the igb_uio driver. If you receive the following error message, use the VFIO driver instead of the UIO driver to resolve the issue.

EAL: eal_parse_sysfs_value(): cannot open sysfs value /sys/bus/pci/devices/0000:00:06.0/uio/uio0/portio/port0/start

Procedure

  1. Connect to your ECS instance or ECS Bare Metal Instance.

    For more information, see Connect to a Linux instance using Workbench.

  2. Check the GRand Unified Bootloader (GRUB) configuration.

    cat /proc/cmdline
    • If the GRUB configuration includes intel_iommu=on and does not include iommu=pt, go to Step 4.

    • Otherwise, continue to Step 3 to modify the configuration.

      As shown in the following figure, the GRUB configuration includes neither intel_iommu=on nor iommu=pt, so you need to add intel_iommu=on.

      image.png

  3. Add intel_iommu=on to the /etc/default/grub configuration file.

    1. Open the configuration file.

      sudo vim /etc/default/grub
    2. Press i to enter insert mode, add intel_iommu=on to the GRUB_CMDLINE_LINUX parameter, and then save and close the file.

      The following figure shows an example of the modified configuration.grub-config

    3. Apply the new configuration.

      sudo grub2-mkconfig -o /boot/grub2/grub.cfg

      image.png

    4. Run the following command to restart the instance. After the instance restarts, connect to it again.

      reboot
      Warning

      The restart operation stops the instance for a short period of time and may interrupt services that are running on the instance. We recommend that you restart the instance during off-peak hours.

  4. Load the VFIO and VFIO-PCI drivers.

    sudo modprobe vfio && \
    sudo modprobe vfio-pci
  5. Configure the noiommu_mode.

    sudo bash -c 'echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode'
  6. View and record the bus-info value of the NIC.

    ethtool -i ethX

    Replace ethX with the target NIC's ID. The following figure shows an example for the eth1 NIC.bus-info

  7. To bind the NIC to the vfio-pci driver, navigate to the usertools directory in your DPDK installation directory and run the following command.

    sudo ./dpdk-devbind.py -b vfio-pci 0000:00:06.0
    Note

    0000:00:06.0 is the bus-info value that specifies the target NIC. Replace it with your actual value.

    After the binding is complete, you can run ./dpdk-devbind.py --status to check the binding status. The following example output indicates that the NIC at 0000:00:06.0 is bound to the vfio-pci driver.bound-status

  8. To start the DPDK application, navigate to the build/app directory in your DPDK installation directory, and then run the command for your DPDK version.

    • For DPDK 18.02 and later:

      sudo ./testpmd -w 0000:00:06.0 -c 0x3 -- --total-num-mbufs=2048 -ai
    • For versions earlier than DPDK 18.02:

      sudo ./testpmd -w 0000:00:06.0 -c 0x3 -- --total-num-mbufs=2048 --disable-hw-vlan -ai
    Note

    In the command, -w 0000:00:06.0 specifies the NIC and total-num-mbufs=2048 must match the configured HugePages size. Replace these values with your actual values.

    The following figure shows an example of a running DPDK application.run-dpdk