RDMA_RESOLVE_ROUTE(3)

πŸ’– RDMA_RESOLVE_ROUTE πŸ’–

okay bestie, sit down, hydrate, and let's talk about rdma_resolve_route from the Librdmacm Programmer's Manual (yes, section 3, library calls only, we're fancy here ✨).

This is the function that figures out how to get your packets where they're going. Route info. The map. The directions. The way that your RDMA connection literally knows where to go πŸ—ΊοΈβœ¨


🌸 NAME 🌸

rdma_resolve_route β€” resolve the route information needed to establish a connection.

Like, it goes and gets the route info. So you can, y'know, connect. Iconic behaviour, no notes πŸ’…


✨ SYNOPSIS ✨

#include <rdma/rdma_cma.h>

int rdma_resolve_route (struct rdma_cm_id *id, int timeout_ms);

two arguments, one int return, we love a simple signature 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • id β€” the RDMA identifier. that's your struct rdma_cm_id *, your main character, the whole vibe.
  • timeout_ms β€” how long you're willing to wait for the resolution to finish. time to wait for resolution to complete, fr fr. patience is a virtue but so is a timeout ⏳

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜• β€” this call resolves an RDMA route to the destination address, and it does that in order to establish a connection. That's the whole point of it. That's its job. That's its moment.

But listen πŸ‘ the destination address must have already been resolved by calling rdma_resolve_addr. Already. Before this. We are NOT skipping steps in this house. If you haven't called rdma_resolve_addr yet, go do that first, bestie, this function is not gonna do it for you πŸ™ˆ


πŸ’œ RETURN VALUE πŸ’œ

  • Returns 0 on success πŸŽ‰ slay
  • Returns -1 on error 😭

and if an error happens, errno gets set to indicate the failure reason. so like, always check your errno. it's literally telling you what went wrong. it's giving helpful. read it. 🫢


🌈 NOTES 🌈

Timing check βœ… β€” this gets called on the client side of a connection, after calling rdma_resolve_addr, but before calling rdma_connect.

So the order is:

  1. rdma_resolve_addr
  2. rdma_resolve_route ← you are here
  3. rdma_connect

sandwich position. the middle child. the bridge. we respect it πŸ’…


πŸ”₯ INFINIBAND SPECIFIC πŸ”₯

For the InfiniBand girlies: this call obtains a path record that is used by the connection. That's the InfiniBand-specific detail. path record. got it. noted. slay. πŸ‘‘


🌟 SEE ALSO 🌟

go read those next, bestie, they're all connected (pun absolutely intended 😭)


and that's the whole page!! brought to you by librdmacm, dated 2007-10-31, and it lives at RDMA_RESOLVE_ROUTE(3) β€” vintage but still serving looks πŸ’–βœ¨πŸŽ€ go resolve some routes, you've got this πŸ¦‹

πŸ“¦ where this page comes from