RDMA_RESOLVE_ADDRINFO(3)
β¨ RDMA_RESOLVE_ADDRINFO β¨
okay bestie, welcome to the Librdmacm Programmer's Manual, the chapter we're covering today is RDMA_RESOLVE_ADDRINFO, and it's giving "resolve RDMA addresses which supports both DNS and IB SA." π¦ no cap, that's the whole vibe right there.
π SYNOPSIS
#include <rdma/rdma_cma.h>
int rdma_resolve_addrinfo(struct rdma_cm_id *id, const char *node, const
char *service, const struct rdma_addrinfo *hints);
π ARGUMENTS
idβ the RDMA identifier, periodt. it's your lil handle for this whole operation πnodeβ optional!! it's the name, the dotted-decimal IPv4, or the IPv6 hex address you want resolved πserviceβ the service name or the port number of the address πhintsβ a reference to anrdma_addrinfostructure stuffed full of hints about the type of service the caller supports π
π DESCRIPTION
so this call submits an asynchronous address resolution request β it literally goes "hey, figure this out, but don't make me wait" π«
the behavior is similar to rdma_getaddrinfo(), except that the operation is asynchronous, and it generates an event on the RDMA CM event channel that is associated with the specified rdma_cm_id when it's complete. the %node, %service, and %hints parameters are defined similarly to rdma_getaddrinfo(). iykyk πΈ
π₯ RETURN VALUE
- returns
0on success π and success here means asynchronous address resolution was initiated β like, the request went out, bestie, we're cooking. the result of the resolution, whether successful or failed, will be reported as an event on the related event channel. so don't celebrate OR panic until that event shows up, okay? - returns
-1on error π anderrnowill be set to indicate the failure reason. in this case the address resolution was not started, and no event will be generated on the event channel. it's giving nothing happened, it's giving silence π
π important distinction: success = "we started it", not "we finished it." two totally different things. don't @ me.
π§ NOTES π§
this call supports both DNS and IB SA resolution, and which one you get depends on the hints.ai_flags:
RAI_DNS: performs address resolution using DNS πRAI_SA: performs address resolution using the Infiniband SA. therdma_cm_idassociated with the call must be bound to an Infiniband port, or an error will occur π. the%nodeparameter must be null (it's just... not supported, sorry babe), and%Serviceshould be an IB service name or ID π«Ά
these 2 flags are mutual-exclusive β pick one, you can't have both, it's not that kind of party. if none of them is set then DNS is the default β
the cm event RDMA_CM_EVENT_ADDRINFO_RESOLVED (on success) or RDMA_CM_EVENT_ADDRINFO_ERROR (on failure) is generated π
π SEE ALSO
π AUTHOR
Mark Zhang <<markzhang@nvidia.com>>
and that's the whole page, babe π this cutie came to you straight from the Librdmacm Programmer's Manual, dated 2025-02-06, filed under RDMA_RESOLVE_ADDRINFO(3). slay, go resolve some addresses, and remember: the event channel will tell you how it went π
β¨
π¦ where this page comes from
- 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
- nixpkgs unstable: rdma-core 65.0
- 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