mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Merge pull request #1350 from mythi/PR-2023-014
qat: add support for QAT 402xx
This commit is contained in:
commit
ded56fac25
@ -43,7 +43,7 @@ The QAT plugin can take a number of command line arguments, summarised in the fo
|
||||
| Flag | Argument | Meaning |
|
||||
|:---- |:-------- |:------- |
|
||||
| -dpdk-driver | string | DPDK Device driver for configuring the QAT device (default: `vfio-pci`) |
|
||||
| -kernel-vf-drivers | string | Comma separated VF Device Driver of the QuickAssist Devices in the system. Devices supported: DH895xCC, C62x, C3xxx, 4xxx/401xx, C4xxx and D15xx (default: `c6xxvf,4xxxvf`) |
|
||||
| -kernel-vf-drivers | string | Comma separated VF Device Driver of the QuickAssist Devices in the system. Devices supported: DH895xCC, C62x, C3xxx, 4xxx/401xx/402xx, C4xxx and D15xx (default: `c6xxvf,4xxxvf`) |
|
||||
| -max-num-devices | int | maximum number of QAT devices to be provided to the QuickAssist device plugin (default: `32`) |
|
||||
| -mode | string | plugin mode which can be either `dpdk` or `kernel` (default: `dpdk`) |
|
||||
| -allocation-policy | string | 2 possible values: balanced and packed. Balanced mode spreads allocated QAT VF resources balanced among QAT PF devices, and packed mode packs one QAT PF device full of QAT VF resources before allocating resources from the next QAT PF. (There is no default.) |
|
||||
@ -134,7 +134,7 @@ In addition to the default configuration, you can add device-specific configurat
|
||||
|
||||
| Device | Possible Configuration | How To Customize | Options | Notes |
|
||||
|:-------|:-----------------------|:-----------------|:--------|:------|
|
||||
| 4xxx, 401xx | [cfg_services](https://github.com/torvalds/linux/blob/42e66b1cc3a070671001f8a1e933a80818a192bf/Documentation/ABI/testing/sysfs-driver-qat) reports the configured services (crypto services or compression services) of the QAT device. | `ServicesEnabled=<value>` | compress:`dc`, crypto:`sym;asym` | Linux 6.0+ kernel is required. |
|
||||
| 4xxx, 401xx,402xx | [cfg_services](https://github.com/torvalds/linux/blob/42e66b1cc3a070671001f8a1e933a80818a192bf/Documentation/ABI/testing/sysfs-driver-qat) reports the configured services (crypto services or compression services) of the QAT device. | `ServicesEnabled=<value>` | compress:`dc`, crypto:`sym;asym` | Linux 6.0+ kernel is required. |
|
||||
|
||||
To create a provisioning config after customizing, run as follows:
|
||||
|
||||
|
@ -65,6 +65,7 @@ var qatDeviceDriver = map[string]string{
|
||||
"19e3": "c3xxxvf",
|
||||
"4941": "4xxxvf",
|
||||
"4943": "4xxxvf",
|
||||
"4945": "4xxxvf",
|
||||
"37c9": "c6xxvf",
|
||||
"6f55": "d15xxvf",
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
# This script is based on qatlib's qat_init.sh
|
||||
NODE_NAME="${NODE_NAME:-}"
|
||||
ENABLED_QAT_PF_PCIIDS=${ENABLED_QAT_PF_PCIIDS:-37c8 4940 4942}
|
||||
ENABLED_QAT_PF_PCIIDS=${ENABLED_QAT_PF_PCIIDS:-37c8 4940 4942 4944}
|
||||
DEVS=$(for pf in $ENABLED_QAT_PF_PCIIDS; do lspci -n | grep -e "$pf" | grep -o -e "^\\S*"; done)
|
||||
SERVICES_LIST="sym;asym dc"
|
||||
QAT_4XXX_DEVICE_PCI_ID="0x4940"
|
||||
QAT_401XX_DEVICE_PCI_ID="0x4942"
|
||||
QAT_402XX_DEVICE_PCI_ID="0x4944"
|
||||
SERVICES_ENABLED="NONE"
|
||||
SERVICES_ENABLED_FOUND="FALSE"
|
||||
|
||||
@ -30,7 +31,7 @@ sysfs_config() {
|
||||
for dev in $DEVS; do
|
||||
DEVPATH="/sys/bus/pci/devices/0000:$dev"
|
||||
PCI_DEV=$(cat "$DEVPATH"/device 2> /dev/null)
|
||||
if [ "$PCI_DEV" != "$QAT_4XXX_DEVICE_PCI_ID" ] && [ "$PCI_DEV" != "$QAT_401XX_DEVICE_PCI_ID" ]; then
|
||||
if [ "$PCI_DEV" != "$QAT_4XXX_DEVICE_PCI_ID" ] && [ "$PCI_DEV" != "$QAT_401XX_DEVICE_PCI_ID" ] && [ "$PCI_DEV" != "$QAT_402XX_DEVICE_PCI_ID" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
@ -77,7 +77,7 @@ spec:
|
||||
- feature: pci.device
|
||||
matchExpressions:
|
||||
vendor: {op: In, value: ["8086"]}
|
||||
device: {op: In, value: ["37c8", "4940"]}
|
||||
device: {op: In, value: ["37c8", "4940", "4942", "4944"]}
|
||||
class: {op: In, value: ["0b40"]}
|
||||
- feature: kernel.loadedmodule
|
||||
matchExpressions:
|
||||
|
@ -81,7 +81,7 @@ spec:
|
||||
- feature: pci.device
|
||||
matchExpressions:
|
||||
vendor: {op: In, value: ["8086"]}
|
||||
device: {op: In, value: ["37c8", "4940"]}
|
||||
device: {op: In, value: ["37c8", "4940", "4942", "4944"]}
|
||||
class: {op: In, value: ["0b40"]}
|
||||
- feature: kernel.loadedmodule
|
||||
matchExpressions:
|
||||
|
@ -207,7 +207,7 @@ func setInitContainer(dsSpec *v1.PodSpec, dpSpec devicepluginv1.QatDevicePluginS
|
||||
"c3xxxvf": "19e2",
|
||||
"c6xxvf": "37c8",
|
||||
"d15xxvf": "6f54",
|
||||
"4xxxvf": "4940 4942",
|
||||
"4xxxvf": "4940 4942 4944",
|
||||
"c4xxxvf": "18a0",
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user