Skip to content

Commit 34d3da9

Browse files
committed
doxy: document all PCI device/bridge attributes
Signed-off-by: Brice Goglin <[email protected]>
1 parent 80ac332 commit 34d3da9

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

include/hwloc.h

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -720,12 +720,17 @@ union hwloc_obj_attr_u {
720720
} group;
721721
/** \brief PCI Device specific Object Attributes */
722722
struct hwloc_pcidev_attr_s {
723-
unsigned int domain;
724-
unsigned char bus, dev, func;
725-
unsigned char prog_if; /* the register-level programming interface */
726-
unsigned short class_id;
727-
unsigned short vendor_id, device_id, subvendor_id, subdevice_id;
728-
unsigned char revision;
723+
unsigned int domain; /**< \brief Domain number (xxxx in the PCI BDF notation xxxx:yy:zz.t). */
724+
unsigned char bus; /**< \brief Bus number (yy in the PCI BDF notation xxxx:yy:zz.t). */
725+
unsigned char dev; /**< \brief Device number (zz in the PCI BDF notation xxxx:yy:zz.t). */
726+
unsigned char func; /**< \brief Function number (t in the PCI BDF notation xxxx:yy:zz.t). */
727+
unsigned char prog_if; /**< \brief Register-level programming interface number (3rd byte of the class). */
728+
unsigned short class_id; /**< \brief The class number (first two bytes, without the prog_if). */
729+
unsigned short vendor_id; /**< \brief Vendor ID (xxxx in [xxxx:yyyy]). */
730+
unsigned short device_id; /**< \brief Device ID (yyyy in [xxxx:yyyy]). */
731+
unsigned short subvendor_id; /**< \brief Sub-Vendor ID. */
732+
unsigned short subdevice_id; /**< \brief Sub-Device ID. */
733+
unsigned char revision; /**< \brief Revision number. */
729734
float linkspeed; /**< \brief Link speed in GB/s.
730735
* This datarate is the currently configured speed of the entire PCI link
731736
* (sum of the bandwidth of all PCI lanes in that link).
@@ -736,16 +741,17 @@ union hwloc_obj_attr_u {
736741
/** \brief Bridge specific Object Attributes */
737742
struct hwloc_bridge_attr_s {
738743
union {
739-
struct hwloc_pcidev_attr_s pci;
744+
struct hwloc_pcidev_attr_s pci; /**< \brief PCI attribute of the upstream part as a PCI device. */
740745
} upstream;
741-
hwloc_obj_bridge_type_t upstream_type;
746+
hwloc_obj_bridge_type_t upstream_type; /**< \brief Upstream Bridge type. */
742747
union {
743748
struct {
744-
unsigned int domain;
745-
unsigned char secondary_bus, subordinate_bus;
749+
unsigned int domain; /**< \brief Domain number the downstream PCI buses. */
750+
unsigned char secondary_bus; /**< \brief First PCI bus number below the bridge. */
751+
unsigned char subordinate_bus; /**< \brief Highest PCI bus number below the bridge. */
746752
} pci;
747753
} downstream;
748-
hwloc_obj_bridge_type_t downstream_type;
754+
hwloc_obj_bridge_type_t downstream_type; /**< \brief Downstream Bridge type. */
749755
unsigned depth;
750756
} bridge;
751757
/** \brief OS Device specific Object Attributes */

0 commit comments

Comments
 (0)