The difference being on other systems the virtual functions are by default disabled which I guess is why no one is running into this problem with other hardware.
An example from a system with the ixgbe driver:
# cat /sys/devices/pci0000\:00/0000\:00\:03.0/0000\:01\:00.1/sriov_totalvfs
63
# cat /sys/devices/pci0000\:00/0000\:00\:03.0/0000\:01\:00.1/sriov_numvfs
0
# ls -l /sys/devices/pci0000\:00/0000\:00\:03.0/0000\:01\:00.1/virtfn*
ls: cannot access '/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.1/virtfn*': No such file or directory
While on a system with the Cavium Thunder X card:
cat /sys/devices/pci0002\:00/0002\:00\:02.0/0002\:01\:00.0/sriov_totalvfs
128
# cat /sys/devices/pci0002\:00/0002\:00\:02.0/0002\:01\:00.0/sriov_numvfs
18
# ls -l /sys/devices/pci0002\:00/0002\:00\:02.0/0002\:01\:00.0/virtfn*
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn0 -> ../0002:01:00.1
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn1 -> ../0002:01:00.2
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn10 -> ../0002:01:01.3
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn11 -> ../0002:01:01.4
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn12 -> ../0002:01:01.5
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn13 -> ../0002:01:01.6
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn14 -> ../0002:01:01.7
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn15 -> ../0002:01:02.0
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn16 -> ../0002:01:02.1
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn17 -> ../0002:01:02.2
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn2 -> ../0002:01:00.3
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn3 -> ../0002:01:00.4
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn4 -> ../0002:01:00.5
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn5 -> ../0002:01:00.6
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn6 -> ../0002:01:00.7
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn7 -> ../0002:01:01.0
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn8 -> ../0002:01:01.1
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn9 -> ../0002:01:01.2
# cat /sys/devices/pci0002\:00/0002\:00\:02.0/0002\:01\:00.0/virtfn0/net/enP2p1s0f1/phys_port_id
cat: '/sys/devices/pci0002:00/0002:00:02.0/0002:01:00.0/virtfn0/net/enP2p1s0f1/phys_port_id': Operation not supported
And this is on by default, without a operator having enabled the virtual functions.
That is interesting indeed.
The difference being on other systems the virtual functions are by default disabled which I guess is why no one is running into this problem with other hardware.
An example from a system with the ixgbe driver: pci0000\ :00/0000\ :00\:03. 0/0000\ :01\:00. 1/sriov_ totalvfs pci0000\ :00/0000\ :00\:03. 0/0000\ :01\:00. 1/sriov_ numvfs pci0000\ :00/0000\ :00\:03. 0/0000\ :01\:00. 1/virtfn* pci0000: 00/0000: 00:03.0/ 0000:01: 00.1/virtfn* ': No such file or directory
# cat /sys/devices/
63
# cat /sys/devices/
0
# ls -l /sys/devices/
ls: cannot access '/sys/devices/
While on a system with the Cavium Thunder X card: pci0002\ :00/0002\ :00\:02. 0/0002\ :01\:00. 0/sriov_ totalvfs pci0002\ :00/0002\ :00\:02. 0/0002\ :01\:00. 0/sriov_ numvfs pci0002\ :00/0002\ :00\:02. 0/0002\ :01\:00. 0/virtfn* pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn0 -> ../0002:01:00.1 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn1 -> ../0002:01:00.2 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn10 -> ../0002:01:01.3 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn11 -> ../0002:01:01.4 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn12 -> ../0002:01:01.5 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn13 -> ../0002:01:01.6 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn14 -> ../0002:01:01.7 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn15 -> ../0002:01:02.0 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn16 -> ../0002:01:02.1 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn17 -> ../0002:01:02.2 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn2 -> ../0002:01:00.3 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn3 -> ../0002:01:00.4 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn4 -> ../0002:01:00.5 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn5 -> ../0002:01:00.6 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn6 -> ../0002:01:00.7 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn7 -> ../0002:01:01.0 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn8 -> ../0002:01:01.1 pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn9 -> ../0002:01:01.2 pci0002\ :00/0002\ :00\:02. 0/0002\ :01\:00. 0/virtfn0/ net/enP2p1s0f1/ phys_port_ id pci0002: 00/0002: 00:02.0/ 0002:01: 00.0/virtfn0/ net/enP2p1s0f1/ phys_port_ id': Operation not supported
cat /sys/devices/
128
# cat /sys/devices/
18
# ls -l /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
lrwxrwxrwx 1 root root 0 Jun 29 08:24 /sys/devices/
# cat /sys/devices/
cat: '/sys/devices/
And this is on by default, without a operator having enabled the virtual functions.
libvirt finds the virtual functions this way: /github. com/libvirt/ libvirt/ blob/0b86e23d25 696c08234d4b73c 90cef9515befe84 /src/util/ virpci. c#L2688
https:/