Skip to main content

pci_path

Function pci_path 

Source
pub fn pci_path(a: &PCIAddress, b: &PCIAddress) -> PciPath
Expand description

The PathType and bottleneck bandwidth of the PCIe path between two PCI endpoints.

Walks each endpoint’s sysfs ancestor chain toward the root complex, finds their lowest common ancestor, and takes the minimum link bandwidth along the way. When the endpoints share no PCIe ancestor the path runs through the CPU: same NUMA node → PathType::Phb, different nodes → PathType::Sys, unknown → PathType::Dis.