Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions modules/nw-openstack-sr-iov-testpmd-pod.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
// * networking/hardware_networks/configuring-sriov-device.adoc

:_mod-docs-content-type: REFERENCE
[id="nw-openstack-ovs-sr-iov-testpmd-pod_{context}"]
[id="nw-openstack-sr-iov-testpmd-pod_{context}"]
= A test pod template for clusters that use SR-IOV on OpenStack

The following `testpmd` pod demonstrates container creation with huge pages, reserved CPUs, and the SR-IOV port.
[role="_abstract"]
The following `testpmd` pod example demonstrates container creation with huge pages, reserved CPUs, and the SR-IOV port.

This example assumes that the name of the performance profile is `cnf-performance profile`.

.An example `testpmd` pod
[source,yaml]
----
apiVersion: v1
Expand Down Expand Up @@ -45,10 +47,9 @@ spec:
- mountPath: /dev/hugepages
name: hugepage
readOnly: False
runtimeClassName: performance-cnf-performanceprofile <1>
runtimeClassName: performance-cnf-performanceprofile
volumes:
- name: hugepage
emptyDir:
medium: HugePages
----
<1> This example assumes that the name of the performance profile is `cnf-performance profile`.
12 changes: 5 additions & 7 deletions modules/nw-sr-iov-network-node-configuration-examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
[id="nw-sr-iov-network-node-configuration-examples_{context}"]
= SR-IOV network node configuration examples

[role="_abstract"]
The following example describes the configuration for an InfiniBand device:

.Example configuration for an InfiniBand device
[source,yaml]
----
apiVersion: sriovnetwork.openshift.io/v1
Expand All @@ -33,7 +33,6 @@ spec:

The following example describes the configuration for an SR-IOV network device in a {rh-openstack} virtual machine:

.Example configuration for an SR-IOV device in a virtual machine
[source,yaml]
----
apiVersion: sriovnetwork.openshift.io/v1
Expand All @@ -45,13 +44,12 @@ spec:
resourceName: <sriov_resource_name>
nodeSelector:
feature.node.kubernetes.io/network-sriov.capable: "true"
numVfs: 1 <1>
numVfs: 1
nicSelector:
vendor: "<vendor_code>"
deviceID: "<device_id>"
netFilter: "openstack/NetworkID:ea24bd04-8674-4f69-b0ee-fa0b3bd20509" <2>
netFilter: "openstack/NetworkID:ea24bd04-8674-4f69-b0ee-fa0b3bd20509"
# ...
----
<1> When configuring the node network policy for a virtual machine, the `numVfs` parameter is always set to `1`.
<2> When the virtual machine is deployed on {rh-openstack}, the `netFilter` parameter must refer to a network ID. Valid values for `netFilter` are available from an `SriovNetworkNodeState` object.

