RDMA_SET_LOCAL_ECE(3)

πŸ’… RDMA_SET_LOCAL_ECE πŸ’…

okay so bestie, this is the librdmacm Programmer's Manual page for rdma_set_local_ece, and we're gonna get you so comfy with it. it's giving "niche but important" and honestly? iconic.


✨ NAME ✨

rdma_set_local_ece β€” Set local ECE paraemters to be used for REQ/REP communication.

(and yes, "paraemters" is literally what the page says, we don't fix typos in this house, we respect the artifact πŸ’€)


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rdma/rdma_cma.h>

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

🌸 DESCRIPTION 🌸

so rdma_set_local_ece() sets local ECE parameters. that's the whole vibe. ✨

this function is suppose to be used by the users of external QPs (again, the original says "suppose", we're just the messenger 🫢). the call needs to be performed before replying to the peer, and it's needed to configure RDMA_CM with the desired ECE options.

the thing is β€” being used by external QP and RDMA_CM doesn't manage that QP, so the peer needs to call to libibverbs API by itself. no hand-holding here, you're on your own for that part, iykyk.

⚠️ reminder: call it before you reply to the peer. timing matters, bestie, it's giving "main character energy" but the main character is the ordering of your syscalls.

πŸŽ€ the usual flow for the passive side πŸŽ€

  • ibv_create_qp() <- create data QP.
  • ece = ibv_query_ece() <- get ECE from libibvers provider.
  • rdma_set_local_ece(ece) <- set desired ECE options.
  • rdma_connect() <- send connection request
  • 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_accept()/rdma_establish()/rdma_reject_ece()

like, look at that little pipeline. lowkey beautiful. πŸ”₯


🌈 ARGUMENTS 🌈

  • id β€” RDMA communication identifier.
  • *ece β€” ECE parameters.

⭐ RETURN VALUE ⭐

rdma_set_local_ece() returns 0 on success, or -1 on error. if an error occurs, errno will be set to indicate the failure reason. so like, check your return values, bestie, don't be out here ignoring -1 😭


πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Leon Romanovsky <leonro@mellanox.com>


and that's the page!! πŸŽ€ this whole thing came to you from the librdmacm crew, dated 2020-02-02 β€” yeah it's a little vintage, but it still slays. go forth and set those local ECE parameters, bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from