rpma_conn_wait(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

πŸ’– rpma_conn_wait β€” RPMA Programmer's Manual πŸ’–

okay bestie, gather round, because this is a function from the librpma page of the RPMA Programmer's Manual and she is lowkey the whole vibe of your completion handling. no cap. πŸ¦‹


✨ NAME ✨

rpma_conn_wait β€” wait for a completion event on the shared completion channel from CQ or RCQ 🫢


🌸 SYNOPSIS 🌸

#include <librpma.h>

struct rpma_conn;
struct rpma_cq
int rpma_conn_wait(struct rpma_conn *conn, int flags, struct rpma_cq **cq, bool *is_rcq)

πŸŽ€ DESCRIPTION πŸŽ€

so what does rpma_conn_wait() actually do? bestie, she waits. πŸ’…

She waits for a completion event on the shared completion channel from CQ or RCQ, acks it, and then hands you back the CQ that caused the event β€” that lands in the cq argument β€” plus a boolean telling you whether it's RCQ or not, which lands in the is_rcq argument (and that only happens if is_rcq is not NULL, iykyk).

and here's the part you cannot skip, bestie: if rpma_conn_wait() succeeds, then all available completions should be collected from the returned cq using rpma_cq_get_wc(3). all of them. not some. all. the way that she sets you up and expects you to finish the job is honestly main character energy. πŸ‘‘


⭐ RETURN VALUE ⭐

rpma_conn_wait() returns 0 on success, or a negative error code on failure. simple as that. πŸ“


πŸ’€ ERRORS πŸ’€

rpma_conn_wait() can fail with the following errors, and no we are not sugarcoating any of them:

  • RPMA_E_INVAL β€” conn or cq are NULL πŸ™ˆ
  • RPMA_E_NOT_SHARED_CHNL β€” the completion event channel is not shared 😭
  • RPMA_E_NO_COMPLETION β€” ibv_get_cq_event(3) failed πŸ’€
  • RPMA_E_UNKNOWN β€” ibv_get_cq_event(3) returned unknown CQ 🀨
  • RPMA_E_PROVIDER β€” ibv_req_notify_cq(3) failed πŸ”₯
fr fr, if you see RPMA_E_NOT_SHARED_CHNL it's giving "you called this on a channel that isn't shared" and there is no workaround in this page, so go check your setup bestie.

🌈 SEE ALSO 🌈


that's the whole page, bestie, go collect those completions πŸ’…βœ¨

with love from the RPMA crew, 01 April 2024 β€” mwah, slay, periodt πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from