* When configuring the node network policy for a virtual machine, the `numVfs` parameter is always set to `1`.
* When the virtual machine is deployed on {rh-openstack}, the `netFilter` parameter must refer to a network ID. Valid values for `netFilter` are available from an `SriovNetworkNodeState` object.
26 changes: 13 additions & 13 deletions modules/nw-sriov-configuring-device.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ spec:
deviceType: vfio-pci
isRdma: false
----
** `metadata.name` specifies a name for the `SriovNetworkNodePolicy` object.
** `metadata.namespace` specifies the namespace where the SR-IOV Network Operator is installed.
** `spec.resourceName` specifies the resource name of the SR-IOV device plugin. You can create multiple `SriovNetworkNodePolicy` objects for a resource name.
** `spec.nodeSelector.feature.node.kubernetes.io/network-sriov.capable` specifies the node selector to select which nodes are configured. Only SR-IOV network devices on selected nodes are configured. The SR-IOV Container Network Interface (CNI) plugin and device plugin are deployed only on selected nodes.
** `spec.priority` is an optional field that specifies an integer value between `0` and `99`. A smaller number gets higher priority, so a priority of `10` is higher than a priority of `99`. The default value is `99`.
** `spec.mtu` is an optional field that specifies a value for the maximum transmission unit (MTU) of the virtual function. The maximum MTU value can vary for different NIC models.
** `spec.numVfs` specifies the number of the virtual functions (VF) to create for the SR-IOV physical network device. For an Intel network interface controller (NIC), the number of VFs cannot be larger than the total VFs supported by the device. For a Mellanox NIC, the number of VFs cannot be larger than `127`.
** `metadata.name` defines a name for the `SriovNetworkNodePolicy` object.
** `metadata.namespace` defines the namespace where the SR-IOV Network Operator is installed.
** `spec.resourceName` defines the resource name of the SR-IOV device plugin. You can create multiple `SriovNetworkNodePolicy` objects for a resource name.
** `spec.nodeSelector.feature.node.kubernetes.io/network-sriov.capable` defines the node selector to select which nodes are configured. Only SR-IOV network devices on selected nodes are configured. The SR-IOV Container Network Interface (CNI) plugin and device plugin are deployed only on selected nodes.
** `spec.priority` is an optional field that defines an integer value between `0` and `99`. A smaller number gets higher priority, so a priority of `10` is higher than a priority of `99`. The default value is `99`.
** `spec.mtu` is an optional field that defines a value for the maximum transmission unit (MTU) of the virtual function. The maximum MTU value can vary for different NIC models.
** `spec.numVfs` defines the number of the virtual functions (VF) to create for the SR-IOV physical network device. For an Intel network interface controller (NIC), the number of VFs cannot be larger than the total VFs supported by the device. For a Mellanox NIC, the number of VFs cannot be larger than `127`.
** `spec.nicSelector` selects the Ethernet device for the Operator to configure. You do not need to specify values for all the parameters.
+
[NOTE]
Expand All @@ -85,12 +85,12 @@ If you specify `rootDevices`, you must also specify a value for `vendor`, `devic
====
+
If you specify both `pfNames` and `rootDevices` at the same time, ensure that they point to an identical device.
** `spec.nicSelector.vendor` is an optional field that specifies the vendor hex code of the SR-IOV network device. The only allowed values are either `8086` or `15b3`.
** `spec.nicSelector.deviceID` is an optional field that specifies the device hex code of SR-IOV network device. The only allowed values are `158b`, `1015`, `1017`.
** `spec.nicSelector.pfNames` is an optional field that specifies an array of one or more physical function (PF) names for the Ethernet device.
** `spec.nicSelector.rootDevices` is an optional field that specifies an array of one or more PCI bus addresses for the physical function of the Ethernet device. Provide the address in the following format: `0000:02:00.1`.
** `spec.deviceType` specifies the driver type. The `vfio-pci` driver type is required for virtual functions in {VirtProductName}.
** `spec.isRdma` is an optional field that specifies whether to enable remote direct memory access (RDMA) mode. For a Mellanox card, set `isRdma` to `false`. The default value is `false`.
** `spec.nicSelector.vendor` is an optional field that defines the vendor hex code of the SR-IOV network device. The only allowed values are either `8086` or `15b3`.
** `spec.nicSelector.deviceID` is an optional field that defines the device hex code of SR-IOV network device. The only allowed values are `158b`, `1015`, `1017`.
** `spec.nicSelector.pfNames` is an optional field that defines an array of one or more physical function (PF) names for the Ethernet device.
** `spec.nicSelector.rootDevices` is an optional field that defines an array of one or more PCI bus addresses for the physical function of the Ethernet device. Provide the address in the following format: `0000:02:00.1`.
** `spec.deviceType` defines the driver type. The `vfio-pci` driver type is required for virtual functions in {VirtProductName}.
** `spec.isRdma` is an optional field that defines whether to enable remote direct memory access (RDMA) mode. For a Mellanox card, set `isRdma` to `false`. The default value is `false`.
+
[NOTE]
====
Expand Down
16 changes: 6 additions & 10 deletions modules/nw-sriov-device-discovery.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// * virt/vm_networking/virt-connecting-vm-to-sriov.adoc

:_mod-docs-content-type: REFERENCE
[id="discover-sr-iov-devices_{context}"]
[id="nw-sriov-device-discovery_{context}"]
= Automated discovery of SR-IOV network devices

The SR-IOV Network Operator searches your cluster for SR-IOV capable network devices on worker nodes.
The Operator creates and updates a SriovNetworkNodeState custom resource (CR) for each worker node that provides a compatible SR-IOV network device.
The Operator creates and updates a `SriovNetworkNodeState` custom resource (CR) for each worker node that provides a compatible SR-IOV network device.

The CR is assigned the same name as the worker node.
The `status.interfaces` list provides information about the network devices on a node.
Expand All @@ -19,18 +19,14 @@ Do not modify a `SriovNetworkNodeState` object.
The Operator creates and manages these resources automatically.
====

[id="example-sriovnetworknodestate_{context}"]
== Example SriovNetworkNodeState object

The following YAML is an example of a `SriovNetworkNodeState` object created by the SR-IOV Network Operator:

.An SriovNetworkNodeState object
[source,yaml]
----
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodeState
metadata:
name: node-25 <1>
name: node-25
namespace: openshift-sriov-network-operator
ownerReferences:
- apiVersion: sriovnetwork.openshift.io/v1
Expand All @@ -41,7 +37,7 @@ metadata:
spec:
dpConfigVersion: "39824"
status:
interfaces: <2>
interfaces:
- deviceID: "1017"
driver: mlx5_core
mtu: 1500
Expand Down Expand Up @@ -79,5 +75,5 @@ status:
vendor: "8086"
syncStatus: Succeeded
----
<1> The value of the `name` field is the same as the name of the worker node.
<2> The `interfaces` stanza includes a list of all of the SR-IOV devices discovered by the Operator on the worker node.
* The value of the `name` field is the same as the name of the worker node.
* The `interfaces` stanza includes a list of all of the SR-IOV devices discovered by the Operator on the worker node.
Loading