Goal
Intel® QuickAssist Technology offered with Intel processor-based platforms supports application to accelerate workloads such as cryptography and data compression, etc.
This Wiki describes the steps on how to deploy QAT device plugin in edge location node and how to use QAT device in ICN.
Implemented details
Intel QAT device plugin is Kubernetes device plugin for discovering and advertising QAT virtual functions (VFs) in a Kubernetes host. it supports a platform that pairs the Intel®
C62x Chipset (also known as Platform Controller Hub, or PCH) with Intel® Xeon®Processor D Family System-on-a Chip (SoC) or Intel Atom® C3000 Processor Product
Family SoC.
To automatically deploy QAT device plugin in ICN, KuD addon QAT device plugin includes:
Installation script:
(1) Install and probe QAT kernel driver (e.g. intel_qat.ko, qat_c62x.ko, qat_d15xx.ko, qat_c3xxx.ko etc.)
(2) Install adf_ctl utility
(3) Install device configuration files and firmware files
(4) Start the qat_service, which inserts the appropriate modules as required, enable virtual functions (VFs) and runs adf_ctl to bring up the devices.
(5) Set up the qat_service to run on future boots
Daemon set yaml:
(1) qat_plugin_default_configmap.yaml: default configuration to discovery and advertise QAT devices
(2) qat_plugin.yaml: deploy QAT device plugin as daemon set in edge location node. the QAT device plugin will leverage the configuration in qat_plugin_default_configmap.yaml to discovery and advertise QAT VFs to K8s.
Use QAT device plugin in ICN
(1) Create docker image crypto-perf:devel based on instructions in https://github.com/intel/intel-device-plugins-for-kubernetes/blob/master/cmd/qat_plugin/README.md
(2) Create test_qat.yaml with below contents:
kind: Pod apiVersion: v1 metadata: name: qat_pod spec: containers: - name: dpdkcontainer image: crypto-perf:devel imagePullPolicy: IfNotPresent command: [ "/bin/bash", "-c", "--" ] args: [ "while true; do sleep 300000; done;" ] volumeMounts: - mountPath: /dev/hugepages name: hugepage resources: requests: cpu: "3" memory: "1Gi" qat.intel.com/generic: '2' hugepages-2Mi: "1Gi" limits: cpu: "3" memory: "1Gi" qat.intel.com/generic: '2' hugepages-2Mi: "1Gi" securityContext: capabilities: add: ["IPC_LOCK"] volumes: - name: hugepage emptyDir: medium: HugePages |
---|
(3) Create pod to consume QAT devices
cat test_qat.yaml | kubectl apply -f - |
---|
(4) Verify QAT workload in created Pod
kubectl exec -it qat_pod bash ./dpdk-test-crypto-perf -l 6-7 -w $QAT1 -- --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 |
---|
The output is similar as below:
EAL: Detected 72 lcore(s) # segments per buffer: 1 plaintext = cipher_key = cipher_iv = ciphertext = 7 64 32 10000000 10000000 11076837 9786964 6.2719 3.2112 365.86 |
---|
Reference:
https://github.com/intel/intel-device-plugins-for-kubernetes
https://01.org/zh/intel-quick-assist-technology