Change in vdsm[master]: network: support PCI passthrough of SR-IOV network interfaces.

mpolednik at redhat.com mpolednik at redhat.com
Mon Mar 2 15:59:44 UTC 2015


Martin Polednik has posted comments on this change.

Change subject: network: support PCI passthrough of SR-IOV network interfaces.
......................................................................


Patch Set 2:

(4 comments)

https://gerrit.ovirt.org/#/c/38249/2//COMMIT_MSG
Commit Message:

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.
> what do you mean?
SR-IOV devices -> SR-IOV network devices (other SR-IOV devices cannot be assigned in this manner)
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 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')
> from libvirt docs:
will try to formulate something, also related to generic passthrough (though we're using default driver which for generic is VFIO)
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'])
> well, optional arguments are there so we can forget about them, arn't they?
have to admit that I thought we're consistent in this, but we aren't so feel free to leave it as it is.
Line 108:         if self._mac_address:
Line 109:             interface.appendChildWithArgs('mac', address=self._mac_address)
Line 110: 


https://gerrit.ovirt.org/#/c/38249/2/vdsm/virt/vmdevices/hwclass.py
File vdsm/virt/vmdevices/hwclass.py:

Line 33: CONSOLE = 'console'
Line 34: SMARTCARD = 'smartcard'
Line 35: TPM = 'tpm'
Line 36: HOSTDEV = 'hostdev'
Line 37: INTERFACE = 'interface'
> Because you defined your own hwclass, you also need to reflect the routines
Also, do you really need your own hwclass? If you could use hostdev and only use a mac as a flag (meaning you would break the rule of self.device -> xml element for greater good) then no changes need to be done and nothing will be forget from the routine.


-- 
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