Intel® Ethernet Controller E810 Data Plane Development Kit (DPDK) 22.11/23.03
Configuration Guide
Virtual Function (VF) Setup with DPDK
- Confirm IOMMU and virtualization technologies are enabled in the BIOS and Linux kernel.
- In the BIOS, check that Intel® VT and Intel® VT-d are enabled. On certain servers SR-IOV may need to be enabled in the BIOS as well.
- Update the kernel boot parameters to enable IOMMU support. IOMMU enables mapping of virtual memory addresses to physical addresses. The following arguments turn on iommu and set it to pass-through mode:
intel_iommu=on iommu=pt The parameters can be added by editing the /etc/default/grub file, or by executing a grubby command, shown below:
grubby --args="intel_iommu=on iommu=pt" --update-kernel DEFAULT - Reboot the system for the change to take effect.
- Install the kernel iavf driver for initial VF creation and optional configuration.
tar xzvf iavf-x.x.x cd iavf-x.x.x/src/ - Compile and install the iavf driver.
make -j 8 make install modprobe iavf - Create n number of VFs on the chosen interface.
The following command shows 4 VFs are created on eth0.
echo 4 > /sys/class/net/eth0/device/sriov_numvfs - Certain configuration can be done with the kernel iavf driver, such as adding MAC Addresses to the VFs or setting trust mode.
For example, the following commands will first set VF 0 MAC to the shown MAC address and then enable trusted mode:
ip link set eth0 vf 0 mac 68:05:ca:a6:0a:b1 ip link set eth0 vf 0 trust on - Bind the VF interface to DPDK using the vfio-pci module, the same method as used for PF interfaces.
To do this, use the BDF number, which can be found using various Linux commands or the
get_config.sh ../dpdk-devbind.py -b vfio-pci <B:D.F> - Start the testpmd application on the VF.
The
-a EAL option can be used to explicitly point to the VF device. For example:sudo ./dpdk-testpmd -n 4 -a 18:01.0 -- --rxq=4 --txq=4 -i --forward-mode=mac - Debug logging with testpmd is available for the iavf driver.
This can be enabled with the EAL flag
--log-level="pmd.net.iavf,debug” . This will print out debug messages from PMD_INIT_LOG(DEBUG, “message”) statements in the iavf driver. For example:sudo ./dpdk-testpmd -n 4 -a 18:01.0 --log-level="pmd.net.iavf,debug" -- --rxq=4 --txq=4 -i --forward-mode=mac