Skip to content

Commit 915c60f

Browse files
authored
Merge pull request #35934 from jboxman/OSDOCS-2471
OSDOCS-2471: Update capabilities list for SR-IOV DPDK and RDMA examples
2 parents f74a4eb + ccd1dae commit 915c60f

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

modules/nw-sriov-dpdk-example-intel.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ spec:
7575
+
7676
[NOTE]
7777
=====
78-
See the `Configuring SR-IOV additional network` section for a detailed explanation on each option in `SriovNetwork`.
78+
See the "Configuring SR-IOV additional network" section for a detailed explanation on each option in `SriovNetwork`.
7979
=====
8080
+
8181
An optional library, app-netutil, provides several API methods for gathering network information about a container's parent pod.
@@ -103,8 +103,9 @@ spec:
103103
- name: testpmd
104104
image: <DPDK_image> <2>
105105
securityContext:
106-
capabilities:
107-
add: ["IPC_LOCK"] <3>
106+
runAsUser: 0
107+
capabilities:
108+
add: ["IPC_LOCK","SYS_RESOURCE","NET_RAW"] <3>
108109
volumeMounts:
109110
- mountPath: /dev/hugepages <4>
110111
name: hugepage
@@ -127,7 +128,7 @@ spec:
127128
----
128129
<1> Specify the same `target_namespace` where the `SriovNetwork` object `intel-dpdk-network` is created. If you would like to create the pod in a different namespace, change `target_namespace` in both the `Pod` spec and the `SriovNetowrk` object.
129130
<2> Specify the DPDK image which includes your application and the DPDK library used by application.
130-
<3> Specify the `IPC_LOCK` capability which is required by the application to allocate hugepage memory inside container.
131+
<3> Specify additional capabilities required by the application inside the container for hugepage allocation, system resource allocation, and network interface access.
131132
<4> Mount a hugepage volume to the DPDK pod under `/dev/hugepages`. The hugepage volume is backed by the emptyDir volume type with the medium being `Hugepages`.
132133
<5> Optional: Specify the number of DPDK devices allocated to DPDK pod. This resource request and limit, if not explicitly specified, will be automatically added by the SR-IOV network resource injector. The SR-IOV network resource injector is an admission controller component managed by the SR-IOV Operator. It is enabled by default and can be disabled by setting `enableInjector` option to `false` in the default `SriovOperatorConfig` CR.
133134
<6> Specify the number of CPUs. The DPDK pod usually requires exclusive CPUs to be allocated from the kubelet. This is achieved by setting CPU Manager policy to `static` and creating a pod with `Guaranteed` QoS.

modules/nw-sriov-dpdk-example-mellanox.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ spec:
7878
+
7979
[NOTE]
8080
=====
81-
See the `Configuring SR-IOV additional network` section for detailed explanation on each option in `SriovNetwork`.
81+
See the "Configuring SR-IOV additional network" section for a detailed explanation on each option in `SriovNetwork`.
8282
=====
8383
+
8484
An optional library, app-netutil, provides several API methods for gathering network information about a container's parent pod.
@@ -106,8 +106,9 @@ spec:
106106
- name: testpmd
107107
image: <DPDK_image> <2>
108108
securityContext:
109-
capabilities:
110-
add: ["IPC_LOCK","NET_RAW"] <3>
109+
runAsUser: 0
110+
capabilities:
111+
add: ["IPC_LOCK","SYS_RESOURCE","NET_RAW"] <3>
111112
volumeMounts:
112113
- mountPath: /dev/hugepages <4>
113114
name: hugepage
@@ -130,7 +131,7 @@ spec:
130131
----
131132
<1> Specify the same `target_namespace` where `SriovNetwork` object `mlx-dpdk-network` is created. If you would like to create the pod in a different namespace, change `target_namespace` in both `Pod` spec and `SriovNetowrk` object.
132133
<2> Specify the DPDK image which includes your application and the DPDK library used by application.
133-
<3> Specify the `IPC_LOCK` capability which is required by the application to allocate hugepage memory inside the container and `NET_RAW` for the application to access the network interface.
134+
<3> Specify additional capabilities required by the application inside the container for hugepage allocation, system resource allocation, and network interface access.
134135
<4> Mount the hugepage volume to the DPDK pod under `/dev/hugepages`. The hugepage volume is backed by the emptyDir volume type with the medium being `Hugepages`.
135136
<5> Optional: Specify the number of DPDK devices allocated to the DPDK pod. This resource request and limit, if not explicitly specified, will be automatically added by SR-IOV network resource injector. The SR-IOV network resource injector is an admission controller component managed by SR-IOV Operator. It is enabled by default and can be disabled by setting the `enableInjector` option to `false` in the default `SriovOperatorConfig` CR.
136137
<6> Specify the number of CPUs. The DPDK pod usually requires exclusive CPUs be allocated from kubelet. This is achieved by setting CPU Manager policy to `static` and creating a pod with `Guaranteed` QoS.

