mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00

QAT_401xx is a derivative of 4xxx. Add support for that device by including the device IDs (both PF and VF). Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
12 lines
384 B
Bash
Executable File
12 lines
384 B
Bash
Executable File
#!/bin/bash
|
|
ENABLED_QAT_PF_PCIIDS=${ENABLED_QAT_PF_PCIIDS:-37c8 4940 4942}
|
|
DEVS=$(for pf in $ENABLED_QAT_PF_PCIIDS; do lspci -n | grep -e "$pf" | grep -o -e "^\\S*"; done)
|
|
|
|
for dev in $DEVS; do
|
|
DEVPATH="/sys/bus/pci/devices/0000:$dev"
|
|
NUMVFS="$DEVPATH/sriov_numvfs"
|
|
if test -w "$NUMVFS" -a "$(cat "$NUMVFS")" -eq 0 ; then
|
|
tee "$NUMVFS" < "$DEVPATH/sriov_totalvfs"
|
|
fi
|
|
done
|