rpma_srq_new(3)
π 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. π
- see
rpma_srq_cfg_new(3)for more details. (iykyk, go read it, it's got the lore.) π
π ERRORS π
rpma_srq_new() can fail with the following errors, and we respect all of them:
RPMA_E_INVALβpeerorsrq_ptrisNULL. yeah, you gotta give it something. not me passingNULL... πRPMA_E_NOMEMβ out of memory. the tragedy. the absolute heartbreak. πRPMA_E_PROVIDERβibv_create_srq(3),ibv_create_comp_channel(3),ibv_create_cq(3)oribv_req_notify_cq(3)failed. one of the provider besties said no. π₯
π§ SEE ALSO π§
rpma_srq_delete(3)rpma_srq_get_rcq(3)librpma(7)- https://pmem.io/rpma/ β go, click, absorb, thrive β¨
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
- ubuntu noble: librpma-dev 1.3.0-2build2 Β· BSD-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms