Skip to content

infiniband-diags: Add build_dr_path_to_lid and use it in iblinkinfo#1755

Open
mazorasaf wants to merge 1 commit into
linux-rdma:masterfrom
mazorasaf:lib_dr
Open

infiniband-diags: Add build_dr_path_to_lid and use it in iblinkinfo#1755
mazorasaf wants to merge 1 commit into
linux-rdma:masterfrom
mazorasaf:lib_dr

Conversation

@mazorasaf

@mazorasaf mazorasaf commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Add build_dr_path_to_lid() to the ibdiags_tools library so all
infiniband-diags tools can build a direct route (DR) path to a
destination LID. It follows switch Linear Forwarding Tables via live
SMP queries.

This is needed for XDR: SMP via LID is not guaranteed to work in XDR
fabrics, so utilities must be able to build and walk a direct route to
reach a destination LID.

Use it in iblinkinfo: when a start point is given via -S/-G, resolve the
GUID to a LID and build a DR path to it so the partial scan starts from a
DR-addressed portid instead of relying on LID routing.

@rleon

rleon commented Jun 9, 2026

Copy link
Copy Markdown
Member

Everything is wrong with this commit. Please review your AI generated code before submitting to rdma-core.

As a beginning, nothing in the rdma-core code calls to your newly internally added build_dr_path_to_lid() function.

Thanks

Add build_dr_path_to_lid() to the ibdiags_tools library so all
infiniband-diags tools can build a direct route (DR) path to a
destination LID. It follows switch Linear Forwarding Tables via live
SMP queries.

This is needed for XDR: SMP via LID is not guaranteed to work in XDR
fabrics, so utilities must be able to build and walk a direct route to
reach a destination LID.

Use it in iblinkinfo: when a start point is given via -S/-G, resolve the
GUID to a LID and build a DR path to it so the partial scan starts from a
DR-addressed portid instead of relying on LID routing.

Signed-off-by: Asaf Mazor <amazor@nvidia.com>
@mazorasaf mazorasaf changed the title infiniband-diags: Add build_dr_path_to_lid in new libdr infiniband-diags: Add build_dr_path_to_lid and use it in iblinkinfo Jun 9, 2026
@mazorasaf

Copy link
Copy Markdown
Contributor Author

Fixed..

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