modules/nw-sriov-example-vf-function-in-pod.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ spec:
2424
image: <RDMA_image>
2525
imagePullPolicy: IfNotPresent
2626
securityContext:
27-
capabilities:
28-
add: ["IPC_LOCK"]
27+
runAsUser: 0
28+
capabilities:
29+
add: ["IPC_LOCK","SYS_RESOURCE","NET_RAW"]
2930
command: ["sleep", "infinity"]
3031
----
3132

@@ -45,8 +46,9 @@ spec:
4546
- name: testpmd
4647
image: <DPDK_image>
4748
securityContext:
48-
capabilities:
49-
add: ["IPC_LOCK"]
49+
runAsUser: 0
50+
capabilities:
51+
add: ["IPC_LOCK","SYS_RESOURCE","NET_RAW"]
5052
volumeMounts:
5153
- mountPath: /dev/hugepages
5254
name: hugepage

modules/nw-sriov-rdma-example-mellanox.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ spec:
8282
+
8383
[NOTE]
8484
=====
85-
See the `Configuring SR-IOV additional network` section for detailed explanation on each option in `SriovNetwork`.
85+
See the "Configuring SR-IOV additional network" section for a detailed explanation on each option in `SriovNetwork`.
8686
=====
8787
+
8888
An optional library, app-netutil, provides several API methods for gathering network information about a container's parent pod.
@@ -110,8 +110,9 @@ spec:
110110
- name: testpmd
111111
image: <RDMA_image> <2>
112112
securityContext:
113-
capabilities:
114-
add: ["IPC_LOCK"] <3>
113+
runAsUser: 0
114+
capabilities:
115+
add: ["IPC_LOCK","SYS_RESOURCE","NET_RAW"] <3>
115116
volumeMounts:
116117
- mountPath: /dev/hugepages <4>
117118
name: hugepage
@@ -132,7 +133,7 @@ spec:
132133
----
133134
<1> Specify the same `target_namespace` where `SriovNetwork` object `mlx-rdma-network` is created. If you would like to create the pod in a different namespace, change `target_namespace` in both `Pod` spec and `SriovNetowrk` object.
134135
<2> Specify the RDMA image which includes your application and RDMA library used by application.
135-
<3> Specify the `IPC_LOCK` capability which is required by the application to allocate hugepage memory inside the container.
136+
<3> Specify additional capabilities required by the application inside the container for hugepage allocation, system resource allocation, and network interface access.
136137
<4> Mount the hugepage volume to RDMA pod under `/dev/hugepages`. The hugepage volume is backed by the emptyDir volume type with the medium being `Hugepages`.
137138
<5> Specify number of CPUs. The RDMA pod usually requires exclusive CPUs be allocated from the kubelet. This is achieved by setting CPU Manager policy to `static` and create pod with `Guaranteed` QoS.
138139
<6> Specify hugepage size `hugepages-1Gi` or `hugepages-2Mi` and the quantity of hugepages that will be allocated to the RDMA pod. Configure `2Mi` and `1Gi` hugepages separately. Configuring `1Gi` hugepage requires adding kernel arguments to Nodes.

0 commit comments

Comments
 (0)