Skip to content

Commit a762104

Browse files
author
Steven Smith
committed
Adds procedure to switch between NICs and DPU for BF2
1 parent ca4afbc commit a762104

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,8 @@ Topics:
11751175
File: using-pod-level-bonding
11761176
- Name: Configuring hardware offloading
11771177
File: configuring-hardware-offloading
1178+
- Name: Switching Bluefield-2 from NIC to DPU mode
1179+
File: switching-bf2-nic-dpu
11781180
- Name: Uninstalling the SR-IOV Operator
11791181
File: uninstalling-sriov-operator
11801182
- Name: OVN-Kubernetes network plug-in

modules/proc-switching-bf2-nic.adoc

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/switching-bf2-nic-dpu.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="proc-switching-bf2-nic_{context}"]
7+
= Switching Bluefield-2 from DPU mode to NIC mode
8+
9+
Use the following procedure to switch Bluefield-2 from data processing units (DPU) mode to network interface controller (NIC) mode.
10+
11+
[IMPORTANT]
12+
====
13+
Currently, only switching Bluefield-2 from DPU to NIC mode is supported. Switching from NIC mode to DPU mode is unsupported.
14+
====
15+
16+
.Prerequisites
17+
18+
* You have installed the SR-IOV Network Operator. For more information, see "Installing SR-IOV Network Operator".
19+
* You have updated Bluefield-2 to the latest firmware. For more information, see link:https://network.nvidia.com/support/firmware/bluefield2/[Firmware for NVIDIA BlueField-2].
20+
21+
.Procedure
22+
23+
. Add the following labels to each of your worker nodes by entering the following commands:
24+
+
25+
[source,terminal]
26+
----
27+
$ oc label node <example_node_name_one> node-role.kubernetes.io/sriov=
28+
----
29+
+
30+
[source,terminal]
31+
----
32+
$ oc label node <example_node_name_two> node-role.kubernetes.io/sriov=
33+
34+
----
35+
36+
. Create a machine config pool for the SR-IOV Operator, for example:
37+
+
38+
[source,yaml]
39+
----
40+
41+
apiVersion: machineconfiguration.openshift.io/v1
42+
kind: MachineConfigPool
43+
metadata:
44+
name: sriov
45+
spec:
46+
machineConfigSelector:
47+
matchExpressions:
48+
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,sriov]}
49+
nodeSelector:
50+
matchLabels:
51+
node-role.kubernetes.io/sriov: ""
52+
----
53+
54+
. Apply the following `machineconfig.yaml` file to the worker nodes:
55+
+
56+
[source,yaml]
57+
----
58+
apiVersion: machineconfiguration.openshift.io/v1
59+
kind: MachineConfig
60+
metadata:
61+
labels:
62+
machineconfiguration.openshift.io/role: sriov
63+
name: 99-bf2-dpu
64+
spec:
65+
config:
66+
ignition:
67+
version: 3.2.0
68+
storage:
69+
files:
70+
- contents:
71+
source: data:text/plain;charset=utf-8;base64,ZmluZF9jb250YWluZXIoKSB7CiAgY3JpY3RsIHBzIC1vIGpzb24gfCBqcSAtciAnLmNvbnRhaW5lcnNbXSB8IHNlbGVjdCgubWV0YWRhdGEubmFtZT09InNyaW92LW5ldHdvcmstY29uZmlnLWRhZW1vbiIpIHwgLmlkJwp9CnVudGlsIG91dHB1dD0kKGZpbmRfY29udGFpbmVyKTsgW1sgLW4gIiRvdXRwdXQiIF1dOyBkbwogIGVjaG8gIndhaXRpbmcgZm9yIGNvbnRhaW5lciB0byBjb21lIHVwIgogIHNsZWVwIDE7CmRvbmUKISBzdWRvIGNyaWN0bCBleGVjICRvdXRwdXQgL2JpbmRhdGEvc2NyaXB0cy9iZjItc3dpdGNoLW1vZGUuc2ggIiRAIgo=
72+
mode: 0755
73+
overwrite: true
74+
path: /etc/default/switch_in_sriov_config_daemon.sh
75+
systemd:
76+
units:
77+
- name: dpu-switch.service
78+
enabled: true
79+
contents: |
80+
[Unit]
81+
Description=Switch BlueField2 card to NIC/DPU mode
82+
RequiresMountsFor=%t/containers
83+
Wants=network.target
84+
After=network-online.target kubelet.service
85+
[Service]
86+
SuccessExitStatus=0 120
87+
RemainAfterExit=True
88+
ExecStart=/bin/bash -c '/etc/default/switch_in_sriov_config_daemon.sh nic || shutdown -r now' <1>
89+
Type=oneshot
90+
[Install]
91+
WantedBy=multi-user.target
92+
----
93+
<1> Optional: The PCI address of a specific card can optionally be specified, for example `ExecStart=/bin/bash -c '/etc/default/switch_in_sriov_config_daemon.sh nic 0000:5e:00.0 || echo done'`. By default, the first device is selected. If there is more than one device, you must specify which PCI address to be used. The PCI address must be the same on all nodes that are switching Bluefield-2 from DPU mode to NIC mode.
94+
95+
. Wait for the worker nodes to restart. After restarting, the Bluefield-2 network device on the worker nodes is switched into NIC mode.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
:_content-type: ASSEMBLY
2+
[id="switching-bf2-nic-dpu"]
3+
= Switching Bluefield-2 from DPU to NIC
4+
include::_attributes/common-attributes.adoc[]
5+
:context: switching-bf2-nic-dpu
6+
7+
toc::[]
8+
9+
You can switch the Bluefield-2 network device from data processing unit (DPU) mode to network interface controller (NIC) mode.
10+
11+
:FeatureName: Switching Bluefield-2 from data processing unit (DPU) mode to network interface controller (NIC) mode
12+
include::snippets/technology-preview.adoc[]
13+
14+
include::modules/proc-switching-bf2-nic.adoc[leveloffset=+1]
15+
16+
[role="_additional-resources"]
17+
.Additional resources
18+
19+
xref:../../networking/hardware_networks/installing-sriov-operator.adoc#installing-sr-iov-operator_installing-sriov-operator[Installing SR-IOV Network Operator]

0 commit comments

Comments
 (0)