.\" Extracted by src2man from /build/rpma-11eW7Q/rpma-1.3.0/src/include/librpma.h .\" Text automatically generated by txt2man .TH rpma_read 3 "29 May 2023" "RPMA" "RPMA Programmer's Manual" .SH NAME \fBrpma_read \fP- initiate the read operation .SH SYNOPSIS .nf .fam C #include struct rpma_conn; struct rpma_mr_local; struct rpma_mr_remote; int \fBrpma_read\fP(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); .fam T .fi .fam T .fi .SH DESCRIPTION \fBrpma_read\fP() initiates transferring data from the remote memory to the local memory. To read a 0 bytes message, set src and dst to NULL and src_offset, dst_offset and len to 0. .PP The attribute flags set the completion notification indicator: .IP \(bu 3 RPMA_F_COMPLETION_ON_ERROR - generate the completion on error .IP \(bu 3 RPMA_F_COMPLETION_ALWAYS - generate the completion regardless of result of the operation. .PP op_context is returned in the wr_id field of the completion (struct ibv_wc). .SH RETURN VALUE The \fBrpma_read\fP() function returns 0 on success or a negative error code on failure. .SH ERRORS \fBrpma_read\fP() can fail with the following errors: .IP \(bu 3 RPMA_E_INVAL - conn == NULL || flags == 0 .IP \(bu 3 RPMA_E_INVAL - dst == NULL && (src != NULL || src_offset != 0 || dst_offset != 0 || len != 0) .IP \(bu 3 RPMA_E_INVAL - src == NULL && (dst != NULL || src_offset != 0 || dst_offset != 0 || len != 0) .IP \(bu 3 RPMA_E_PROVIDER - \fBibv_post_send\fP(3) failed .SH SEE ALSO \fBrpma_conn_req_connect\fP(3), \fBrpma_mr_reg\fP(3), \fBrpma_mr_remote_from_descriptor\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/