RDMA_GET_REMOTE_ECE(3)

πŸ’… RDMA_GET_REMOTE_ECE πŸ’…

okay so this one's from the Librdmacm Programmer's Manual (that's RDMA_GET_REMOTE_ECE(3) if you're keeping score, and yes the title is doing the absolute most with the all-caps, we love that for it) ✨


🌸 NAME 🌸

rdma_get_remote_ece β€” bestie, this is the one that grabs the remote ECE parameters exactly as they came in from the peer. no cap, that's the whole job 🫢


✨ SYNOPSIS ✨

#include <rdma/rdma_cma.h>

int rdma_get_remote_ece(struct rdma_cm_id *id, struct ibv_ece *ece);

πŸ¦‹ DESCRIPTION πŸ¦‹

so rdma_get_remote_ece() gets you the ECE parameters as were received from the communication peer. that's it, that's the vibe πŸ’–

this function is supposed to be used by the users of external QPs. like, you're the main character running your own QP, iykyk. the call needs to happen before you reply to the peer, and it's needed so the passive side can actually know the ECE options of the other side. lowkey essential.

and here's the catch, because there's always a catch πŸ™ˆ β€” since an external QP is in play and RDMA_CM doesn't manage that QP, the peer needs to call the libibverbs API by itself. no hand-holding here, bestie, you're on your own for that part.

the usual flow for the passive side is literally this:

  • ibv_create_qp() <- create data QP. πŸŽ€
  • ece = rdma_get_remote_ece() <- get ECE options from remote peer
  • ibv_set_ece(ece) <- set local ECE options with data received from the peer
  • ibv_modify_qp() <- enable data QP
  • rdma_set_local_ece(ece) <- set desired ECE options after respective libibverbs provider masked unsupported options
  • rdma_accept()/rdma_establish()/rdma_reject_ece()

like, read it top to bottom, don't skip steps, the order is the whole point πŸ”₯


⭐ ARGUMENTS ⭐

  • *id β€” RDMA communication identifier. your little handle on the conversation πŸ’…
  • *ece β€” ECE struct to be filled. you hand it over empty, it comes back with tea β˜•

πŸ’€ RETURN VALUE πŸ’€

rdma_get_remote_ece() returns 0 on success, or -1 on error. and if an error happens, errno will be set to indicate the failure reason. so like, check it, bestie, please 😭


🌈 SEE ALSO 🌈

rdma_cm(7), rdma_set_local_ece(3)


πŸ‘‘ AUTHOR πŸ‘‘

Leon Romanovsky <leonro@mellanox.com> β€” king behavior, honestly 🫢


and that's a wrap, sending you off with so much love from librdmacm, version dated 2020-02-02 β€” go forth and get those remote ECE parameters, you absolute icon πŸ§šπŸ’œ

πŸ“¦ where this page comes from