Skip to content

Commit bd031e3

Browse files
author
Mike McKiernan
committed
sr-iov related to RHOSP (SDN-1170)
* Original PR from Zenghui. * Updates to terminology. * Feedback from Aaron about nicSelector hierarchy. * Typo for InfiniBand. * Favor general references for API objects. * Review from Jason.
1 parent 65cea67 commit bd031e3

File tree

1 file changed

+55
-34
lines changed

1 file changed

+55
-34
lines changed

modules/nw-sriov-networknodepolicy-object.adoc

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[id="nw-sriov-networknodepolicy-object_{context}"]
66
= SR-IOV network node configuration object
77

8-
You specify the SR-IOV network device configuration for a node by defining an `SriovNetworkNodePolicy` object. The object is part of the `sriovnetwork.openshift.io` API group.
8+
You specify the SR-IOV network device configuration for a node by creating an SR-IOV network node policy. The API object for the policy is part of the `sriovnetwork.openshift.io` API group.
99

10-
The following YAML describes an `SriovNetworkNodePolicy` object:
10+
The following YAML describes an SR-IOV network node policy:
1111

1212
[source,yaml]
1313
----
@@ -27,62 +27,58 @@ spec:
2727
vendor: "<vendor_code>" <9>
2828
deviceID: "<device_id>" <10>
2929
pfNames: ["<pf_name>", ...] <11>
30-
rootDevices: ["<pci_bus_id>", "..."] <12>
31-
deviceType: <device_type> <13>
32-
isRdma: false <14>
33-
linkType: <link_type> <15>
30+
rootDevices: ["<pci_bus_id>", ...] <12>
31+
netFilter: "<filter_string>" <13>
32+
deviceType: <device_type> <14>
33+
isRdma: false <15>
34+
linkType: <link_type> <16>
3435
----
35-
<1> The name for the CR object.
36+
<1> The name for the custom resource object.
3637

3738
<2> The namespace where the SR-IOV Operator is installed.
3839

39-
<3> The resource name of the SR-IOV device plug-in. You can create multiple `SriovNetworkNodePolicy` objects for a resource name.
40+
<3> The resource name of the SR-IOV device plug-in. You can create multiple SR-IOV network node policies for a resource name.
4041

41-
<4> The node selector to select which nodes are configured.
42-
Only SR-IOV network devices on selected nodes are configured. The SR-IOV
43-
Container Network Interface (CNI) plug-in and device plug-in are deployed on only selected nodes.
42+
<4> The node selector specifies the nodes to configure. Only SR-IOV network devices on the selected nodes are configured. The SR-IOV Container Network Interface (CNI) plug-in and device plug-in are deployed on selected nodes only.
4443

