Merge "SRIOV Device Plugin - needVhostNet configuration option"

This commit is contained in:
Zuul 2024-07-26 13:45:11 +00:00 committed by Gerrit Code Review
commit d663b2122b

View File

@ -9,6 +9,11 @@ Provision SR-IOV Interfaces using the CLI
|SRIOV| interfaces must be provisioned on at least one host before using |SRIOV| interfaces must be provisioned on at least one host before using
|SRIOV| network attachments in a container. |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 By default, a Kubernetes container is started with a default network virtual
interface for cluster networking. For accelerated networking between interface for cluster networking. For accelerated networking between
containers or external networks, additional |SRIOV| backed interfaces 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 on which accelerated networking pods will be enabled should have the
**sriovdp** label applied. **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, For information about creating and using network attachments,
see |usertasks-doc|: :ref:`Create Network Attachment Definitions see |usertasks-doc|: :ref:`Create Network Attachment Definitions
<creating-network-attachment-definitions>` <creating-network-attachment-definitions>`
@ -64,6 +73,24 @@ See |datanet-doc|: :ref:`Add Data Networks using the CLI
| label_value | enabled | | 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. #. Identify the interfaces to be configured.
To list all interfaces, use the :command:`system host-if-list` command To list all interfaces, use the :command:`system host-if-list` command