Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/infiniband

FieldValue
SubsystemRDMA/IB core, drivers/infiniband/core/device.c (class ib_class, name “infiniband”) and core/sysfs.c (port and counter attrs)
Config gateCONFIG_INFINIBAND
ABI documentationDocumentation/ABI/stable/sysfs-class-infiniband (130 What: entries)
SinceCore device and port attrs v2.6.12; fw_ver 4.10; link_layer 2.6.37; hw_counters 4.6; gid_attrs 4.4 (dates from the ABI file)
Live (5.10.134 host)none observed (no RDMA hardware in the container; class absent from the cached enumeration)
Ledger IDSYSC-infiniband

What it represents

One device per RDMA/InfiniBand HCA (or usNIC, RoCE-capable NIC, qib/hfi1 adapter) registered by its low-level driver, with per-port and per-counter subdirectories. Sibling classes: infiniband_mad.md (umad/issm devices), infiniband_verbs.md (uverbs devices), infiniband_srp.md (SRP initiator hosts).

Relationship to the device model

Each class device is a child of the PCI (or platform) device of the HCA. Per-port subdirectories expose link state and counters; driver-specific sections of the ABI file add files per adapter family (mthca, mlx4, mlx5, cxgb4, qib, hfi1, usnic, ocrdma, qedr, vmw_pvrdma, bnxt_re).

Attributes (representative; the ABI file has 130 What: entries, here 12 rows)

AttributeR/WMeaning (source: ABI stable/sysfs-class-infiniband)
node_type, node_guid, sys_image_guidRONode type (CA, RNIC, switch, router); node and system image GUIDs (v2.6.12)
node_descRWNode description, typically hostname, for IB network management (v2.6.17)
fw_verROFirmware version (v4.10)
ports/<n>/lid, rate, lid_mask_count, sm_sl, sm_lidROPort LID, data rate (active width x speed), LID mask count, subnet manager SL and LID (v2.6.12)
ports/<n>/stateRODOWN, INIT, ARMED, ACTIVE or ACTIVE_DEFER
ports/<n>/phys_stateROPhysical state: Sleep, Polling, LinkUp, etc
ports/<n>/cap_maskROPort capability mask; two bits settable (IsCommunicationManagementSupported, IsSM)
ports/<n>/link_layerROInfiniband or Ethernet link layer (v2.6.37)
ports/<n>/counters/*RO21 counter files (symbol_error through port_xmit_wait) mirroring the IB PortCounters attribute
hw_counters/lifespanRWCache refresh interval in ms, 0-10000, default 10 (v4.6)
ports/<n>/gid_attrs/{ndevs,types}/<idx>RONetdev name and RoCE type (IB/RoCE v1 or RoCE v2) per GID index (v4.4)
mthcaX/hw_rev, hca_type, board_id (and per-driver equivalents)ROHardware revision, HCA type, board id

Safety and writes

node_desc and hw_counters/lifespan are the documented write paths; everything else is read-only. Counter names contain intentional ABI quirks (for example port_rcv_contraint_errors and VL15_dropped) that tools parse literally. None observed on the container host.

References