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 be NULL, 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 ✨

  • 0 on success β€” ate, no crumbs. πŸŽ€
  • -1 on error β€” and if that happens, errno gets 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_id is bound to that address β€” exactly the same as if rdma_bind_addr had been called. same energy, different function name. ✨
  • if no source address is given, and the rdma_cm_id hasn't been bound to a device yet, then the rdma_cm_id gets 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_id will 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 ✨

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