Skip to content

QAT: update readme for QAT #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion device_plugins/deploy_qat.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Create Intel QAT Device Plugin CR
Intel® QuickAssist Technology (Intel® QAT) provides cryptographic and compression acceleration capabilities used to improve performance and efficiency across the data center.
For more details see https://intel.github.io/quickassist

## Create a CR via web console
1. Go to **Operator** -> **Installed Operators**.
Expand Down Expand Up @@ -26,4 +28,24 @@ Output:
```
NAME DESIRED READY NODE SELECTOR AGE
qatdeviceplugin-sample 1 1 {"intel.feature.node.kubernetes.io/qat":"true"} 3h27m
```
```

## verify QAT resource is available
QAT has two kinds of resource cryptography and compression. If the plugin deployment is a success, look for `qat.intel.com` resources for compression and crypto.
```
$ oc describe node <node name> | grep qat.intel.com/cy
qat.intel.com/cy: 16
qat.intel.com/cy: 16
```

## Advanced Configuration
By default, half of the virtual functions are used for compression and the other half is used for cryptography. This default behaviour can be customised via a config map which configures the hardware using sysfs. The config values could be `asym`, `sym` and `dc`, for more details see [cfg_services](https://github.com/torvalds/linux/blob/42e66b1cc3a070671001f8a1e933a80818a192bf/Documentation/ABI/testing/sysfs-driver-qat)

To create a configmap, run the following command:
```
oc create configmap --namespace=openshift-operators --from-literal "qat.conf=ServicesEnabled=<option>" qat-config
```
The option can be any combination of values described above.
When using the operator for deploying the plugin with provisioning config, use provisioningConfig field for the name of the ConfigMap, then the config is passed to initcontainer through the volume mount.

There's also a possibility for a node specific congfiguration through passing a nodename via NODE_NAME into initcontainer's environment and passing a node specific profile (qat-$NODE_NAME.conf) via ConfigMap volume mount.
17 changes: 17 additions & 0 deletions machine_configuration/100-intel-qat-vfio-pci-load.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: intel-dgpu
name: 100-intel-qat-vfio-pci-load
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- contents:
source: data:,vfio-pci
mode: 0644
overwrite: true
path: /etc/modules-load.d/vfio-pci.conf
11 changes: 11 additions & 0 deletions machine_configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ $ lsmod | grep ast
```
Ensure that ast driver is not loaded.

# Machine Configuration for Provisioning Intel QAT

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to MCO. And I think we should remove the QAT machine config pool for simplicity purposes.

* Turn on intel_iommu kernel parameter for QAT

For QAT, intel_iommu is a kernel parameter that needs to be turned on using the following command.

```$ oc apply -f https://github.com/intel/intel-technology-enabling-for-openshift/blob/main/machine_configuration/100-intel-qat-intel-iommu-on.yaml```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also add loading vfio-pci with the desired ids as parameters since we have to do the booting anyway.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible for us to add the ids as the parameter for the container and set it through the operator? So we don't have to hard code the ids in in the init-container? :-)


Note: This will reboot the worker nodes in the Intel QAT machine config pool one by one to turn on intel_iommu kernel parameter.


# See Also
- [Firmware Search Path](https://docs.kernel.org/driver-api/firmware/fw_search_path.html)
- [Red Hat OpenShift Container Platform Day-2 operations](https://www.ibm.com/cloud/architecture/content/course/red-hat-openshift-container-platform-day-2-ops/)