Skip to content

Commit dd6a9e4

Browse files
authored
Merge pull request #47074 from maxwelldb/ga-shiftstack-hw-offload-osdocs3506
[OSDOCS-3506] GA HW offload for ShiftStack
2 parents 80e8c61 + 080c1c5 commit dd6a9e4

File tree

5 files changed

+78
-21
lines changed

5 files changed

+78
-21
lines changed

modules/nw-osp-enabling-ovs-offload.adoc

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
[id="nw-osp-enabling-ovs-offload_{context}"]
77
= Enabling OVS hardware offloading
88

9-
:FeatureName: OVS hardware offloading
10-
11-
include::snippets/technology-preview.adoc[]
12-
139
For clusters that run on {rh-openstack-first}, you can enable link:https://www.openvswitch.org/[Open vSwitch (OVS)] hardware offloading.
1410

1511
OVS is a multi-layer virtual switch that enables large-scale, multi-server network virtualization.
@@ -22,13 +18,6 @@ OVS is a multi-layer virtual switch that enables large-scale, multi-server netwo
2218
2319
.Procedure
2420

25-
. From a command line, enter the following command to disable the admission webhook:
26-
+
27-
[source,terminal]
28-
----
29-
$ oc patch sriovoperatorconfig default --type=merge -n openshift-sriov-network-operator --patch '{ "spec": { "enableOperatorWebhook": false } }'
30-
----
31-
3221
. Create an `SriovNetworkNodePolicy` policy for the two `hw-offload` type VF interfaces that are on your cluster:
3322
+
3423
.The first virtual function interface
@@ -122,16 +111,8 @@ metadata:
122111
annotations:
123112
irq-load-balancing.crio.io: disable
124113
cpu-quota.crio.io: disable
125-
k8s.v1.cni.cncf.io/networks: '[
126-
{
127-
"name": "hwoffload9",
128-
"namespace": "default"
129-
},
130-
{
131-
"name": "hwoffload10",
132-
"namespace": "default"
133-
}
134-
]'
114+
k8s.v1.cni.cncf.io/resourceName: openshift.io/hwoffload9
115+
k8s.v1.cni.cncf.io/resourceName: openshift.io/hwoffload10
135116
spec:
136117
restartPolicy: Never
137118
containers:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/network-configuration.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-osp-hardware-offload-attaching-network_{context}"]
7+
= Attaching an OVS hardware offloading network
8+
9+
You can attach an Open vSwitch (OVS) hardware offloading network to your cluster.
10+
11+
.Prerequisites
12+
13+
* Your cluster is installed and running.
14+
* You provisioned an OVS hardware offloading network on {rh-openstack-first} to use with your cluster.
15+
16+
.Procedure
17+
18+
. Create a file named `network.yaml` from the following template:
19+
+
20+
[source,yaml]
21+
----
22+
spec:
23+
additionalNetworks:
24+
- name: hwoffload1
25+
namespace: cnf
26+
rawCNIConfig: '{ "cniVersion": "0.3.1", "name": "hwoffload1", "type": "host-device","pciBusId": "0000:00:05.0", "ipam": {}}' <1>
27+
type: Raw
28+
----
29+
+
30+
where:
31+
+
32+
`pciBusId`:: Specifies the device that is connected to the offloading network. If you do not have it, you can find this value by running the following command:
33+
+
34+
[source,terminal]
35+
----
36+
$ oc describe SriovNetworkNodeState -n openshift-sriov-network-operator
37+
----
38+
39+
. From a command line, enter the following command to patch your cluster with the file:
40+
+
41+
[source,terminal]
42+
----
43+
$ oc apply -f network.yaml
44+
----
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/configuring-hardware-offloading.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-sriov-hwol-ref-openstack-sriov-policy_{context}"]
7+
= An example SR-IOV network node policy for OpenStack
8+
9+
The following example describes an SR-IOV interface for a network interface controller (NIC) with hardware offloading on {rh-openstack-first}.
10+
11+
.An SR-IOV interface for a NIC with hardware offloading on {rh-openstack}
12+
[source,yaml]
13+
----
14+
apiVersion: sriovnetwork.openshift.io/v1
15+
kind: SriovNetworkNodePolicy
16+
metadata:
17+
name: ${name}
18+
namespace: openshift-sriov-network-operator
19+
spec:
20+
deviceType: switchdev
21+
isRdma: true
22+
nicSelector:
23+
netFilter: openstack/NetworkID:${net_id}
24+
nodeSelector:
25+
feature.node.kubernetes.io/network-sriov.capable: 'true'
26+
numVfs: 1
27+
priority: 99
28+
resourceName: ${name}
29+
----

networking/hardware_networks/configuring-hardware-offloading.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ include::modules/nw-sriov-hwol-configuring-machine-config-pool.adoc[leveloffset=
3030
//Configuring the SR-IOV network node policy
3131
include::modules/nw-sriov-hwol-creating-sriov-policy.adoc[leveloffset=+1]
3232

33+
include::modules/nw-sriov-hwol-ref-openstack-sriov-policy.adoc[leveloffset=+2]
34+
3335
//Creating a Network Attachment Definition
3436
include::modules/nw-sriov-hwol-creating-network-attachment-definition.adoc[leveloffset=+1]
3537

post_installation_configuration/network-configuration.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,4 @@ include::modules/installation-osp-configuring-api-floating-ip.adoc[leveloffset=+
121121
include::modules/installation-osp-kuryr-port-pools.adoc[leveloffset=+2]
122122
include::modules/installation-osp-kuryr-settings-active.adoc[leveloffset=+2]
123123
include::modules/nw-osp-enabling-ovs-offload.adoc[leveloffset=+2]
124+
include::modules/nw-osp-hardware-offload-attaching-network.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)