Hi,
To correlate between PCI device and net device in linux you can inspect sysfs:
# ls -l /sys/bus/pci/devices/<PCI_DEVICE_ADDRESS>/net
To correlate between net device and PCI device:
# ls -l /sys/class/net/<NET_DEVICE>/device
a Virtual PCI function (VF) will have a pointer to its Physical function (PF)
/sys/bus/pci/devices/<PCI_DEVICE_ADDRESS/physfn
If the file doesn’t exist you can assume it’s a PF.
Thanks,
Adrian.
From: Manuel Sopena Ballesteros <manuel.sb@garvan.org.au>
Sent: Thursday, February 21, 2019 8:06 AM
To: openstack@lists.openstack.org
Subject: how to find the interfaces to exclude in SR-IOV?
Hi,
I would like to exclude a couple of VFs from the neutron SR-IOV configuration…
According to documentation
https://docs.openstack.org/neutron/latest/admin/config-sriov#enable-neutron-sriov-nic-agent-compute
exclude_devices
=
eth1:0000:07:00.2;0000:07:00.3,eth2:0000:05:00.1;0000:05:00.2
This is my configuration
[root@zeus-59 ~]# ibdev2netdev -v
0000:88:00.0 mlx5_0 (MT4117 - MT1611X10113) CX4121A - ConnectX-4 LX SFP28 fw 14.24.1000 port 1 (ACTIVE) ==> bond0 (Up)
0000:88:00.1 mlx5_1 (MT4117 - MT1611X10113) CX4121A - ConnectX-4 LX SFP28 fw 14.24.1000 port 1 (ACTIVE) ==> bond0 (Up)
0000:88:01.2 mlx5_10 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f2 (Up)
0000:88:01.3 mlx5_11 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f3 (Up)
0000:88:01.4 mlx5_12 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f4 (Up)
0000:88:01.5 mlx5_13 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f5 (Up)
0000:88:01.6 mlx5_14 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f6 (Up)
0000:88:01.7 mlx5_15 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f7 (Up)
0000:88:02.0 mlx5_16 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s2 (Up)
0000:88:02.1 mlx5_17 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s2f1 (Up)
0000:88:00.2 mlx5_2 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> ens2f2 (Up)
0000:88:00.3 mlx5_3 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> ens2f3 (Up)
0000:88:00.4 mlx5_4 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> ens2f4 (Up)
0000:88:00.5 mlx5_5 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> ens2f5 (Up)
0000:88:00.6 mlx5_6 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> ens2f6 (Up)
0000:88:00.7 mlx5_7 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> ens2f7 (Up)
0000:88:01.0 mlx5_8 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1 (Up)
0000:88:01.1 mlx5_9 (MT4118 - NA) fw 14.24.1000 port 1 (ACTIVE) ==> enp136s1f1 (Up)
ens2f2 (0000:88:00.2) and ens2f3 (0000:88:00.3) are part of bond0 which I want to assign to OVS.
I would like to do something like:
exclude_devices = <ethX>:0000:88:00.2,<ethY>0000:88:00.3
How can I find out ethX and ethY? Are they PFs?
Thank you very much
NOTICE
Please consider the environment before printing this email. This message and any attachments are intended for the addressee named and may contain legally privileged/confidential/copyright
information. If you are not the intended recipient, you should not read, use, disclose, copy or distribute this communication. If you have received this message in error please notify us at once by return email and then delete both messages. We accept no liability
for the distribution of viruses or similar in electronic communications. This notice should not be removed.