UCS/TOPO: Detect peer-to-peer traffic through the root complex #12403
🤖 Starting review — findings will be posted here when done.
<!-- pr-agent-review head_sha: d698753c5fe3c549cd8b0c7e57851c0df24f0fcf -->
the PR adds ~760 lines, above the 500 added-line limit in REVIEW.md. Can we split it into the root-port part (ucs_topo_sysfs_get_root_port, ucs_topo_is_same_root_port, ucs_topo_parse_bus_id refactor + tests) and the p2p-redirect detection with its config knob + tests?
Dropped candidate (impact not concrete enough): ucs_topo_is_same_root_port() returns 0 for two aliases of the same BDF when the device is not behind a root port, while returning 1 for identical sys_dev — contract asymmetry, but which answer is correct depends on the (absent) consumer.
Dropped candidate (impact not concrete enough): strtol(ucs_basename(group_path), NULL, 10) maps an unparsable link target to group 0, which collides with a real group id; kernel targets are always numeric.
Dropped candidate (impact not concrete enough): override path returns 1 for an out-of-range (non-UNKNOWN) sys_dev under on, while auto returns 0.
Dropped candidate (impact not concrete enough): ucs_topo_read_device_sysfs_info() trace line does not print the newly read root_port.
Coverage gaps worth noting: the fake-sysfs fixture covers ACS isolation, domain types, peer class, and root-port parsing well, but the auto path on real hardware is only cross-checked for self-consistency in sysfs_root_port (sysfs helper vs sys_dev API); no test asserts a true positive on real topology, and devices behind VMD-style nested domains are not walked (pci10000:e0 fails the BDF name filter).
🤖 Starting review — findings will be posted here when done.
<!-- pr-agent-review head_sha: 30a2b629c1c3ff89f49528576ca52cb3de8d41c4 -->
Can we split it into the root-port part (ucs_topo_sysfs_get_root_port,ucs_topo_is_same_root_port,ucs_topo_parse_bus_idrefactor + tests) and the p2p-redirect detection with its config knob + tests?
Split this way, the root-port part is about 200-280 lines with its tests, and the detection with the option and its tests about 500-600, so it would still be at or over the limit, and with the UCP part the series would become three stacked PRs. About 330 of the added lines are tests, so I'd keep it as one PR.
UCX_TOPO_P2P_REDIRECT and both new APIs (ucs_topo_sys_device_is_p2p_redirected, ucs_topo_is_same_root_port) have no caller outside gtest, so a user who sets the new knob gets no effect from it. Is the consumer coming in a follow-up, or can it come together with this change?
UCX_TOPO_P2P_REDIRECTand both new APIs (ucs_topo_sys_device_is_p2p_redirected,ucs_topo_is_same_root_port) have no caller outside gtest, so a user who sets the new knob gets no effect from it. Is the consumer coming in a follow-up, or can it come together with this change?
will be used in follow-up PR
🤖 CI Triage Agent — UCX PR (Tests roce on worker 0) · commit 30a2b629
TL;DR: The run_rc_verbs_nosrq_gtest task hung for 15 minutes inside uct_test::flush() during rc_verbs/test_rc_get_limit.post_get_no_res/1 and was killed by the gtest watchdog (SIGABRT/core) — the new no‑SRQ rc_verbs path lets the FC window exceed the receive WRs actually posted on the peer QP, producing an RNR that is retried forever (RNR_RETRY_COUNT=7 = infinite), so the sends never complete. This is unrelated to PR #12403 and is already being tracked by #12324.
<details><summary>Full analysis</summary>
Summary: Azure job "roce on worker 0" failed at make -C test/gtest test (exit 2, core dumped) because rc_verbs/test_rc_get_limit.post_get_no_res/1 <rc_verbs/mlx5_1:1> hung and the gtest watchdog aborted the process.
Root cause: Log timestamps show the test start at 09:14:48 and the next line at 09:29:48 — a single ~15‑minute gap with zero output, i.e. a hang, not slowness. The watchdog fired (test_helpers.cc:57 Failed / Connection timed out - abort testing) and the backtrace shows the thread spinning in uct_test::flush() → uct_worker_progress → uct_rc_verbs_iface_progress → uct_rc_verbs_iface_poll_rx from test_rc.cc:2217, i.e. outstanding AM sends never completed.
The task runs with UCX_RC_VERBS_SRQ_ENABLE=n UCX_RC_VERBS_RX_MAX_WR=64 (contrib/test_jenkins.sh:1297‑1315), and the test itself sets RC_TX_QUEUE_LEN=32 (test_rc.cc:2025). In the no‑SRQ path:
rx_batch_limit = max(min(16, 64/4),1) = 16, and a fresh EP preposts only 2 rx_max_batch = 32 receive WRs (rc_verbs_ep.c:701‑708).fc_max_wnd_size = (rx_max_wr - rx_batch_limit + 1)/(1 + soft_thresh) = 49/1.5 = 32 (rc_verbs_iface.c:398‑400), whose own comment admits: "A grant resets the peer window while earlier sends may be in flight … a fresh QP's smaller prepost may still cause RNR on its first burst."post_get_no_res deliberately posts AMs until UCS_ERR_NO_RESOURCE, so the sender has a full burst in flight against a QP whose RQ is only partially refilled → RNR NAK. With the default UCX_RC_RNR_RETRY_COUNT=7 (rc_iface.c:52), which means infinite RNR retry in IB, the send neither completes nor errors, so uct_iface_flush() returns UCS_INPROGRESS forever and the test loops until the 900 s watchdog kills it.
Implicated commit: 75371a03 — "UCT/IB/RC/VERBS: Support QPs without SRQ (#12066)", Guangguan Wang (added both the no‑SRQ receive path and the run_rc_verbs_nosrq_gtest CI task). Not caused by the PR under test (30a2b629, topic/ucx/acs-p2p-topo).
File: src/uct/ib/rc/verbs/rc_verbs_iface.c:395-400 (no‑SRQ fc_max_wnd_size) together with src/uct/ib/rc/verbs/rc_verbs_ep.c:701-708 (prepost of only 2 batches); test harness spin at test/gtest/uct/uct_test.cc:818-835.
Suggested fix:
1. Make the no‑SRQ flow‑control window provably safe: bound init_attr.fc_max_wnd_size by the WRs actually posted at EP creation (2 rx_max_batch), or prepost the full rx_max_wr on EP creation, and refill the RQ before sending a FC pure‑grant (uct_rc_ep_fc_grant) so the restored peer window can never exceed posted receive buffers.
2. As an immediate CI de‑flake, land the already‑open #12324 approach: set a finite UCX_RC_RNR_RETRY_COUNT (e.g. 6) in run_rc_verbs_nosrq_gtest so an RNR starvation surfaces as an endpoint error/test failure within seconds instead of a 15‑minute watchdog abort.
3. Do not raise the watchdog/timeout 200m limit — the log shows a hard hang, not a job that needed more time.
4. Re-run the PR; this failure is almost certainly not attributable to the ACS p2p topology changes.
Related: https://github.com/openucx/ucx/pull/12324 (AZP/TESTS: Limit RNR retries in the no-SRQ gtest task), https://github.com/openucx/ucx/pull/12066 (UCT/IB/RC/VERBS: Support QPs without SRQ), https://github.com/openucx/ucx/pull/11933
</details>
<!-- triage-agent request_id: 0f1d46e0-a7b0-4957-8307-366f1bbcc1fd -->
<!-- triage-agent gha_run_id: azure:146554 -->
<!-- triage-agent-bot -->
<!-- ucx-cla-check -->
CLA check passed
All commits are covered by a signed CLA.
🤖 Starting review — findings will be posted here when done.
<!-- pr-agent-review head_sha: 32db61a9fbc3cd274571a24089b4dbb94d4b3924 -->
🤖 CI Triage Agent — CLA · commit 32db61a9
TL;DR: The CLA gate failed because two of the four new commits in PR #12403 ([REDACTED:Hex High Entropy String], [REDACTED:Hex High Entropy String]) carry no verified GPG/SSH signature; the contributor needs to sign those commits and force-push. This is a legitimate policy failure, not a CI bug.
<details><summary>Full analysis</summary>
Summary: GitHub Actions job CLA (run 45816947210) exited 1 from buildlib/tools/cla_check.sh with "CLA check failed - Commits without a verified signature: [REDACTED:Hex High Entropy String] (unsigned), [REDACTED:Hex High Entropy String] (unsigned)."
Root cause: cla_check.sh enumerates commits reachable from the PR head but not from master/release branches (4 commits here) and queries repos/openucx/ucx/commits/<sha> for .commit.verification.verified. Two commits returned verified == false with reason unsigned, so they were appended to the unsigned[] array, failed was set to 1, and the script emitted ::error::CLA check failed and exit 1 (script lines 84–96, 137, 165–168). Notably there was no "No signed CLA on file for these commit emails" section, so the author/committer emails are already covered by CLA_INDIVIDUALS/CLA_ENTITIES — the only deficiency is the missing commit signatures. The job itself ran cleanly: checkout, list validation, and the gh api calls all succeeded in ~5 seconds, with no timeouts, network errors, or gaps in the log.
Implicated commit: Not a tooling regression. The offending PR commits are [REDACTED:Hex High Entropy String] and [REDACTED:Hex High Entropy String] on topic/ucx/acs-p2p-topo (PR #12403, head [REDACTED:Hex High Entropy String]). The checker itself was last touched by 7105ac77 (Alexey Rivkin, 2026-11-07) and is behaving as designed.
File: buildlib/tools/cla_check.sh:86 (verification predicate) and buildlib/tools/cla_check.sh:165-168 (failure exit)
Suggested fix: The PR author should sign the two unsigned commits and force-push — e.g. configure signing (git config user.signingkey <key>, git config commit.gpgsign true, or gpg.format=ssh with an SSH signing key registered as a signing key on GitHub), then rewrite the branch with git rebase --exec 'git commit --amend --no-edit -S' origin/master (or git rebase -i --signoff-style amend of just those two commits) and git push --force-with-lease. Confirm on the PR's commit list that both show the green "Verified" badge, then re-run the CLA check. No change to cla_check.sh or the workflow is warranted; if commits were created by a merge/rebase through a tool that drops signatures, re-sign after that step.
Related: Checker docs: .github/CONTRIBUTING.md items 1 and 2 (linked from the failure summary). Same-signature failures appear on several open PRs (#12476, #12406, #12380, #12376, #12370), suggesting contributors broadly aren't signing yet — worth a reminder in the PR template rather than a code change.
</details>
🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 4983df14-8c50-43dd-8efc-992fecb5681a in the triage console for the audit trail.<!-- triage-agent request_id: 4983df14-8c50-43dd-8efc-992fecb5681a -->
<!-- triage-agent gha_run_id: 45816947210 -->
<!-- triage-agent-bot -->
The supplied input has no PR title or description, so their consistency with the changes and the PR template could not be checked.
No command-execution tool or CI results were available, so the build and added topology tests could only be reviewed statically, not run or verified against CI.
🤖 Starting review — findings will be posted here when done.
<!-- pr-agent-review head_sha: d0d089be9569f56397aff2c9310a7208e8129495 -->
🤖 CI Triage Agent — Blossom-CI · commit d0d089be
TL;DR: Nothing in UCX actually built or tested — the Blossom-CI Authorization gate aborted with exit 255 because GitHub reported PR #12403 as "not mergeable"; fix by rebasing/merging topic/ucx/acs-p2p-topo onto master to clear the conflict (and ideally make the AUTH step retry when GitHub's mergeable field is still unresolved).
<details><summary>Full analysis</summary>
Summary: Blossom-CI run 45851881374 failed in the first job (Authorization, step blossom-ci with OPERATION: AUTH) with Pull request not mergeable !!! → Process completed with exit code 255; the downstream Vulnerability-scan / Job-trigger stages never ran.
Root cause: This is a CI gating failure, not a product/test failure. The log shows all authorization checks succeeding — All 4 commit(s) on PR #12403 passed GPG + NVIDIA SSO checks — and then immediately:
15:43:22.9341950Z Pull request not mergeable !!!
15:43:23.3302095Z PR State: open
15:43:24.0642563Z ##[error]Process completed with exit code 255.
The
blossom-ci AUTH helper queries the PR's mergeable flag and hard-fails when it is not true. Two things make that flag false here:1. The PR branch
topic/ucx/acs-p2p-topo (head [REDACTED:Hex High Entropy String]) has diverged from / conflicts with the base branch, so GitHub marks it unmergeable.2. The timing is also consistent with a race: this run was triggered by a
pull_request_target event (Evaluating: ... ('pull_request_target' == 'pull_request_target') → Result: true), and the mergeability query happens only ~3 seconds after the runner picked up the job (15:43:19 → 15:43:22). GitHub computes mergeable asynchronously and returns null ("unknown") for several seconds after a push/PR event; null is not true, so the gate fails. This failure mode became reachable on every PR push when auto-triggering on PR events was added in commit 68af19f8.There is no hang and no large timestamp gap — total runtime is ~5 seconds, so this is a fast, deterministic gate rejection.
Implicated commit: 68af19f8 — "CI: Trigger Blossom CI automatically on PR events (#12235)", Alexey Rivkin (enables AUTH on pull_request_target: [opened, synchronize, reopened], exposing the mergeability gate to races). The head commit under test, d0d089be (dmitrygx, PR #12403), is implicated only insofar as its branch is currently not mergeable.
File: .github/workflows/blossom-ci.yml:15-16 (the pull_request_target trigger) and .github/workflows/blossom-ci.yml:37-44 (the Authorization / OPERATION: AUTH step that exits 255)
Suggested fix:
1. Primary, actionable by the PR author: rebase or merge the base branch into topic/ucx/acs-p2p-topo to resolve the conflict, then re-trigger with a /build comment. Confirm the PR page no longer shows "This branch has conflicts that must be resolved."
2. CI robustness: make the AUTH step tolerate an unresolved mergeability state instead of failing immediately — poll the PR mergeable field a few times (e.g. 5 retries, 2–3 s apart) and only fail when it is definitively false, treating null as "retry". Alternatively, distinguish the two cases in the exit status so a genuine conflict reports a clear "PR has conflicts" status check rather than a bare exit 255, which currently looks like an infrastructure error to developers.
3. Optionally drop synchronize from the pull_request_target types, or add a short delay before the mergeability query, to avoid firing AUTH in the window where GitHub has not yet computed mergeability.
Related: PR #12403 "UCS/TOPO: Detect peer-to-peer traffic through the root complex" (https://github.com/openucx/ucx/pull/12403); PR #12235 (CI: Trigger Blossom CI automatically on PR events) introduced the auto-trigger path.
</details>
🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id b7926840-e281-4f3f-9c1b-c23161a62f4d in the triage console for the audit trail.<!-- triage-agent request_id: b7926840-e281-4f3f-9c1b-c23161a62f4d -->
<!-- triage-agent gha_run_id: 45851881374 -->
<!-- triage-agent-bot -->
🤖 Review complete — no issues found.
🤖 Starting review — findings will be posted here when done.
<!-- pr-agent-review head_sha: 46f9439f6378fa65076724792099debb53138f3c -->
🤖 Review complete — no issues found.
🤖 CI Triage Agent — UCX-OSS/ucx-static-checks-oss · commit 46f9439f
TL;DR: The static-checks build was killed by the pipeline's 90-minute timeout ("Cancelling nested steps due to timeout") only ~4 minutes after the compile actually started — ~82 of the 90 minutes were burned waiting for the Kubernetes build pod inside the Parallel branch, so this is CI capacity/timeout-scoping, not a code failure in PR #12403.
<details><summary>Full analysis</summary>
Summary: UCX-OSS/ucx-static-checks-oss #319, branch x86_64/fedora33, stage "Static Checks" was interrupted mid-make by FlowInterruptedException: Timeout has been exceeded; no compiler or static-analyzer error was reported.
Root cause: Timeline from the logs:
Checkout source code finished in 34 s; the Parallel stage ran 5,410,008 ms (90.17 min — exactly the pipeline timeout) and ended at 17:25:25Z, i.e. it started ≈15:55Z.Static Checks stage only ran 447 s (17:17:48Z → 17:25:15Z). So ~82 minutes elapsed inside the parallel branch before the build script ever executed — that window is the podTemplate/node block (agent pod provisioning/queueing), which produces no stage log.make -j192 through ucm → ucs → uct → ucp) and was cut at 17:21:33→17:25:15 while compiling src/ucp under the csclng/cscppc/cswrap analyzer wrappers. The only "gap" (3.7 min) is normal analyzer compile time at -j oversubscription, not a hang.buildlib/tools/static_checks.sh:19 runs make -j$(nproc) (192 in #319, 64 in #317) and bypasses the container-aware parallelism logic in buildlib/tools/common.sh:21-41 (which caps NPROC at 16 based on the cgroup memory limit). With recently reduced pod CPU/memory requests this makes the analyzer build far slower/OOM-prone than it needs to be, so it has no slack when the queue eats the budget.Implicated commit: unknown (no product-code cause). Suspect recent CI pod-sizing/placement changes: 13e90b0c "CI: Set the Jenkins pod requests from their measured use", 89ad205d "CI: Lower the resource requests of the Jenkins build pods", b6f5f32a "CI: Run the x86_64 Fedora 44 build on nodes with kernel 5.15" (all Alexey Rivkin). The PR head commit 46f9439f is not implicated.
File: buildlib/tools/static_checks.sh:19 (secondary); primary is the Jenkins pipeline timeout/podTemplate definition for the ucx-static-checks-oss job (not resolvable from the repo tree here).
Suggested fix:
1. Move the timeout(...) wrapper inside the node {}/container {} block so the 90-minute budget starts when the agent pod is actually running, instead of counting pod-pending time; or add a short, separate timeout for pod acquisition that fails fast with a clear "pod not scheduled" error.
2. Investigate the pod scheduling stall at 15:55–17:17Z (pending pods / node-selector + request changes from #12420, #12378, #12456); revert or relax the node selector/requests for the static-checks lane if pods can't be placed.
3. Replace make -j\nproc\` with the container-aware value already computed in common.sh, e.g. make -j"${NPROC}"`, so the analyzer build matches the pod's CPU/memory limits.
4. Re-run #319 — it should pass once a pod is scheduled promptly; no code change in PR #12403 is needed.
Related: https://github.com/openucx/ucx/pull/12420, https://github.com/openucx/ucx/pull/12378, https://github.com/openucx/ucx/pull/12456, https://github.com/openucx/ucx/pull/12168
</details>
<!-- triage-agent request_id: 88054a1f-2c5e-4a7d-9b19-a4827e90ee09 -->
<!-- triage-agent gha_run_id: status:SC_kwDOAYNCPs8AAAAN98AXrg -->
<!-- triage-agent-bot -->
🤖 Starting review — findings will be posted here when done.
<!-- pr-agent-review head_sha: 2a6858cb76d0f0e4808e5076635e16bbc33750fe -->
🤖 Review complete — no issues found.
🤖 CI Triage Agent — UCX PR (UCXX_build UCXX wheel-tests-ucxx (x86_64_cuda12_py312)) · commit 2a6858cb
TL;DR: The wheel-tests-ucxx step was killed by its timeout wrapper (bash exit code 124) because the pytest‑xdist session hung — four workers were still stuck inside test_reset.py::test_closed_endpoint_holding_context_is_tracked_and_cleaned_up and test_worker.py::test_worker_capabilities_env[] when the watchdog dumped gdb stacks and killed the process tree; nothing in PR #12403's diff (UCS topology root‑port/ACS detection) is reachable from that code path, so this looks like a hang/flake in the UCXX async teardown tests rather than a regression from this PR.
<details><summary>Full analysis</summary>
Summary: UCXX wheel test job (x86_64_cuda12_py312) timed out — ##[error]Bash exited with code '124' after the test harness captured Python/C stack traces of all hung python processes and printed Terminating process tree....
Root cause: Evidence from the log:
timeout(1) expiring, i.e. a wall‑clock kill — a symptom. The harness first ran its hang handler ("Capturing Python stack trace for process …" for every live python process), which only happens when the suite stopped making progress.multiprocessing/resource_tracker.py:252 → for line in f blocked in read() — normal idle state, not the cause.id='gw4-worker') is deep inside a pytest hook dispatch via execnet (frames #25–#27 HookCaller → _PyEval_EvalFrameDefault), i.e. it was executing a test* and not progressing. The top frames (which would name the blocking call) fall above the 500‑line log truncation.node down: Not properly terminated, attributing the stall to python/ucxx/ucxx/_lib_async/tests/test_reset.py::test_closed_endpoint_holding_context_is_tracked_and_cleaned_up (gw4) and test_worker.py::test_worker_capabilities_env[False-False|False-True|True-True] (gw0/gw1/gw3). The teardown then raised OSError: cannot send (already closed?) in pytest_sessionfinish, which is fallout of the forced kill, not a cause.So: a hang in UCXX's _lib_async endpoint/context teardown and worker‑capability tests, not a slow-but-progressing run.
I checked whether PR #12403 could explain it and it does not: the branch's commits ([REDACTED:Hex High Entropy String], 7fd3068d, d0d089be, 2a6858cb) only touch src/ucs/sys/topo/base/topo.c|topo.h|topo_int.h. At runtime they add (a) ucs_topo_sysfs_get_root_port() parsing inside ucs_topo_read_device_sysfs_info() at system‑device registration and (b) the UCX_TOPO_PCI_P2P_PATH option. The new scanning API ucs_topo_sysfs_is_p2p_redirected() / ucs_topo_sys_device_is_p2p_redirected() has no production caller in the tree (it is declared in topo_int.h "for unit tests"); ucs_topo_is_reachable() — the one used in the registration path via ucp_memh_sys_dev_reachable() — does not call it. The lock handling in ucs_topo_sys_device_is_p2p_redirected() is also balanced (drops the spinlock around the sysfs scan), and the string loops in ucs_topo_sysfs_get_root_port() terminate.
Implicated commit: unknown for the hang (not attributable to 2a6858cb / d0d089be / [REDACTED:Hex High Entropy String] by Dmitrii — those are UCS‑topo only and unreachable from the hung tests).
File: python/ucxx/ucxx/_lib_async/tests/test_reset.py::test_closed_endpoint_holding_context_is_tracked_and_cleaned_up and python/ucxx/ucxx/_lib_async/tests/test_worker.py::test_worker_capabilities_env (ucxx repo); UCX side reviewed and cleared: src/ucs/sys/topo/base/topo.c:1727-1810
Suggested fix:
1. Treat this as an unrelated UCXX job hang/flake: re-run the UCXX wheel-tests-ucxx (x86_64_cuda12_py312) job, and confirm it also fails on the PR's merge base — if it does, it is not caused by #12403.
2. To get an actionable root cause next time, make the harness fail per‑test instead of per‑session: add pytest-timeout (--timeout=<N> --timeout-method=thread) so the hanging test is reported with its own traceback, and raise the retained log size / upload the full pytest log as an artifact (the current 500‑line tail cuts off exactly the frames that name the blocking call, plus all progress output before the stall).
3. Then investigate the UCXX async teardown path exercised by test_closed_endpoint_holding_context_is_tracked_and_cleaned_up (endpoint closed while still holding the UCX context — progress/worker‑thread join on cleanup is the usual deadlock site).
Related: PR #12403 "UCS/TOPO: Detect peer-to-peer traffic through the root complex" (https://github.com/openucx/ucx/pull/12403) — the triggering PR, reviewed and not implicated. No existing issue found for this UCXX timeout.
</details>
🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id ed7503a6-dd18-445a-9fab-4637f93e5a5c in the triage console for the audit trail.<!-- triage-agent request_id: ed7503a6-dd18-445a-9fab-4637f93e5a5c -->
<!-- triage-agent gha_run_id: azure:148043 -->
<!-- triage-agent-bot -->
dmitrygx
What?
Add
ucs_topo_sys_device_is_p2p_redirected(), which tells whether PCIepeer-to-peer traffic between a device (e.g. NIC) and the other devices under its
PCIe root port goes through the root complex, and
ucs_topo_is_p2p_redirected(), which tells it for the memory of another device(e.g. GPU) under the same root port. Also add the
UCX_TOPO_PCI_P2P_PATH=auto|root|directoption.Why?
With ACS redirect or IOMMU address translation, the peer-to-peer traffic
between a NIC and a GPU behind one PCIe switch goes up to the root complex and
back down, so it crosses the root port link a second time, together with the
host memory traffic of these devices. A follow-up UCP PR, stacked on this one
(diff),
uses these functions to select lanes that avoid this on same-host endpoints: on
8x B200 nodes, a host-to-GPU transfer between two NIXL agents on one node goes
from 24.1 to 42.6 GB/s.
How?
ucs_topo_sys_device_is_p2p_redirected(): the IOMMU translates the addressesof the device, or another device under the root port is in a different IOMMU
group (the kernel separates them only when ACS redirects the traffic). One
loop over the PCI devices on the buses of the root port, except the bridges
and the functions of the device, on the first call. It depends only on the
node, so all the processes of a node get the same answer, which the lane
selection of both peers needs. A device with an auxiliary device, e.g. a
Direct NIC, is never redirected.
ucs_topo_is_p2p_redirected(): the memory is under the root port of thedevice, and the check above is true for the device.
UCX_TOPO_PCI_P2P_PATH=root|directoverrides the detection, e.g. when ACS waschanged at run time.