rpma_send(3)
π NAME π
rpma_send β initiate the send operation
Ok so bestie, this one lives in the RPMA Programmer's Manual and it's literally the β¨sendβ¨ of the whole show. Let's get into it π«Ά
β¨ SYNOPSIS β¨
#include <librpma.h>
struct rpma_conn;
struct rpma_mr_local;
int rpma_send(struct rpma_conn *conn, const struct rpma_mr_local *src, size_t offset,
size_t len, int flags, const void *op_context);
π¦ DESCRIPTION π¦
So rpma_send() initiates the send operation, which transfers a message from the local memory over to the other side of the connection. That's the whole vibe. π
Wanna send a 0 byte message? Totally valid, iconic even. Just set src to NULL and set both offset and len to 0. That's the move. π
The attribute flags set the completion notification indicator, and you've got two options here:
RPMA_F_COMPLETION_ON_ERRORβ generate the completion on error πRPMA_F_COMPLETION_ALWAYSβ generate the completion regardless of result of the operation. no cap, always means always π₯
And op_context? That comes back to you in the wr_id field of the completion (that's the struct ibv_wc bestie, you'll see it again i promise). πΈ
π«Ά RETURN VALUE π«Ά
rpma_send() returns 0 on success, or a negative error code on failure. slay if it's the first one, π if it's the second.
π ERRORS π
rpma_send() can fail with the following errors, and no we're not being dramatic, these are real:
RPMA_E_INVALβconn == NULL || flags == 0RPMA_E_INVALβsrc == NULL && (offset != 0 || len != 0)RPMA_E_PROVIDERβibv_post_send(3)failed
Not me checking the||vs&&in those conditions like three times. Read them carefully bestie, the second one is giving "if you're sending nothing, then offset AND len have to actually be nothing too". π
π SEE ALSO π
fr fr that's the whole page, you ate it, go forth and send messages responsibly π§
This one's from the RPMA manual set, dated 01 April 2024. bye bestie π
π¦ 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