Skip to content

Commit 2af37fd

Browse files
Hyeongju Johannes Leehj-johannes-lee
Hyeongju Johannes Lee
authored andcommitted
qat_dpdk_app: drop generic
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
1 parent 18d6e2d commit 2af37fd

29 files changed

+194
-236
lines changed

.trivyignore.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ misconfigurations:
1212
paths:
1313
- dlb_plugin/overlays/dlb_initcontainer/dlb_initcontainer.yaml
1414
- dsa_plugin/overlays/dsa_initcontainer/dsa_initcontainer.yaml
15-
- qat_dpdk_app/patches/crypto-perf/env_replace_testcmd.yaml
1615
- iaa_plugin/overlays/iaa_initcontainer/iaa_initcontainer.yaml
1716
- qat_plugin/base/intel-qat-kernel-plugin.yaml
1817
- qat_plugin/overlays/qat_initcontainer/qat_initcontainer.yaml
@@ -46,10 +45,7 @@ misconfigurations:
4645
- xpumanager_sidecar/kustom/kustom_xpumanager.yaml
4746
- operator/default/manager_auth_proxy_patch.yaml
4847
- operator/default/manager_webhook_patch.yaml
49-
- qat_dpdk_app/patches/compress-perf/env_replace_testcmd.yaml
50-
- qat_dpdk_app/patches/compress-perf/volume_add_configmap.yaml
5148
- qat_plugin/overlays/debug/add-args.yaml
5249
- qat_plugin/overlays/e2e/add-args.yaml
5350
- qat_plugin/overlays/debug/add-args.yaml
54-
- qat_dpdk_app/patches/crypto-perf/env_replace_testcmd.yaml
5551
- sgx_admissionwebhook/base/manager_webhook_patch.yaml

DEVEL.md

-4
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ go test -v ./test/e2e/... -args -ginkgo.focus <labels in regex> -ginkgo.skip <la
219219
| `iaa` |- | `dedicated` | `accel-config` |
220220
| `qat` | `dpdk` | `dc` | `openssl` |
221221
| `qat` | `dpdk` | `cy` | `openssl`, `crypto-perf` |
222-
| `qat` | `dpdk` | `generic` | `crypto-perf`, `compress-perf` |
223222
| `qat` | `kernel` | `cy1_dc0` | `busybox` |
224223
| `sgx` |- | | `sgx-sdk-demo` |
225224

@@ -240,9 +239,6 @@ go test -v ./test/e2e/... -args -ginkgo.focus "Device:gpu" -ginkgo.skip "App:bus
240239
# QAT for qat4 cy resource with openssl app running
241240
go test -v ./test/e2e/... -args -ginkgo.focus "Device:qat.*Resource:cy.*App:openssl"
242241

243-
# QAT with dpdk mode for qat2 generic resource with all apps running
244-
go test -v ./test/e2e/... -args -ginkgo.focus "Device:qat.*Resource:generic.*App:(crypto-perf|compress-perf)"
245-
246242
# SGX without running sgx-sdk-demo app
247243
go test -v ./test/e2e/... -args -ginkgo.focus "Device:sgx" -ginkgo.skip "App:sgx-sdk-demo"
248244

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ The summary of resources available via plugins in this repository is given in th
234234
* `iaa.intel.com` : `wq-user-[shared or dedicated]`
235235
* [iaa-accel-config-demo-pod.yaml](demo/iaa-accel-config-demo-pod.yaml)
236236
* `qat.intel.com` : `generic` or `cy`/`dc`/`asym-dc`/`sym-dc`
237-
* [crypto-perf-dpdk-pod-requesting-qat.yaml](deployments/qat_dpdk_app/base/crypto-perf-dpdk-pod-requesting-qat.yaml)
237+
* [compress-perf-dpdk-pod-requesting-qat-dc.yaml](deployments/qat_dpdk_app/compress-perf/compress-perf-dpdk-pod-requesting-qat-dc.yaml)
238+
* [crypto-perf-dpdk-pod-requesting-qat-cy.yaml](deployments/qat_dpdk_app/crypto-perf/crypto-perf-dpdk-pod-requesting-qat-cy.yaml)
238239
* `sgx.intel.com` : `epc`
239240
* [intelsgx-job.yaml](deployments/sgx_enclave_apps/base/intelsgx-job.yaml)
240241

cmd/qat_plugin/README.md

