rpma_read(3)
β¨ rpma_read β bestie, we're pulling data FROM the remote β¨
okay so first things first, this is page rpma_read(3) from the RPMA Programmer's Manual, and it's literally the glow-up you need for moving bytes from their memory into yours. no cap. π«Ά
π NAME
rpma_read β initiate the read operation π
π§ SYNOPSIS
#include <librpma.h>
struct rpma_conn;
struct rpma_mr_local;
struct rpma_mr_remote;
int rpma_read(struct rpma_conn *conn,
struct rpma_mr_local *dst, size_t dst_offset,
const struct rpma_mr_remote *src, size_t src_offset,
size_t len, int flags, const void *op_context);
πΈ DESCRIPTION
rpma_read() kicks off the transfer of data from the remote memory into the local memory. it's giving main character energy for your whole data pipeline, fr fr. β¨
and listen β if you wanna read a 0 bytes message (yes, the vibes-only message, the empty inbox era π), you set src and dst to NULL and src_offset, dst_offset and len to 0. that's the whole move.
now, the flags attribute sets your completion notification indicator, i.e. when do you actually get told what happened:
RPMA_F_COMPLETION_ON_ERRORβ generate the completion on error. so like, only hit me up if something went wrong πRPMA_F_COMPLETION_ALWAYSβ generate the completion regardless of result of the operation. the "text me either way, bestie" option π«Ά
and op_context? that gets returned in the wr_id field of the completion (struct ibv_wc). so you can be like "oh that's my girl" when it comes back. π
π RETURN VALUE
rpma_read() returns 0 on success or a negative error code on failure. slay when it's 0, and when it's negativeβ¦ we regroup. π
π ERRORS
rpma_read() can fail with the following errors, and honestly each one is a little vibe check:
RPMA_E_INVALβconn == NULL || flags == 0. yeah so no connection or no flags at all, that's a no from me.RPMA_E_INVALβdst == NULL && (src != NULL || src_offset != 0 || dst_offset != 0 || len != 0). you leftdstempty but brought all the other luggage? pick a lane. πRPMA_E_INVALβsrc == NULL && (dst != NULL || src_offset != 0 || dst_offset != 0 || len != 0). same energy, mirrored: nosrcbut everything else is packed. iconic, but wrong.RPMA_E_PROVIDERβibv_post_send(3)failed. the provider said no, and we respect it, but also π
π₯ SEE ALSO
rpma_conn_req_connect(3), rpma_mr_reg(3), rpma_mr_remote_from_descriptor(3), librpma(7) and https://pmem.io/rpma/
go read those next, iykyk π¦
okay that's the whole page, bestie!! this was the RPMA manual, dated 01 April 2024, and this specific icon is rpma_read(3) β now go initiate that read operation and be the main character of your own memory transfers πβ¨π
π¦ 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