File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
deployments/qat_plugin/overlays/sriov_numvfs Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ bases :
2+ - ../../base
3+ patchesStrategicMerge :
4+ - sriov_numvfs_init.yaml
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : DaemonSet
3+ metadata :
4+ name : intel-qat-plugin
5+ spec :
6+ template :
7+ spec :
8+ initContainers :
9+ - name : vfio-pci
10+ image : busybox
11+ command : ["/bin/sh", "-c", "modprobe vfio-pci"]
12+ securityContext :
13+ capabilities :
14+ add :
15+ ["SYS_MODULE"]
16+ volumeMounts :
17+ - name : moddir
18+ mountPath : /lib/modules/
19+ - name : sriov-numvfs
20+ image : busybox
21+ command : ["/bin/sh", "-c"]
22+ args :
23+ - >
24+ for dev in `for pf in 0434 0435 19a3 37c8 6f54; do lspci | awk -v dev="8086:$pf" '$0 ~ dev {print "0000:" $1}'; done`; do
25+ DEVPATH="/sys/bus/pci/devices/$dev"
26+ NUMVFS="$DEVPATH/sriov_numvfs"
27+ if [ -w "$NUMVFS" -a $(cat "$NUMVFS") -eq 0 ]; then
28+ cat "$DEVPATH/sriov_totalvfs" | tee "$NUMVFS"
29+ fi
30+ done
31+ securityContext :
32+ privileged : true
33+ volumeMounts :
34+ - name : sysfs
35+ mountPath : /sys
36+ volumes :
37+ - name : moddir
38+ hostPath :
39+ path : /lib/modules/
40+ - name : sysfs
41+ hostPath :
42+ path : /sys
You can’t perform that action at this time.
0 commit comments