Update staging/src/k8s.io/dynamic-resource-allocation/deviceattribute/pci_linux.go

Co-authored-by: Kevin Klues <klueska@gmail.com>
This commit is contained in:
Shingo Omura
2025-07-22 10:10:40 +09:00
committed by GitHub
parent d28791fa62
commit ee26a5837c

View File

@@ -62,8 +62,8 @@ func GetPCIeRootAttributeByPCIBusID(pciBusID string) (DeviceAttribute, error) {
//
// ref: https://wiki.xenproject.org/wiki/Bus:Device.Function_(BDF)_Notation
//
// /sys/devices has directory structure which reflects the hardware hierarchy in the system.
// Therefore, the device path may contains intermediate directories(devices).
// /sys/devices has a directory structure which reflects the hardware hierarchy in the system.
// Therefore, the device path may contain intermediate directories (devices).
// Thus, we can not simply find the device path from the PCIAddress.
// Fortunately, /sys/bus/pci/devices/<address> is a symlink to the actual device path in /sys/devices.
// So we can resolve the actual device path by reading the symlink at /sys/bus/pci/devices/<address>.