Comment 1 for bug 1563874

Revision history for this message
Moshe Levi (moshele) wrote : Re: libvirt: Snapshot and resume wont' work for instances with some SR-IOV ports

currently we have 2 SR-IOV
direct port which is direct attachment of the VF to the guest
<interface type='hostdev' managed='yes'>
  <mac address='fa:16:3e:0f:bb:1f'/>
  <driver name='kvm'/>
  <source>
    <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x7'/>
  </source>
  <vlan>
    <tag id='140'/>
  </vlan>
  <alias name='hostdev0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
and macvtap which is a tap device connected to VF
<interface type='direct'>
  <mac address='fa:16:3e:5c:6b:21'/>
  <source dev='p1p7' mode='passthrough'/>
  <target dev='macvtap0'/>
  <model type='virtio'/>
  <driver name='vhost'/>
  <alias name='net0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
for macvtap the guest don't see the pci device so we don't need to detach pci on suspend

I think we just need check if it a direct port as it was before https://review.openstack.org/#/c/262341/7/nova/virt/libvirt/driver.py
instead of https://github.com/openstack/nova/blob/f15d9a9693b19393fcde84cf4bc6f044d39ffdca/nova/virt/libvirt/driver.py#L3423