All Products
Search
Document Center

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

Last Updated:Apr 27, 2026

Replace the UIO driver with the VFIO driver on ECS and ECS Bare Metal Instance (EBM) to fix DPDK runtime errors.

Prerequisites

  • Huge pages are configured on the instance.

  • DPDK is installed on the instance.

Background

DPDK applications on sixth-generation instance types (such as g6, c6, and r6) and later may encounter runtime errors. For example, pktgen-dpdk may fail to detect the NIC bound to the igb_uio driver. If you see the following error, replace the UIO driver with the VFIO driver.

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 or EBM instance. See Log on to a Linux instance using Workbench.

  2. Check the GRUB configuration.

    cat /proc/cmdline
    • If the output includes intel_iommu=on but not iommu=pt, skip to Step 4.

    • Otherwise, go to Step 3 to add the parameter.

      In the following example, the output includes neither intel_iommu=on nor iommu=pt, so intel_iommu=on must be added.

      image.png

  3. Add intel_iommu=on to /etc/default/grub.

    1. Open the file.

      sudo vim /etc/default/grub
    2. Press i to enter insert mode. Add intel_iommu=on to the GRUB_CMDLINE_LINUX parameter. Save and close the file.

      Example of the modified configuration:grub-config

    3. Apply the configuration.

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

      image.png

    4. Restart the instance and reconnect after it starts.

      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. Enable noiommu_mode.

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

    ethtool -i ethX

    Replace ethX with the target NIC ID. Example for eth1:bus-info

  7. Bind the NIC to the vfio-pci driver. Navigate to the usertools directory in your DPDK installation directory and run:

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

    Replace 0000:00:06.0 with the actual bus-info value of your NIC.

    Run ./dpdk-devbind.py --status to verify. The following output shows 0000:00:06.0 bound to vfio-pci:bound-status

  8. Start the DPDK application. Navigate to the build/app directory in your DPDK installation directory and run the command for your 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

    -w 0000:00:06.0 specifies the NIC. total-num-mbufs=2048 must match your huge page size. Replace both with your actual values.

    Example of a running DPDK application:run-dpdk