RDMA_GET_SEND_COMP(3)

πŸ’– RDMA_GET_SEND_COMP(3) πŸ’–

okay bestie, so this is a page from the Librdmacm Programmer's Manual β€” yes, the rdma one, the one that makes your network go brrr πŸ¦‹ β€” and it's literally all about rdma_get_send_comp. Sit down, hydrate, let's get into it πŸ’…


✨ NAME ✨

rdma_get_send_comp β€” retrieves a completed send, read, or write request.

like. it goes and gets your finished work request. that's the whole job. no cap πŸŽ€


🌸 SYNOPSIS 🌸

#include <rdma/rdma_verbs.h>

int rdma_get_send_comp (struct rdma_cm_id *id, struct ibv_wc *wc);

two args, one int back. iconic behavior honestly πŸ‘‘


🫢 ARGUMENTS 🫢

  • id β€” a reference to a communication identifier to check for completions. this is the thing you're like "hey bestie, anything done in there?" about πŸ’œ
  • wc β€” a reference to a work completion structure to fill in. it's an out-param, so it comes back stuffed with the tea β˜•βœ¨

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it actually does: it retrieves a completed work request for a send, an RDMA read, or an RDMA write operation. all three, same lil function, no favorites πŸ₯°

The info about that completed request comes back to you through the wc parameter, and the wr_id in there is set to the context of the request β€” so you can clock which of your requests just finished, iykyk πŸ”₯

Want the full deets on the work completion structure itself? that's not here, bestie, go see ibv_poll_cq. it's giving "read the other manpage" and honestly fair πŸ™ˆ


πŸ’€ RETURN VALUE πŸ’€

  • Returns the number of returned completions (0 or 1) on success πŸ’– β€” yes, that's it, it's a very "one or nothing" kind of function, lowkey minimal, highkey fine ✨
  • Returns -1 on error 😭
If an error happens, errno gets set to indicate the failure reason. always check it, bestie, don't just stare at the -1 like it owes you an explanation πŸ’…

🌈 NOTES 🌈

okay this part is the important part, pay attention πŸ“’

  • This call polls the send completion queue associated with an rdma_cm_id.
  • If a completion is not found, the call blocks until a request completes. so yeah, it'll just sit there, patiently, waiting. main character patience fr fr 🧚
  • This call should only be used on rdma_cm_id's that do not share CQs with other rdma_cm_id's, and that maintain separate CQs for sends and receive completions.
Like, for real. Sharing CQs while using this? do not. that's the vibe check and you would fail it 🚫 don't do it.

πŸ‘‘ SEE ALSO πŸ‘‘

all your little friends, go read them too, they're a set πŸŽ€


and that's the page!! mwah πŸ’‹ this one's from librdmacm, dated 2010-07-19, filed under RDMA_GET_SEND_COMP(3) β€” go poll something and slay, bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from