45-
<5> Optional: 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`.
44+
<5> Optional: The priority is an integer value between `0` and `99`. A smaller value receives higher priority. For example, a priority of `10` is a higher priority than `99`. The default value is `99`.
4645

47-
<6> Optional: The maximum transmission unit (MTU) of the virtual function. The maximum MTU value can vary for different NIC models.
46+
<6> Optional: The maximum transmission unit (MTU) of the virtual function. The maximum MTU value can vary for different network interface controller (NIC) models.
4847

49-
<7> The number of the virtual functions (VF) to create for the SR-IOV physical network device. For an Intel Network Interface Card (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 `128`.
48+
<7> 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 `128`.
5049

51-
<8> The `nicSelector` mapping selects the device for the Operator to configure. You do not have to specify values for all the parameters. It is recommended to identify the network device with enough precision to avoid selecting a device unintentionally.
52-
If you specify `rootDevices`, you must also specify a value for `vendor`, `deviceID`, or `pfNames`.
53-
If you specify both `pfNames` and `rootDevices` at the same time, ensure that they point to the same device.
50+
<8> The NIC selector identifies the device for the Operator to configure. You do not have to specify values for all the parameters. It is recommended to identify the network device with enough precision to avoid selecting a device unintentionally.
51+
+
52+
If you specify `rootDevices`, you must also specify a value for `vendor`, `deviceID`, or `pfNames`. If you specify both `pfNames` and `rootDevices` at the same time, ensure that they refer to the same device. If you specify a value for `netFilter`, then you do not need to specify any other parameter because a network ID is unique.
5453

55-
<9> Optional: The vendor hex code of the SR-IOV network device. The only allowed values are `8086` and `15b3`.
54+
<9> Optional: The vendor hexadecimal code of the SR-IOV network device. The only allowed values are `8086` and `15b3`.
5655

57-
<10> Optional: The device hex code of SR-IOV network device. The only allowed values are `158b`, `1015`, and `1017`.
56+
<10> Optional: The device hexadecimal code of the SR-IOV network device. The only allowed values are `158b`, `1015`, and `1017`.
5857

5958
<11> Optional: An array of one or more physical function (PF) names for the device.
6059

61-
<12> An array of one or more PCI bus addresses for the PF of the device. Provide the address in the following format: `0000:02:00.1`.
60+
<12> Optional: An array of one or more PCI bus addresses for the PF of the device. Provide the address in the following format: `0000:02:00.1`.
61+
62+
<13> Optional: The platform-specific network filter. The only supported platform is {rh-openstack-first}. Acceptable values use the following format: `openstack/NetworkID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. Replace `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with the value from the `/var/config/openstack/latest/network_data.json` metadata file.
6263

63-
<13> Optional: The driver type for the virtual functions. The only allowed values are `netdevice` and `vfio-pci`. The default value is `netdevice`.
64+
<14> Optional: The driver type for the virtual functions. The only allowed values are `netdevice` and `vfio-pci`. The default value is `netdevice`.
6465
+
65-
[NOTE]
66-
====
67-
For a Mellanox card to work in Data Plane Development Kit (DPDK) mode on bare metal nodes, use the `netdevice` driver type and set `isRdma` to `true`.
68-
====
66+
For a Mellanox NIC to work in Data Plane Development Kit (DPDK) mode on bare metal nodes, use the `netdevice` driver type and set `isRdma` to `true`.
6967

70-
<14> Optional: Whether to enable remote direct memory access (RDMA) mode. The default value is `false`.
68+
<15> Optional: Whether to enable remote direct memory access (RDMA) mode. The default value is `false`.
7169
+
72-
[NOTE]
73-
====
74-
If the `isRDMA` parameter is set to `true`, you can continue to use the RDMA enabled VF as a normal network device.
75-
A device can be used in either mode.
76-
====
70+
If the `isRDMA` parameter is set to `true`, you can continue to use the RDMA-enabled VF as a normal network device. A device can be used in either mode.
7771

78-
<15> Optional: The link type for the VFs. You can specify one of the following values: `eth` or `ib`. `eth` is ethernet and `ib` is InfiniBand. The default value is `eth` if it is not explicitly set. When `linkType` is set to `ib`, `isRdma` will be set to `true` by SR-IOV Network Operator webhook automatically. When `linkType` is set to `ib`, `deviceType` should not be set to `vfio-pci`.
72+
<16> Optional: The link type for the VFs. You can specify one of the following values: `eth` or `ib`. Specify `eth` for Ethernet or `ib` for InfiniBand. The default value is `eth`.
73+
+
74+
When `linkType` is set to `ib`, `isRdma` is automatically set to `true` by the SR-IOV Network Operator webhook. When `linkType` is set to `ib`, `deviceType` should not be set to `vfio-pci`.
7975

8076
[id="sr-iov-network-node-configuration-examples_{context}"]
8177
== SR-IOV network node configuration examples
8278

83-
The following example describes the configuration for an IB device:
79+
The following example describes the configuration for an InfiniBand device:
8480

85-
.Example configuration for an IB device
81+
.Example configuration for an InfiniBand device
8682
[source,yaml]
8783
----
8884
apiVersion: sriovnetwork.openshift.io/v1
@@ -103,3 +99,28 @@ spec:
10399
linkType: ib
104100
isRdma: true
105101
----
102+
103+
The following example describes the configuration for an SR-IOV network device in a {rh-openstack} virtual machine:
104+
105+
.Example configuration for an SR-IOV device in a virtual machine
106+
[source,yaml]
107+
----
108+
apiVersion: sriovnetwork.openshift.io/v1
109+
kind: SriovNetworkNodePolicy
110+
metadata:
111+
name: policy-sriov-net-openstack-1
112+
namespace: openshift-sriov-network-operator
113+
spec:
114+
resourceName: sriovnic1
115+
nodeSelector:
116+
feature.node.kubernetes.io/network-sriov.capable: "true"
117+
numVfs: 1 <1>
118+
nicSelector:
119+
vendor: "15b3"
120+
deviceID: "101b"
121+
netFilter: "openstack/NetworkID:ea24bd04-8674-4f69-b0ee-fa0b3bd20509" <2>
122+
----
123+
124+
<1> The `numVfs` field is always set to `1` when configuring the node network policy for a virtual machine.
125+
126+
<2> The `netFilter` field must refer to a network ID when the virtual machine is deployed on {rh-openstack}. Valid values for `netFilter` are available from an `SriovNetworkNodeState` object.

0 commit comments

Comments
 (0)