/sys/class/net/ib0/device/:
# ls -lh /sys/class/net/ib0/device/
total 0
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 broken_parity_status
-r--r--r-- 1 root root 4,0K Tem 28 15:52 class
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 config
-r--r--r-- 1 root root 4,0K Tem 28 15:52 consistent_dma_mask_bits
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 d3cold_allowed
-r--r--r-- 1 root root 4,0K Tem 28 15:52 device
-r--r--r-- 1 root root 4,0K Tem 28 15:52 dma_mask_bits
lrwxrwxrwx 1 root root 0 Tem 28 15:52 driver -> ../../../../bus/pci/drivers/mlx4_core
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 driver_override
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 enable
drwxr-xr-x 3 root root 0 Tem 28 15:52 infiniband
drwxr-xr-x 3 root root 0 Tem 28 15:52 infiniband_cm
drwxr-xr-x 4 root root 0 Tem 28 15:52 infiniband_mad
drwxr-xr-x 3 root root 0 Tem 28 15:52 infiniband_verbs
lrwxrwxrwx 1 root root 0 Tem 28 15:52 iommu -> ../../../virtual/iommu/dmar0
lrwxrwxrwx 1 root root 0 Tem 28 15:52 iommu_group -> ../../../../kernel/iommu_groups/30
-r--r--r-- 1 root root 4,0K Tem 28 15:52 irq
-r--r--r-- 1 root root 4,0K Tem 28 15:52 local_cpulist
-r--r--r-- 1 root root 4,0K Tem 28 15:52 local_cpus
-r--r--r-- 1 root root 4,0K Tem 28 15:52 mlx4_port1
-r--r--r-- 1 root root 4,0K Tem 28 15:52 mlx4_port1_mtu
-r--r--r-- 1 root root 4,0K Tem 28 15:52 modalias
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 msi_bus
drwxr-xr-x 2 root root 0 Tem 28 15:52 msi_irqs
drwxr-xr-x 3 root root 0 Tem 28 15:52 net
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 numa_node
-r--r--r-- 1 root root 4,0K Tem 28 15:52 pools
drwxr-xr-x 2 root root 0 Tem 28 15:52 power
--w--w---- 1 root root 4,0K Tem 28 15:52 remove
--w--w---- 1 root root 4,0K Tem 28 15:52 rescan
--w------- 1 root root 4,0K Tem 28 15:52 reset
-r--r--r-- 1 root root 4,0K Tem 28 15:52 resource
-rw------- 1 root root 1,0M Tem 28 15:52 resource0
-rw------- 1 root root 8,0M Tem 28 15:52 resource2
-rw------- 1 root root 8,0M Tem 28 15:52 resource2_wc
-rw-rw-r-- 1 root root 4,0K Tem 28 15:52 sriov_numvfs
-r--r--r-- 1 root root 4,0K Tem 28 15:52 sriov_totalvfs
lrwxrwxrwx 1 root root 0 Tem 28 15:52 subsystem -> ../../../../bus/pci
-r--r--r-- 1 root root 4,0K Tem 28 15:52 subsystem_device
-r--r--r-- 1 root root 4,0K Tem 28 15:52 subsystem_vendor
-rw-r--r-- 1 root root 4,0K Tem 28 15:52 uevent
-r--r--r-- 1 root root 4,0K Tem 28 15:52 vendor
lrwxrwxrwx 1 root root 0 Tem 28 15:52 virtfn0 -> ../0000:b0:00.1
lrwxrwxrwx 1 root root 0 Tem 28 15:52 virtfn1 -> ../0000:b0:00.2
-rw------- 1 root root 32K Tem 28 15:52 vpd
/sys/class/net/ib0/device/virtfn*/:
# ls -lh /sys/class/net/ib0/device/virtfn*/
/sys/class/net/ib0/device/virtfn0/:
total 0
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 broken_parity_status
-r--r--r-- 1 root root 4,0K Tem 28 15:53 class
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 config
-r--r--r-- 1 root root 4,0K Tem 28 15:53 consistent_dma_mask_bits
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 d3cold_allowed
-r--r--r-- 1 root root 4,0K Tem 28 15:53 device
-r--r--r-- 1 root root 4,0K Tem 28 15:53 dma_mask_bits
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 driver_override
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 enable
lrwxrwxrwx 1 root root 0 Tem 28 15:53 iommu -> ../../../virtual/iommu/dmar0
lrwxrwxrwx 1 root root 0 Tem 28 15:53 iommu_group -> ../../../../kernel/iommu_groups/42
-r--r--r-- 1 root root 4,0K Tem 28 15:53 irq
-r--r--r-- 1 root root 4,0K Tem 28 15:53 local_cpulist
-r--r--r-- 1 root root 4,0K Tem 28 15:53 local_cpus
-r--r--r-- 1 root root 4,0K Tem 28 15:53 modalias
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 msi_bus
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 numa_node
lrwxrwxrwx 1 root root 0 Tem 28 15:53 physfn -> ../0000:b0:00.0
drwxr-xr-x 2 root root 0 Tem 28 15:53 power
--w------- 1 root root 4,0K Tem 28 15:53 reset
-r--r--r-- 1 root root 4,0K Tem 28 15:53 resource
-rw------- 1 root root 8,0M Tem 28 15:53 resource2
-rw------- 1 root root 8,0M Tem 28 15:53 resource2_wc
lrwxrwxrwx 1 root root 0 Tem 28 15:53 subsystem -> ../../../../bus/pci
-r--r--r-- 1 root root 4,0K Tem 28 15:53 subsystem_device
-r--r--r-- 1 root root 4,0K Tem 28 15:53 subsystem_vendor
-rw-r--r-- 1 root root 4,0K Tem 28 15:53 uevent
-r--r--r-- 1 root root 4,0K Tem 28 15:53 vendor
/sys/class/net/ib0/device/virtfn1/:
total 0
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 broken_parity_status
-r--r--r-- 1 root root 4,0K Tem 28 15:54 class
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 config
-r--r--r-- 1 root root 4,0K Tem 28 15:54 consistent_dma_mask_bits
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 d3cold_allowed
-r--r--r-- 1 root root 4,0K Tem 28 15:54 device
-r--r--r-- 1 root root 4,0K Tem 28 15:54 dma_mask_bits
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 driver_override
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 enable
lrwxrwxrwx 1 root root 0 Tem 28 15:54 iommu -> ../../../virtual/iommu/dmar0
lrwxrwxrwx 1 root root 0 Tem 28 15:54 iommu_group -> ../../../../kernel/iommu_groups/43
-r--r--r-- 1 root root 4,0K Tem 28 15:54 irq
-r--r--r-- 1 root root 4,0K Tem 28 15:54 local_cpulist
-r--r--r-- 1 root root 4,0K Tem 28 15:54 local_cpus
-r--r--r-- 1 root root 4,0K Tem 28 15:54 modalias
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 msi_bus
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 numa_node
lrwxrwxrwx 1 root root 0 Tem 28 15:54 physfn -> ../0000:b0:00.0
drwxr-xr-x 2 root root 0 Tem 28 15:54 power
--w------- 1 root root 4,0K Tem 28 15:54 reset
-r--r--r-- 1 root root 4,0K Tem 28 15:54 resource
-rw------- 1 root root 8,0M Tem 28 15:54 resource2
-rw------- 1 root root 8,0M Tem 28 15:54 resource2_wc
lrwxrwxrwx 1 root root 0 Tem 28 15:54 subsystem -> ../../../../bus/pci
-r--r--r-- 1 root root 4,0K Tem 28 15:54 subsystem_device
-r--r--r-- 1 root root 4,0K Tem 28 15:54 subsystem_vendor
-rw-r--r-- 1 root root 4,0K Tem 28 15:54 uevent
-r--r--r-- 1 root root 4,0K Tem 28 15:54 vendor
LXD will only consider virtual functions that have network devices listed under net/, otherwise it’s assuming that they’re already in another network namespace and so considered to be in use.
So it seems that I do not have.