Merge "add nested DPDK VIF classes for kuryr-kubernetes"
This commit is contained in:
commit
ecd0b354ca
@ -75,6 +75,16 @@ VIFHostDevice
|
|||||||
This class provides a way to pass a physical device to the guest. Either an
|
This class provides a way to pass a physical device to the guest. Either an
|
||||||
entire physical device, or an SR-IOV PCI device virtual function, are permitted.
|
entire physical device, or an SR-IOV PCI device virtual function, are permitted.
|
||||||
|
|
||||||
|
.. _vif-nesteddpdk:
|
||||||
|
|
||||||
|
VIFNestedDPDK
|
||||||
|
-------------
|
||||||
|
|
||||||
|
This class provides a configuration, where kuryr-kuberentes is used to provide
|
||||||
|
accelerated DPDK datapath for nested Kubernetes pods running inside the VM.
|
||||||
|
Port is first attached to the virtual machine, bound to the userspace driver
|
||||||
|
(e.g. uio_pci_generic, igb_uio or vfio-pci) and then consumed by Kubernetes
|
||||||
|
pod via kuryr-kubernetes CNI plugin.
|
||||||
|
|
||||||
VIF port profile objects
|
VIF port profile objects
|
||||||
========================
|
========================
|
||||||
@ -129,6 +139,11 @@ VIFPortProfileFPTap
|
|||||||
This profile provides the metadata required to associate a fast path vhost-user
|
This profile provides the metadata required to associate a fast path vhost-user
|
||||||
VIF with a Calico port.
|
VIF with a Calico port.
|
||||||
|
|
||||||
|
VIFPortProfileK8sDPDK
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
This profile provides the metadata required to associate nested DPDK VIF with
|
||||||
|
a Kubernetes pod.
|
||||||
|
|
||||||
VIF network objects
|
VIF network objects
|
||||||
===================
|
===================
|
||||||
|
@ -161,6 +161,22 @@ class VIFHostDevice(VIFBase):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@base.VersionedObjectRegistry.register
|
||||||
|
class VIFNestedDPDK(VIFBase):
|
||||||
|
# For kuryr-kubernetes nested DPDK interfaces
|
||||||
|
|
||||||
|
VERSION = '1.0'
|
||||||
|
|
||||||
|
fields = {
|
||||||
|
# PCI address of the device.
|
||||||
|
'pci_address': fields.StringField(),
|
||||||
|
|
||||||
|
# Name of the driver the device was previously bound to; it makes
|
||||||
|
# the controller driver agnostic (virtio, sr-iov, etc.)
|
||||||
|
'dev_driver': fields.StringField(),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@base.VersionedObjectRegistry.register
|
@base.VersionedObjectRegistry.register
|
||||||
class VIFPortProfileBase(osv_base.VersionedObject,
|
class VIFPortProfileBase(osv_base.VersionedObject,
|
||||||
base.ComparableVersionedObject):
|
base.ComparableVersionedObject):
|
||||||
@ -282,3 +298,22 @@ class VIFPortProfile8021Qbh(VIFPortProfileBase):
|
|||||||
fields = {
|
fields = {
|
||||||
'profile_id': fields.StringField()
|
'profile_id': fields.StringField()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@base.VersionedObjectRegistry.register
|
||||||
|
class VIFPortProfileK8sDPDK(VIFPortProfileBase):
|
||||||
|
# Port profile info for Kuryr-Kubernetes DPDK ports
|
||||||
|
|
||||||
|
VERSION = '1.0'
|
||||||
|
|
||||||
|
fields = {
|
||||||
|
# Specify whether this vif requires L3 setup.
|
||||||
|
'l3_setup': fields.BooleanField(),
|
||||||
|
|
||||||
|
# String containing URL representing object in Kubernetes API.
|
||||||
|
'selflink': fields.StringField(),
|
||||||
|
|
||||||
|
# String used in Kubernetes v1 API to identifies
|
||||||
|
# the server's internal version of this object.
|
||||||
|
'resourceversion': fields.StringField()
|
||||||
|
}
|
||||||
|
@ -46,6 +46,8 @@ object_data = {
|
|||||||
'VIFPortProfileFPTap': '1.0-11670d8dbabd772ff0da26961adadc5a',
|
'VIFPortProfileFPTap': '1.0-11670d8dbabd772ff0da26961adadc5a',
|
||||||
'VIFVHostUser': '1.1-1f95b43be1f884f090ca1f4d79adfd35',
|
'VIFVHostUser': '1.1-1f95b43be1f884f090ca1f4d79adfd35',
|
||||||
'VIFPortProfileOVSRepresentor': '1.1-30e555981003a109b133da5b43ded5df',
|
'VIFPortProfileOVSRepresentor': '1.1-30e555981003a109b133da5b43ded5df',
|
||||||
|
'VIFNestedDPDK': '1.0-fdbaf6b20afd116529929b21aa7158dc',
|
||||||
|
'VIFPortProfileK8sDPDK': '1.0-f1e0daa66b041ded4e6dbc053b4a66d5',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -193,3 +193,14 @@ class TestVIFS(base.TestCase):
|
|||||||
self._test_vif(objects.vif.VIFHostDevice,
|
self._test_vif(objects.vif.VIFHostDevice,
|
||||||
dev_address="0002:24:12.3",
|
dev_address="0002:24:12.3",
|
||||||
port_profile=prof)
|
port_profile=prof)
|
||||||
|
|
||||||
|
def test_vif_nested_dpdk_k8s(self):
|
||||||
|
prof = objects.vif.VIFPortProfileK8sDPDK(
|
||||||
|
l3_setup=False,
|
||||||
|
selflink="/some/url",
|
||||||
|
resourceversion="1")
|
||||||
|
self._test_vif(
|
||||||
|
objects.vif.VIFNestedDPDK,
|
||||||
|
pci_adress="0002:24:12.3",
|
||||||
|
dev_driver="virtio_pci",
|
||||||
|
port_profile=prof)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user