Skip to content

prov/verbs: backport addr_format filter to v1.22.x (cherry-pick 8db79ab3b) - #12264

Open
alexandertimofeyev wants to merge 1 commit into
ofiwg:v1.22.xfrom
alexandertimofeyev:atimofey/backport-addr_format-filter-v1.22.x
Open

prov/verbs: backport addr_format filter to v1.22.x (cherry-pick 8db79ab3b)#12264
alexandertimofeyev wants to merge 1 commit into
ofiwg:v1.22.xfrom
alexandertimofeyev:atimofey/backport-addr_format-filter-v1.22.x

Conversation

@alexandertimofeyev

Copy link
Copy Markdown

Summary

Cherry-pick of upstream commit 8db79ab3b ("prov/verbs: Fix issue while displaying addresses with fi_info -a <addr_format>", merged 2024-07-30 by @jueedesai) onto the v1.22.x maintenance branch.

The fix is already present in main and every v2.x maintenance branch but never made it to v1.22.x. Without it, callers that pass hints->addr_format = FI_SOCKADDR_IN6 into fi_getinfo() against the verbs provider get the hint silently ignored: vrb_getinfo() validates the hint via ofi_valid_addr_format() but does not prune the returned fi_info linked list, so v4 entries from the dual-stack getifaddrs() enumeration remain at the head of the list. Downstream consumers that simply use info_list[0] end up on a v4-mapped GID even when they explicitly requested IPv6.

The patch adds the static vrb_filter_info_by_addr_format() helper and a 3-line call site at the end of vrb_getinfo(). Same code that exists in main and v2.x.

Motivation

DAOS 2.6.x pins libfabric 1.22.0-2 (utils/rpms/daos.spec). Operators running DAOS over RoCE on dual-stack networks who want to land the data plane on IPv6 (rather than a v4-mapped GID) currently have no path: FI_VERBS_GID_IDX only affects UD/DGRAM, not the verbs;ofi_rxm (RC + RDMA-CM) path used by DAOS. The forthcoming DAOS PR daos-stack/daos#18254 (DAOS-18972) passes addr_format = FI_SOCKADDR_IN6 to fi_getinfo from CaRT, but on stock libfabric 1.22 that hint is currently a no-op.

This backport closes the gap so the DAOS-side patch becomes effective on the libfabric version DAOS actually ships, without requiring DAOS to bump to libfabric ≥ 2.0.0.

Verification

  • Cherry-pick applies cleanly (no conflict) onto current v1.22.x.
  • Built on AzureLinux 3 / x86_64 against rdma-core headers; vrb_getinfo() now references ofi_match_addr_format and fi_freeinfo (compiler inlines the small static filter helper at -O2), confirmed via objdump -d and nm on the resulting verbs_info.o.
  • Behavior change is the upstream-blessed semantically-correct interpretation of hints->addr_format; no API/ABI change, no test surface impact (existing fabtests msg_sockets.c already exercises v6 sockaddrs).

Test plan

  • Local build green on v1.22.x branch
  • CI green on this PR
  • Spot-check fi_info -p verbs returns only v6 entries when FI_SOCKADDR_IN6 is requested via the API

cc @jueedesai (original author)

🤖 Generated with Claude Code

…r_format>

This commit addresses issue ofiwg#9443 for verbs provider.
Address format matching needs to happen for each info
in the linked list which was not happening earlier.
This check has been moved to the end of vrb_getinfo().

Signed-off-by: Juee Himalbhai Desai <juee.himalbhai.desai@intel.com>
Signed-off-by: Alexander Timofeyev <atimofeyev@linkedin.com>
@alexandertimofeyev

Copy link
Copy Markdown
Author

Runtime verification — RoCE on RDMA hardware

Ran fi_info against the patched build vs. the same host's stock libfabric-1.22.0-4.el9 (RoCE NIC rocep49s0, ConnectX-7 / NVIDIA OFED), to confirm the filter actually drops non-matching families.

unhinted -a FI_SOCKADDR_IN -a FI_SOCKADDR_IN6 -a FI_SOCKADDR_IB
Stock 1.22.0-4.el9 40 40 (hint ignored) 40 (hint ignored) 10
This PR (cherry-pick of 8db79ab3b) 40 4 12 6

Stock 1.22 returns the same 40 verbs/rxm entries no matter which addr_format hint is passed in — the hint is validated by ofi_valid_addr_format() but never used to prune the linked list. The patched build correctly filters to the requested family, matching the behavior already in main and v2.x maintenance branches.

This is the precise gap that prevents the DAOS-side patch daos-stack/daos#18254 from being effective on the libfabric-1.22 line that DAOS 2.6.x pins. With this backport in place, that DAOS patch will work as designed — RDMA-CM gets a v6 sockaddr in rdma_bind_addr() and the native v6 GID is selected automatically.

Happy to add a fabtests entry exercising the hint if reviewers want one; the existing msg_sockets.c already exercises v6 sockaddrs through the normal endpoint flow.

@j-xiong

j-xiong commented May 20, 2026

Copy link
Copy Markdown
Contributor

Please add a line (cherry-picked from commit xxxxxx) to the end of the commit message. This can be done automatically with the command git cherry-pick -x xxxxxx.

@shijin-aws

Copy link
Copy Markdown
Contributor

AWS CI is not running with verbs and can be ignored (and it is failing because the jenkinsfile in that branch is old using some deprecated OSes)

@j-xiong

j-xiong commented May 20, 2026

Copy link
Copy Markdown
Contributor

@alexandertimofeyev Please accept the invitation I sent to you so that the CI can run properly.

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.

3 participants