Skip to content

Commit 6e368f4

Browse files
author
Dmitry Rozhkov
authored
Merge pull request #308 from mythi/topo
qat: mount VFIO devices for topology hints to work
2 parents 2f142aa + 1d41852 commit 6e368f4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

deployments/qat_plugin/base/intel-qat-plugin.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,17 @@ spec:
4242
imagePullPolicy: IfNotPresent
4343
args: ["-dpdk-driver", "$(DPDK_DRIVER)", "-kernel-vf-drivers", "$(KERNEL_VF_DRIVERS)", "-max-num-devices", "$(MAX_NUM_DEVICES)", "-debug", "$(DEBUG)"]
4444
volumeMounts:
45+
- name: devdir
46+
mountPath: /dev/vfio
47+
readOnly: true
4548
- name: pcidir
4649
mountPath: /sys/bus/pci
4750
- name: kubeletsockets
4851
mountPath: /var/lib/kubelet/device-plugins
4952
volumes:
53+
- name: devdir
54+
hostPath:
55+
path: /dev/vfio
5056
- name: pcidir
5157
hostPath:
5258
path: /sys/bus/pci

pkg/deviceplugin/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package deviceplugin
1616

1717
import (
18+
"fmt"
19+
1820
"github.com/intel/intel-device-plugins-for-kubernetes/pkg/topology"
1921
pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
2022
)
@@ -44,6 +46,8 @@ func NewDeviceInfo(state string, nodes []pluginapi.DeviceSpec, mounts []pluginap
4446
topologyInfo, err := topology.GetTopologyInfo(devPaths)
4547
if err == nil {
4648
deviceInfo.topology = topologyInfo
49+
} else {
50+
fmt.Printf("WARNING: GetTopologyInfo: %v\n", err)
4751
}
4852

4953
return deviceInfo

0 commit comments

Comments
 (0)