+18-39
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Table of Contents
1313
* [DPDK QAT Demos](#dpdk-qat-demos)
1414
* [DPDK Prerequisites](#dpdk-prerequisites)
1515
* [Deploy the pod](#deploy-the-pod)
16-
* [Manual test run](#manual-test-run)
17-
* [Automated test run](#automated-test-run)
1816
* [OpenSSL QAT Demo](#openssl-qat-demo)
1917
* [Checking for Hardware](#checking-for-hardware)
2018

@@ -180,61 +178,42 @@ website links.
180178

181179
#### DPDK Prerequisites
182180

183-
For the DPDK QAT demos to work, the DPDK drivers must be loaded and configured.
181+
- For the DPDK QAT demos to work, the DPDK drivers must be loaded and configured.
184182
For more information, refer to:
185183
[DPDK Getting Started Guide for Linux](https://doc.dpdk.org/guides/linux_gsg/index.html) and
186184
[DPDK Getting Started Guide, Linux Drivers section](http://dpdk.org/doc/guides/linux_gsg/linux_drivers.html)
187185

188-
#### Deploy the pod
189-
190-
In the pod specification file, add container resource request and limit.
191-
For example, `qat.intel.com/generic: <number of devices>` for a container requesting QAT devices.
186+
- You may need to add hugepage request and limit.
192187

193-
For a DPDK-based workload, you may need to add hugepage request and limit.
194-
195-
```bash
196-
$ kubectl apply -k https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/qat_dpdk_app/base/
197-
$ kubectl get pods
198-
NAME READY STATUS RESTARTS AGE
199-
qat-dpdk 1/1 Running 0 27m
200-
intel-qat-plugin-5zgvb 1/1 Running 0 3h
201-
202-
```
188+
- The cluster must enable [Kubernetes CPU manager's](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/) `static` policy.
203189

204190
> **Note**: If the `igb_uio` VF driver is used with the QAT device plugin,
205191
> the workload be deployed with `SYS_ADMIN` capabilities added.
206192
207-
#### Manual Test Run
208-
209-
Manually execute the `dpdk-test-crypto-perf` application to review the logs:
193+
#### Deploy the pod
210194

211195
```bash
212-
$ kubectl exec -it qat-dpdk bash
213-
214-
$ dpdk-test-crypto-perf -l 6-7 -w $QAT1 \
215-
-d /usr/lib64/librte_mempool_ring.so.1.1 \
216-
-d /usr/lib64/librte_pmd_qat.so.1.1 -- \
217-
--ptest throughput --devtype crypto_qat \
218-
--optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt \
219-
--cipher-key-sz 16 --total-ops 10000000 --burst-sz 32 --buffer-sz 64
196+
$ kubectl apply -k https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/qat_dpdk_app/
197+
$ kubectl get pods
198+
NAME READY STATUS RESTARTS AGE
199+
qat-dpdk-test-crypto-perf 1/1 Running 0 27m
200+
qat-dpdk-test-compress-perf 1/1 Running 0 27m
201+
intel-qat-plugin-5zgvb 1/1 Running 0 3h
220202
```
221203

222-
> **Note**: Adapt the `.so` versions to what the DPDK version in the container provides.
204+
Both pods for [crypto-perf](../..//deployments/qat_dpdk_app/crypto-perf) and [compress-perf](../../deployments/qat_dpdk_app/compress-perf) are generated by default using `kustomize`.
223205

224-
#### Automated Test Run
225-
226-
It is also possible to deploy and run `crypto-perf` using the following
227-
`kustomize` overlays:
206+
It is also possible to deploy and run `crypto-perf` or `compress-perf` only.
228207

229208
```bash
230-
$ kubectl apply -k https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/qat_dpdk_app/test-crypto1
231-
$ kubectl apply -k https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/qat_dpdk_app/test-compress1
232-
$ kubectl logs qat-dpdk-test-crypto-perf-tc1
233-
$ kubectl logs qat-dpdk-test-compress-perf-tc1
209+
$ kubectl apply -k https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/qat_dpdk_app/crypto-perf
210+
$ kubectl logs qat-dpdk-test-crypto-perf
234211
```
235212

236-
> **Note**: for `test-crypto1` and `test-compress1` to work, the cluster must enable
237-
[Kubernetes CPU manager's](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/) `static` policy.
213+
```bash
214+
$ kubectl apply -k https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/qat_dpdk_app/compress-perf
215+
$ kubectl logs qat-dpdk-test-compress-perf
216+
```
238217

239218
### OpenSSL QAT Demo
240219

demo/screencast-qat-dpdk.sh

+11-8
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,25 @@
7979
screen5()
8080
{
8181
clear
82-
out "7. View pod specification file for pod requesting QAT Virtual Functions:"
83-
command "kubectl apply --dry-run -o yaml -k ../deployments/qat_dpdk_app/base"
82+
out "7. View pod specification file for pod requesting QAT Virtual Functions (crypto):"
83+
command "kubectl apply --dry-run -o yaml -k ../deployments/qat_dpdk_app/crypto-perf"
8484
sleep 5
85-
out "8. Create Pod requesting QAT Virtual Functions:"
86-
command "kubectl apply -k ../deployments/qat_dpdk_app/base"
85+
out "8. Create Pod requesting QAT Virtual Functions (crypto):"
86+
command "kubectl apply -k ../deployments/qat_dpdk_app/crypto-perf"
8787
sleep 2
8888
command "kubectl get pods"
8989
sleep 2
9090
}
9191
screen6()
9292
{
9393
clear
94-
out "9. Get a shell to the running container and run a DPDK application using QAT device"
95-
out "* \"export\": Lists environment variables - note QAT0, QAT1, QAT2... etc"
96-
out "* \"./dpdk-test-crypto-perf -l 6-7 -w \$QAT0 -- --ptest throughput --devtype crypto_qat --optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --total-ops 10000000 --burst-sz 32 --buffer-sz 64\" : Manually executes the dpdk-test-crypto-perf application to review the logs"
97-
command "kubectl exec -it qat-dpdk bash"
94+
out "9. View pod specification file for pod requesting QAT Virtual Functions (compress):"
95+
command "kubectl apply --dry-run -o yaml -k ../deployments/qat_dpdk_app/compress-perf"
96+
sleep 5
97+
out "10. Create Pod requesting QAT Virtual Functions (compress):"
98+
command "kubectl apply -k ../deployments/qat_dpdk_app/compress-perf"
99+
sleep 2
100+
command "kubectl get pods"
98101
sleep 10
99102
}
100103
if [ "$1" == 'play' ] ; then

deployments/qat_dpdk_app/base/kustomization.yaml

-2
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
kind: Pod
2+
apiVersion: v1
3+
metadata:
4+
name: qat-dpdk-test-compress-perf
5+
spec:
6+
containers:
7+
- name: compress-perf
8+
image: intel/crypto-perf:devel
9+
imagePullPolicy: IfNotPresent
10+
env:
11+
- name: TESTCMD
12+
value: "compress"
13+
- name: PTEST
14+
value: "--driver-name compress_qat --input-file /var/data/file.txt --seg-sz 8192 --compress-level 1:1:9 --num-iter 10 --extended-input-sz 1048576 --max-num-sgl-segs 16 --huffman-enc fixed"
15+
volumeMounts:
16+
- mountPath: /dev/hugepages
17+
name: hugepage
18+
- mountPath: /var/run/dpdk
19+
name: dpdk-runtime
20+
- mountPath: /var/data/
21+
name: testfile
22+
resources:
23+
requests:
24+
cpu: "3"
25+
memory: "128Mi"
26+
qat.intel.com/dc: '4'
27+
hugepages-2Mi: "128Mi"
28+
limits:
29+
cpu: "3"
30+
memory: "128Mi"
31+
qat.intel.com/dc: '4'
32+
hugepages-2Mi: "128Mi"
33+
securityContext:
34+
readOnlyRootFilesystem: true
35+
allowPrivilegeEscalation: false
36+
capabilities:
37+
add:
38+
["IPC_LOCK"]
39+
restartPolicy: Never
40+
volumes:
41+
- name: dpdk-runtime
42+
emptyDir:
43+
medium: Memory
44+
- name: hugepage
45+
emptyDir:
46+
medium: HugePages
47+
- name: testfile
48+
configMap:
49+
name: test-data
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
kind: Pod
2+
apiVersion: v1
3+
metadata:
4+
name: qat-dpdk-test-compress-perf
5+
spec:
6+
containers:
7+
- name: compress-perf
8+
image: intel/crypto-perf:devel
9+
imagePullPolicy: IfNotPresent
10+
env:
11+
- name: TESTCMD
12+
value: "compress"
13+
- name: PTEST
14+
value: "--driver-name compress_qat --input-file /var/data/file.txt --seg-sz 8192 --compress-level 1:1:9 --num-iter 10 --extended-input-sz 1048576 --max-num-sgl-segs 16 --huffman-enc fixed"
15+
volumeMounts:
16+
- mountPath: /dev/hugepages
17+
name: hugepage
18+
- mountPath: /var/run/dpdk
19+
name: dpdk-runtime
20+
- mountPath: /var/data/
21+
name: testfile
22+
resources:
23+
requests:
24+
cpu: "3"
25+
memory: "128Mi"
26+
qat.intel.com/dc: '4'
27+
hugepages-2Mi: "128Mi"
28+
limits:
29+
cpu: "3"
30+
memory: "128Mi"
31+
qat.intel.com/dc: '4'
32+
hugepages-2Mi: "128Mi"
33+
securityContext:
34+
readOnlyRootFilesystem: true
35+
allowPrivilegeEscalation: false
36+
capabilities:
37+
add:
38+
["IPC_LOCK"]
39+
restartPolicy: Never
40+
volumes:
41+
- name: dpdk-runtime
42+
emptyDir:
43+
medium: Memory
44+
- name: hugepage
45+
emptyDir:
46+
medium: HugePages
47+
- name: testfile
48+
configMap:
49+
name: test-data
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
configMapGenerator:
2+
- files:
3+
- file.txt
4+
name: test-data
5+
6+
resources:
7+
- compress-perf-dpdk-pod-requesting-qat-dc.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
kind: Pod
2+
apiVersion: v1
3+
metadata:
4+
name: qat-dpdk-test-crypto-perf
5+
spec:
6+
containers:
7+
- name: crypto-perf
8+
image: intel/crypto-perf:devel
9+
imagePullPolicy: IfNotPresent
10+
env:
11+
- name: TESTCMD
12+
value: "crypto"
13+
- name: PTEST
14+
value: "--ptest throughput --devtype crypto_qat --optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --total-ops 10000000 --burst-sz 32 --buffer-sz 64"
15+
volumeMounts:
16+
- mountPath: /dev/hugepages
17+
name: hugepage
18+
- mountPath: /var/run/dpdk
19+
name: dpdk-runtime
20+
resources:
21+
requests:
22+
cpu: "3"
23+
memory: "128Mi"
24+
qat.intel.com/cy: '4'
25+
hugepages-2Mi: "128Mi"
26+
limits:
27+
cpu: "3"
28+
memory: "128Mi"
29+
qat.intel.com/cy: '4'
30+
hugepages-2Mi: "128Mi"
31+
securityContext:
32+
readOnlyRootFilesystem: true
33+
allowPrivilegeEscalation: false
34+
capabilities:
35+
add:
36+
["IPC_LOCK"]
37+
restartPolicy: Never
38+
volumes:
39+
- name: dpdk-runtime
40+
emptyDir:
41+
medium: Memory
42+
- name: hugepage
43+
emptyDir:
44+
medium: HugePages

deployments/qat_dpdk_app/base/crypto-perf-dpdk-pod-requesting-qat.yaml deployments/qat_dpdk_app/crypto-perf/crypto-perf-dpdk-pod-requesting-qat-generic.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
kind: Pod
22
apiVersion: v1
33
metadata:
4-
name: qat-dpdk
4+
name: qat-dpdk-test-crypto-perf
55
spec:
66
containers:
77
- name: crypto-perf
88
image: intel/crypto-perf:devel
99
imagePullPolicy: IfNotPresent
10-
command: [ "/bin/bash", "-c", "--" ]
11-
args: [ "while true; do sleep 300000; done;" ]
10+
env:
11+
- name: TESTCMD
12+
value: "crypto"
13+
- name: PTEST
14+
value: "--ptest throughput --devtype crypto_qat --optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --total-ops 10000000 --burst-sz 32 --buffer-sz 64"
1215
volumeMounts:
1316
- mountPath: /dev/hugepages
1417
name: hugepage
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- crypto-perf-dpdk-pod-requesting-qat-cy.yaml
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
resources:
2-
- base
2+
- compress-perf
3+
- crypto-perf

deployments/qat_dpdk_app/patches/compress-perf/env_replace_testcmd.yaml

-10
This file was deleted.

deployments/qat_dpdk_app/patches/compress-perf/kustomization.yaml

-12
This file was deleted.

deployments/qat_dpdk_app/patches/compress-perf/volume_add_configmap.yaml

-14
This file was deleted.

0 commit comments

Comments
 (0)