File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,11 @@ func (dpi *GenericDevicePlugin) healthCheck() error {
328328 var path = dpi .devicePath
329329 var health = ""
330330
331+ iommufdSupported , err := supportsIOMMUFD ()
332+ if err != nil {
333+ return fmt .Errorf ("could not determine iommufd support: %w" , err )
334+ }
335+
331336 watcher , err := fsnotify .NewWatcher ()
332337 if err != nil {
333338 log .Printf ("%s: Unable to create fsnotify watcher: %v" , method , err )
@@ -350,7 +355,11 @@ func (dpi *GenericDevicePlugin) healthCheck() error {
350355 }
351356
352357 for _ , dev := range dpi .devs {
353- devicePath := filepath .Join (path , dev .ID )
358+ devID := dev .ID
359+ if iommufdSupported {
360+ devID = fmt .Sprintf ("vfio%s" , dev .ID )
361+ }
362+ devicePath := filepath .Join (path , devID )
354363 err = watcher .Add (devicePath )
355364 log .Printf (" Adding Watcher to Path : %v" , devicePath )
356365 pathDeviceMap [devicePath ] = dev .ID
You can’t perform that action at this time.
0 commit comments