Components and Plugins: finding PCI objects during other discoveries

## Functions

struct hwloc_obj * | hwloc_pci_find_parent_by_busid (struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func)
struct hwloc_obj * | hwloc_pci_find_by_busid (struct hwloc_topology *topology, unsigned domain, unsigned bus, unsigned dev, unsigned func)

## Detailed Description

Note
  These structures and functions may change when HWLOC_COMPONENT_ABI is modified.

## Function Documentation

## hwloc_pci_find_by_busid()

struct hwloc_obj * hwloc_pci_find_by_busid | ( | struct hwloc_topology * | topology,
|  | unsigned | domain,
|  | unsigned | bus,
|  | unsigned | dev,
|  | unsigned | func )

Find the PCI device or bridge matching a PCI bus ID exactly.

This is useful for adding specific information about some objects based on their PCI id. When it comes to attaching objects based on PCI locality, hwloc_pci_find_parent_by_busid() should be preferred.

## hwloc_pci_find_parent_by_busid()

struct hwloc_obj * hwloc_pci_find_parent_by_busid | ( | struct hwloc_topology * | topology,
|  | unsigned | domain,
|  | unsigned | bus,
|  | unsigned | dev,
|  | unsigned | func )

Find the object or a parent of a PCI bus ID.

When attaching a new object (typically an OS device) whose locality is specified by PCI bus ID, this function returns the PCI object to use as a parent for attaching.

If the exact PCI device with this bus ID exists, it is returned. Otherwise (for instance if it was filtered out), the function returns another object with similar locality (for instance a parent bridge, or the local CPU Package).