From 15041a6e077f96caa82144280c26cee9b1789f63 Mon Sep 17 00:00:00 2001 From: Elisamara Aoki Goncalves Date: Wed, 19 Jun 2024 21:25:38 +0000 Subject: [PATCH] SRIOV Device Plugin - needVhostNet configuration option Story: 2011131 Task: 50386 Change-Id: I7b9f765c8a291cc153608aedcf15060b91ae0111 Signed-off-by: Elisamara Aoki Goncalves --- ...ioning-sr-iov-interfaces-using-the-cli.rst | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/source/node_management/kubernetes/node_interfaces/provisioning-sr-iov-interfaces-using-the-cli.rst b/doc/source/node_management/kubernetes/node_interfaces/provisioning-sr-iov-interfaces-using-the-cli.rst index 9dd440251..d546ecd67 100644 --- a/doc/source/node_management/kubernetes/node_interfaces/provisioning-sr-iov-interfaces-using-the-cli.rst +++ b/doc/source/node_management/kubernetes/node_interfaces/provisioning-sr-iov-interfaces-using-the-cli.rst @@ -9,6 +9,11 @@ Provision SR-IOV Interfaces using the CLI |SRIOV| interfaces must be provisioned on at least one host before using |SRIOV| network attachments in a container. +.. note:: + + For the purpose of enabling and using ``needVhostNet``, |SRIOV| needs to be + configured on a worker host. + By default, a Kubernetes container is started with a default network virtual interface for cluster networking. For accelerated networking between containers or external networks, additional |SRIOV| backed interfaces @@ -21,6 +26,10 @@ functions (VFs) in a Kubernetes host. To enable the device plugin, all hosts on which accelerated networking pods will be enabled should have the **sriovdp** label applied. +The |SRIOV| device plugin can also expose the ``/dev/vhost-net`` device to a +container by using the ``needVhostNet`` parameter. To enable it, apply the +``sriovdp-vhostnet`` label. + For information about creating and using network attachments, see |usertasks-doc|: :ref:`Create Network Attachment Definitions ` @@ -64,6 +73,24 @@ See |datanet-doc|: :ref:`Add Data Networks using the CLI | label_value | enabled | +-------------+--------------------------------------+ +#. |Optional| To expose the ``vhost-net`` device to a container, use the + :command:`host-label-assign` command to assign the ``sriovdp-vhostnet`` + label to the node. + + For example, to set ``sriovdp-vhostnet`` on worker-0: + + .. code-block:: none + + [sysadmin@controller-0 ~(keystone_admin)]$ system host-label-assign compute-0 sriovdp-vhostnet=enabled + +-------------+--------------------------------------+ + | Property | Value | + +-------------+--------------------------------------+ + | uuid | d2eff38a-889d-46e2-ae4f-43acb1c957a9 | + | host_uuid | 8c28fe10-8849-4597-8a5d-89a97ea8febf | + | label_key | sriovdp-vhostnet | + | label_value | enabled | + +-------------+--------------------------------------+ + #. Identify the interfaces to be configured. To list all interfaces, use the :command:`system host-if-list` command