google/dranet

Fix discovery of device, subsystem_vendor and subsystem_device

Open

#193 opened on Aug 15, 2025

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Go (26 forks)auto 404
help wanted

Repository metrics

Stars
 (160 stars)
PR merge metrics
 (PR metrics pending)

Description

We're looking for these files in the wrong location:

https://github.com/google/dranet/blob/dfd866c6bcb799ee52f5593641becd78fadfea5c/pkg/inventory/sysfs.go#L185-L191

These files are located as /sys/class/net/<INTERFACE_NAME>/device/ and not at /sys/devices/<INTERFACE_NAME>/device

Also, it appears that correctly deriving these values causes some downstream issues where we fail to fetch the device from pcidb:

https://github.com/google/dranet/blob/dfd866c6bcb799ee52f5593641becd78fadfea5c/pkg/inventory/sysfs.go#L194-L199

Contributor guide