how to find the interfaces to exclude in SR-IOV?

Adrian Chiris adrianc at mellanox.com
Thu Feb 21 08:00:39 UTC 2019


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 at garvan.org.au>
Sent: Thursday, February 21, 2019 8:06 AM
To: openstack at 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<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.openstack.org%2Fneutron%2Flatest%2Fadmin%2Fconfig-sriov%23enable-neutron-sriov-nic-agent-compute&data=02%7C01%7Cadrianc%40mellanox.com%7Cc7f67c1a30c04a15f0f908d697c2ab50%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636863259686401762&sdata=%2B0Pi9sixbWhGkfbRgEMJX02Lb1ipnbvvZcRpk3UpZFA%3D&reserved=0>

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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190221/a1ad3581/attachment-0001.html>


More information about the openstack-discuss mailing list