rpma_conn_get_rcq(3)

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

πŸ’– rpma_conn_get_rcq(3) β€” the RPMA Programmer's Manual πŸ’–

okay bestie, welcome to the RPMA Programmer's Manual page for rpma_conn_get_rcq, and no cap, this one is short and sweet and lowkey adorable. sit down, grab a strawberry πŸ“, let's go.


✨ NAME ✨

rpma_conn_get_rcq β€” get the connection's receive CQ. that's it, that's the whole job. main character behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

#include <librpma.h>

struct rpma_conn;
struct rpma_cq;
int rpma_conn_get_rcq(const struct rpma_conn *conn, struct rpma_cq **rcq_ptr);

like. look at her. two args, one int back, no drama πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so rpma_conn_get_rcq() gets the receive CQ out of the connection. and why do we care?? because the receive CQ is the whole vibe for handling all rpma_recv(3) completions that belong to that connection. it lets you keep the rpma_recv(3) completions processing path in its own lil lane, fully separated from all the other completions processing going on. iconic, honestly. it's giving organization. it's giving boundaries. we love a dedicated queue πŸ’–

now here's the tea, and it's important so pay attention: the receive CQ only gets created if the receive CQ size in the connection configuration you provided is greater than 0. no size, no CQ. simple as that.

and when the receive CQ does not exist for the given connection? then *rcq_ptr == NULL. so if you get back a NULL pointer, that's not a glitch bestie, that's just the CQ not existing. check your config size, iykyk πŸ”


⭐ RETURN VALUE ⭐

rpma_conn_get_rcq() returns 0 on success, or a negative error code on failure. ngl, negative error codes are the standard RPMA thing, don't panic.

and heads up β€” on failure, rpma_conn_get_rcq() does not set the *rcq_ptr value. so please don't go reading *rcq_ptr after a failure like it's gonna tell you something, because it will not 🫢


πŸ’€ ERRORS πŸ’€

rpma_conn_get_rcq() can fail with exactly this one error:

  • RPMA_E_INVAL β€” conn or rcq_ptr is NULL. yeah. one of your pointers is missing and the function is simply not going to deal with that 🧚

🌈 SEE ALSO 🌈

go read these next, bestie, they're all part of the same friend group:


mwah πŸ’œ that's the whole page! this one came out of the RPMA source, version dated 01 April 2024 β€” and yes the date being april fools is sending me but the manpage is 100% serious. go get that receive CQ, you got this πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from