Using Ubuntu 20.04.2 LTS and and DPDK 21.02 and following DPDK doc, I performed these commands
sudo modprobe vfio-pci enable_sriov=1
dpdk-devbind.py --bind=vfio-pci 0000:02:00.0
echo 1 > /sys/bus/pci/devices/0000:02:00.0/sriov_numvfs
but trying to create a VF I have this error
alessio@ganimede:~$ sudo su
root@ganimede:/home/alessio# echo 1 > /sys/bus/pci/devices/0000:02:00.0/sriov_numvfs
bash: echo: write error: No such file or directory
even in this way
cd /sys/bus/pci/devices/0000:02:00.0
echo 1 > sriov_numvfs
even if /sys/bus/pci/devices/0000:02:00.0/sriov_numvfs exist. NOTE: with dmesg I see this error
[ 1071.155309] vfio-pci 0000:02:00.0: Driver does not support SRIOV configuration via sysfs
If I try without binding vfio-pci driver but just using kernel one (ixgbe), it works. But using these VF as DPDK ports on my process, it doesn't work, I have to check but seems that packets are not more received.
NOTE: without VF my DPDK process works using vfio-pci driver.
NEW INFO: In this way it works! There was a bug, MAC was wrong and using VF this bug caused application failure. So the question loose part of its interest, in this way works, just the curiosity to know why suggested procedure on DPDK docs does not work.
It is an HOST OS, NIC info are:
driver: ixgbe
version: 5.1.0-k
firmware-version: 0x800003e1
cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.4.0-72-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity default_hugepagesz=1G hugepagesz=1G hugepages=8 hugepagesz=2M hugepages=1024 intel_iommu=on iommu=pt isolcpus=2,3,4,5,6,7,8,9
Any idea? Thanks