Change in vdsm[master]: network: support PCI passthrough of SR-IOV network interfaces.
ibarkan at redhat.com
ibarkan at redhat.com
Mon Mar 2 14:56:35 UTC 2015
Ido Barkan has posted comments on this change.
Change subject: network: support PCI passthrough of SR-IOV network interfaces.
......................................................................
Patch Set 2:
(6 comments)
https://gerrit.ovirt.org/#/c/38249/2//COMMIT_MSG
Commit Message:
Line 6:
Line 7: network: support PCI passthrough of SR-IOV network interfaces.
Line 8:
Line 9: This implementation uses the SRIOV supporting libvirt API only
Line 10: when agine is passing a MAC addredss for the interface. otherwise,
> typo: engine, address, capital O
Done
Line 11: vdsm defaults to the standard host device API.
Line 12: Only SR-IOV (Single Root I/O Virtualization) virtual function (VF)
Line 13: devices can be assigned in this manner.
Line 14:
Line 9: This implementation uses the SRIOV supporting libvirt API only
Line 10: when agine is passing a MAC addredss for the interface. otherwise,
Line 11: vdsm defaults to the standard host device API.
Line 12: Only SR-IOV (Single Root I/O Virtualization) virtual function (VF)
Line 13: devices can be assigned in this manner.
> s/devices/network interfaces (in order to avoid collision with generic SR-I
what do you mean?
Line 14:
Line 15: Change-Id: Ib962fbf1bb08cd5b82b649cc05612471e4e4d0b8
https://gerrit.ovirt.org/#/c/38249/2/vdsm/virt/vmdevices/hostdevice.py
File vdsm/virt/vmdevices/hostdevice.py:
Line 23: from . import hwclass
Line 24:
Line 25:
Line 26: class HostDevice(core.Base):
Line 27: __slots__ = ('name', '_deviceParams', '_mac_address')
> For the sake of consistence, I would use macAddr as in network.py.
Done
Line 28:
Line 29: def __init__(self, conf, log, **kwargs):
Line 30: super(HostDevice, self).__init__(conf, log, **kwargs)
Line 31: self._deviceParams = {}
Line 39: self._deviceParams = detach_detachable(self.name)
Line 40:
Line 41: def getXML(self):
Line 42: if self._mac_address:
Line 43: return self._build_network_host_device()
> What about _build_interface_xml and _build_generic_xml (and possibly create
Done
Line 44: else:
Line 45: return self._build_standard_host_device()
Line 46:
Line 47: def _build_standard_host_device(self):
Line 101: </devices>
Line 102: """
Line 103: interface = self.createXmlElem(hwclass.INTERFACE, hwclass.HOSTDEV)
Line 104: interface.setAttrs(managed='no')
Line 105: interface.appendChildWithArgs('driver', name='vfio')
> What is the behaviour of having driver='vfio' on a host that doesn't suppor
from libvirt docs:
To use VFIO device assignment rather than traditional/legacy KVM device assignment (VFIO is a new method of device assignment that is compatible with UEFI Secure Boot), a type='hostdev' interface can have an optional driver sub-element with a name attribute set to "vfio". To use legacy KVM device assignment you can set name to "kvm" (or simply omit the <driver> element, since "kvm" is currently the default)
So I am not sure. Can you ask libvirt mailing list what they suggest? I guess this code will be called on SRIOV supporting hosts only.
Line 106: source = interface.appendChildWithArgs('source')
Line 107: source.appendChildWithArgs('address', **self._deviceParams['address'])
Line 108: if self._mac_address:
Line 109: interface.appendChildWithArgs('mac', address=self._mac_address)
Line 103: interface = self.createXmlElem(hwclass.INTERFACE, hwclass.HOSTDEV)
Line 104: interface.setAttrs(managed='no')
Line 105: interface.appendChildWithArgs('driver', name='vfio')
Line 106: source = interface.appendChildWithArgs('source')
Line 107: source.appendChildWithArgs('address', **self._deviceParams['address'])
> I would explicitely state that text=None.
well, optional arguments are there so we can forget about them, arn't they?
Line 108: if self._mac_address:
Line 109: interface.appendChildWithArgs('mac', address=self._mac_address)
Line 110:
--
To view, visit https://gerrit.ovirt.org/38249
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib962fbf1bb08cd5b82b649cc05612471e4e4d0b8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list