rpma_srq_new(3)

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

πŸ’– rpma_srq_new β€” bestie's guide to the RPMA Programmer's Manual ✨

okay so. sit down, hydrate, and let's talk about rpma_srq_new(3) from the RPMA Programmer's Manual, because this one is actually so good. it's giving "make me a shared RQ" and honestly? iconic behavior. πŸ¦‹


🌸 NAME 🌸

rpma_srq_new β€” create a new shared RQ object πŸ’…


✨ SYNOPSIS ✨

no cap, this is the whole vibe:

#include <librpma.h>

struct rpma_peer;
struct rpma_srq_cfg;
struct rpma_srq;
int rpma_srq_new(struct rpma_peer *peer, const struct rpma_srq_cfg *cfg,
                struct rpma_srq **srq_ptr);

like. look at it. peer, cfg, srq_ptr. three little besties. 🫢


πŸŽ€ DESCRIPTION πŸŽ€

okay so rpma_srq_new() creates a new shared RQ object, and bestie, that object is not coming alone β€” it comes with a brand new shared RQ AND a brand new shared receive CQ. package deal. main character energy, fr fr. πŸ‘‘

but here's the tea: it does NOT create the shared receive CQ if the size of the receive CQ in cfg equals 0. so if you pass a zero size, no CQ for you, that's just the rules. πŸ’€


🌈 RETURN VALUE 🌈

rpma_srq_new() returns 0 on success, or a negative error code on failure. slay when it's 0, sad when it's negative. 😭

also important: on failure, rpma_srq_new() does not set the *srq_ptr value. so don't go reading it, bestie, it's not gonna have anything for you. πŸ™ˆ

and if cfg is NULL? then the default values are used. easy peasy. πŸ“


πŸ’œ ERRORS πŸ’œ

rpma_srq_new() can fail with the following errors, and we respect all of them:


🧚 SEE ALSO 🧚


lowkey reminder: this whole page is from the RPMA manual, dated 01 April 2024. that's the version, that's the date, and that's the whole entire thing. periodt. πŸ’…πŸ‘‘

bye bestie, go make some shared RQs πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from