diff --git a/modules/nw-sriov-networknodepolicy-object.adoc b/modules/nw-sriov-networknodepolicy-object.adoc index 60fe3cfeec7c..dab7a32d8ec6 100644 --- a/modules/nw-sriov-networknodepolicy-object.adoc +++ b/modules/nw-sriov-networknodepolicy-object.adoc @@ -28,9 +28,10 @@ spec: deviceID: "" <10> pfNames: ["", ...] <11> rootDevices: ["", "..."] <12> - deviceType: <13> - isRdma: false <14> - linkType: <15> + netFilter: "" <13> + deviceType: <14> + isRdma: false <15> + linkType: <16> ---- <1> The name for the CR object. @@ -60,14 +61,16 @@ If you specify both `pfNames` and `rootDevices` at the same time, ensure that th <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`. -<13> Optional: The driver type for the virtual functions. The only allowed values are `netdevice` and `vfio-pci`. The default value is `netdevice`. +<13> Optional: The platform specific filter string. The only supported platform is {rh-openstack-first}. Acceptable values are of 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. + +<14> Optional: The driver type for the virtual functions. The only allowed values are `netdevice` and `vfio-pci`. The default value is `netdevice`. + [NOTE] ==== 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`. ==== -<14> Optional: Whether to enable remote direct memory access (RDMA) mode. The default value is `false`. +<15> Optional: Whether to enable remote direct memory access (RDMA) mode. The default value is `false`. + [NOTE] ==== @@ -75,7 +78,7 @@ If the `isRDMA` parameter is set to `true`, you can continue to use the RDMA ena A device can be used in either mode. ==== -<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`. +<16> 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`. [id="sr-iov-network-node-configuration-examples_{context}"] == SR-IOV network node configuration examples @@ -103,3 +106,28 @@ spec: linkType: ib isRdma: true ---- + +The following example describes the configuration for an SR-IOV 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 +kind: SriovNetworkNodePolicy +metadata: + name: policy-sriov-net-openstack-1 + namespace: openshift-sriov-network-operator +spec: + resourceName: sriovnic1 + nodeSelector: + feature.node.kubernetes.io/network-sriov.capable: "true" + numVfs: 1 <1> + nicSelector: + vendor: "15b3" + deviceID: "101b" + netFilter: "openstack/NetworkID:ea24bd04-8674-4f69-b0ee-fa0b3bd20509" <2> +---- + +<1> The `numVfs` field is always set to `1` when configuring the node network policy in a virtual machine environment. + +<2> On {rh-openstack} the `netFilter` field must refer to a network ID. Valid values for `netFilter` are available from a `SriovNetworkNodeState` object.