There is direct no workaround for this. However, there are few options to run a DPDK app without using physical NICs:
Running DPDK inside a Virtual Machine
- Run a virtual machine with as many NICs as you need.
- Inside Virtual Machine, bind NICs to UIO.
- Inside Virtual Machine, run DPDK and it should work OK with NICs inside Virtual Machine.
For more information, please have a look at DPDK Poll Mode Driver for Emulated Virtio NIC.
Please note, this option might not be available on VM, i.e. you might not be able to run a VM inside a VM.
Using DPDK Virtual Device
- Compile DPDK with
libpcap
support.
- Configure host to run a DPDK app as usual (i.e. enable huge pages etc).
- Do not bind any NICs to UIO.
- Create few TUN/TAP interfaces, bridge them with a physical NIC.
Run a DPDK application as usual, but pass few --vdev
arguments to create few Virtual Devices, for example:
testpmd -l 0-3 -n 4 \
--vdev 'net_pcap0,iface=tun0' --vdev 'net_pcap1,iface=tun1' ...
For more information, please have a look at DPDK libpcap Poll Mode Driver.
Please note, this options will significantly reduce DPDK performance due to use Linux kernel functionality and pcap library.
Using NIC Virtual Functions:
- Configure SR-IOV support on the host.
- Configure few Virtual Functions on the host NIC.
- On host, bind few NIV Virtual Functions to
vfio-pci
- On host, run DPDK and it should work OK with NIC Virtual Functions.
For general description of SR-IOV, you might find useful DPDK Intel Virtual Function Driver.
Please note, this option might not be available on VM.