On Fri, 2019-07-05 at 07:58 -0400, Mauricio Tavares wrote:
Quick questions:
this is not really documented that well but https://bugs.launchpad.net/nova/+bug/1832169 has some context were i explaing why the 3 types exist.
1. Is there some official documentation comparing them? Only thing I found so far was https://mohamede.com/2019/02/07/pci-passthrough-type-pf-type-vf-and-type-pci...
2. Am I correct to assume (I seem to do a lot of that; be afraid) that when nova starts populating the database entry for a given physical node (say a computer node or a ironic baremetal node) it looks through the pci list and decides what type of device (type-PCI, type-PF, or type-VF) it is? What is the criteria? we determing the type in the _get_device_type function in the libvirt virt driver here https://github.com/openstack/nova/blob/e75598be31d849bbe09c905081be224f68210...
the critia we use is interogating the pcie config space capablitys reported via libvirt. if the pci device has the "virt_functions" capablity meaning it can create virtual funcitons it si reported as type-PF as it can be used as an sriov PF if it has cap phys_function and an adress set it means it has a parent PF and therefor it is a VF all other deivce are starndard PCI device that do not support sriov and are mapped to type-PCI
3. https://mohamede.com/2019/02/07/pci-passthrough-type-pf-type-vf-and-type-pci... implies that nova sees the 3 different types, well, differently where it will try hard to virtualize type-PF and type-VF and really really wants me to setup sr-iov on them ( https://docs.openstack.org/nova/latest/admin/pci-passthrough.html seem to also want sr-iov) really . Is that correct?
you dont have to use the device for VF passthough but if it is capable of creting VF it will be lists as a PF regradelss of if VF have been created via sysfs or kernel args. if you modify the frimeware mode on your card such as puting it in datacenter bridging mode whic disables sriov it will change the pci config space entries will change and it will change form type-PF to type-PCI the example alias above was using an intel nic that supported the sriov so it used type-PF to do a pci passthough of the entire nic but if it was a gpu or other device that did not support sriov it would have used type-PCI.