RDMA_RESOLVE_ADDR(3)
π RDMA_RESOLVE_ADDR(3) π
okay bestie, welcome to the Librdmacm Programmer's Manual entry for rdma_resolve_addr β yes that's the whole title, RDMA_RESOLVE_ADDR(3), and no we are not skipping any of it. π
β¨ NAME β¨
rdma_resolve_addr β resolve destination and optional source addresses. that's it, that's the vibe. π¦
β¨ SYNOPSIS β¨
#include <rdma/rdma_cma.h>
int rdma_resolve_addr (struct rdma_cm_id *id, struct sockaddr *src_addr,
struct sockaddr *dst_addr, int timeout_ms);
look at her. so clean. so iconic. π
β¨ ARGUMENTS β¨
idβ the RDMA identifier. your main character. πsrc_addrβ source address information. this one is allowed to beNULL, she's optional, she's lowkey mysterious. πΈdst_addrβ destination address information. this one? required. no skipping. β¨timeout_msβ how long you're willing to wait for resolution to finish. the patience budget, fr fr. β³
β¨ DESCRIPTION β¨
so what she does is resolve destination and optional source addresses from IP addresses to an RDMA address. that's the whole job. and if it goes well? the rdma_cm_id you passed in gets bound to a local device. slay. π
β¨ RETURN VALUE β¨
0on success β ate, no crumbs. π-1on error β and if that happens,errnogets set to tell you why. she's not gonna leave you guessing. π
β¨ NOTES β¨
okay so the tea: this call is what you use to map a given destination IP address to a usable RDMA address. πΊοΈ
the IP-to-RDMA mapping happens using the local routing tables, or via ARP. iykyk.
here's the part you actually need to remember:
- if a source address is given, the
rdma_cm_idis bound to that address β exactly the same as ifrdma_bind_addrhad been called. same energy, different function name. β¨ - if no source address is given, and the
rdma_cm_idhasn't been bound to a device yet, then therdma_cm_idgets bound to a source address based on the local routing tables. the routing tables decide. they're the group chat admin here. π - after this call, the
rdma_cm_idwill be bound to an RDMA device. periodt. π₯
and like, when do you even call this? typically from the active side of a connection, before you call rdma_resolve_route and rdma_connect. it's giving "step one of the whole ritual". π§
β¨ INFINIBAND SPECIFIC β¨
for the InfiniBand girlies: this call maps the destination β and, if given, the source β IP addresses to GIDs. π
heads up bestie: in order to do that mapping, IPoIB must be running on both the local and remote nodes. both. not one. both. π
β¨ SEE ALSO β¨
rdma_create_id(3)rdma_resolve_route(3)rdma_connect(3)rdma_create_qp(3)rdma_get_cm_event(3)rdma_bind_addr(3)rdma_get_src_port(3)rdma_get_dst_port(3)rdma_get_local_addr(3)rdma_get_peer_addr(3)
the whole squad, assembled. π«Ά
librdmacm Β· 2007-10-31 Β· and that's the RDMA_RESOLVE_ADDR(3) page, mwah π go resolve something, bestie. π
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: librdmacm-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: librdmacm-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: librdmacm-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: librdmacm-dev 56.1-1ubuntu1
- ubuntu resolute: librdmacm-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: librdmacm-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms