Skip to content

rdma_topo: NUMA-based topologies and multi-PF systems#1779

Open
EdwardSro wants to merge 7 commits into
linux-rdma:masterfrom
EdwardSro:pr-rdma-topo-vr
Open

rdma_topo: NUMA-based topologies and multi-PF systems#1779
EdwardSro wants to merge 7 commits into
linux-rdma:masterfrom
EdwardSro:pr-rdma-topo-vr

Conversation

@EdwardSro

Copy link
Copy Markdown
Member

Extend the rdma_topo helper to cover a class of NIC/GPU platforms in which the RDMA NICs and the GPU are each attached directly under a CPU root port rather than through a shared PCIe switch. Prior to this series the tool recognized only:

  • DMA-based topology (i.e. dedicated ConnectX DMA function under a Grace root port behind two nested ConnectX switches)
  • Inline topology (i.e. single CX NIC and a single GPU sharing a CX switch).

Grace-Blackwell (GB200) + ConnectX-7, Grace-Vera (Vera Rubin), and similar NIC-on-CPU-root platforms don't match either shape. Attempting to classify them as inline caused rdma_topo topo to abort with an unhandled ValueError traceback when a GPU was directly attached to a Grace root port.
This series introduces a third topology class, NUMA-based, that recognizes those platforms explicitly.

Add infrastructure and tests for grouping CX PFs into a hierarchical NIC / Board model, in preparation for machines that expose more than one CX PF per complex.
The new NUMA-based topology is the first end-to-end consumer of the infrastructure.

The series also overhauls error handling in PCITopo construction, converting several previously unhandled ValueError sites to a typed CommandError so unsupported topologies produce a single friendly line instead of a Python traceback.

vladum added 7 commits July 23, 2026 13:19
Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Replace the TOPO_NOT_SUPPORTED singleton and has_cx_dma/has_gpu_and_nic
boolean flags with structured alternatives:

  * CommandError.Level (ERROR/WARNING) with self-formatting __str__

  * TopoNotSupportedError: unrecognized topology (expected on
    yet to be supported platforms)

  * TopoUnexpectedError: inconsistency in the topology which should not
    happen in practice (prompts the user to report the issue)

  * DumpParsingError: malformed sysfs dump input

  * PCITopo.TopoType enum (INLINE/DMA) replacing the boolean pair

A prior patch introduced a regression where certain topologies that were
previously rejected cleanly by printing the "not supported" message
instead fell through to the inline topology path and raised an unhandled
ValueError.

Drop .supported property from PCITopo and all post-construction checks
done by callers.

Fixes: f8f0f10 ("rdma_topo: Add support for inline topologies")
Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
There is no reason to skip this boolean when False.

Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Will be used to group CX NICs with the same SN into NIC boards.

Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Add topology model that groups CX PFs into NICs (by shared parent
bridge) and NICs into boards (by shared VPD SN). Useful for future
system topologies with multiple CX PFs in the same complex.

Produce both JSON (to_dict) and human-readable (topo_str) output with
deterministic ordering throughout.

Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Cover all branches of NVCX_Topo and its nested PF, NIC, and Board
types using mock PCIDevice objects.

Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Some platforms connect GPUs directly under a CPU root port rather than
through a shared CX switch, making the existing Inline and DMA topology
detectors inapplicable. Add a new type of complex that groups NICs and
GPUs by NUMA node.

Add two new root port device IDs mapped to a new vera_rp device type.

Move parent/child PCI device linking into __load_devices so the parent
relationship is available during topology type detection.

Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
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.

2 participants