Skip to content

sysfs: add NetClassVFPCIAddress for SR-IOV VF PCI address resolution#791

Open
aharivel wants to merge 1 commit intoprometheus:masterfrom
aharivel:sriov
Open

sysfs: add NetClassVFPCIAddress for SR-IOV VF PCI address resolution#791
aharivel wants to merge 1 commit intoprometheus:masterfrom
aharivel:sriov

Conversation

@aharivel
Copy link

@aharivel aharivel commented Mar 2, 2026

Add NetClassVFPCIAddress method to FS that resolves the PCI BDF address of a SR-IOV Virtual Function by reading the sysfs virtfn symlink at /sys/class/net//device/virtfn.

This enables callers to correlate VF network metrics with workloads that reference VFs by PCI address (e.g. OpenStack Nova, libvirt, DPDK).

This is a modification asked for the following MR in node_exporter: prometheus/node_exporter#3544

Add NetClassVFPCIAddress method to FS that resolves the PCI BDF address
of a SR-IOV Virtual Function by reading the sysfs virtfn symlink at
/sys/class/net/<iface>/device/virtfn<vfIndex>.

This enables callers to correlate VF network metrics with workloads that
reference VFs by PCI address (e.g. OpenStack Nova, libvirt, DPDK).

Signed-off-by: Anthony Harivel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant