.\" Extracted by src2man from /build/rpma-11eW7Q/rpma-1.3.0/src/include/librpma.h .\" Text automatically generated by txt2man .TH rpma_srq_recv 3 "29 May 2023" "RPMA" "RPMA Programmer's Manual" .SH NAME \fBrpma_srq_recv \fP- initiate the receive operation in shared RQ .SH SYNOPSIS .nf .fam C #include struct rpma_srq; struct rpma_mr_local; int \fBrpma_srq_recv\fP(struct rpma_srq *srq, struct rpma_mr_local *dst, size_t offset, size_t len, const void *op_context); .fam T .fi .fam T .fi .SH DESCRIPTION If multiple local connections use a shared RQ, \fBrpma_srq_recv\fP() initiates the receive operation which prepares a buffer for a message sent from other side of these connections. Please see \fBrpma_send\fP(3). .PP All buffers prepared via \fBrpma_srq_recv\fP(3) form an unordered set. When a message arrives it is placed in one of the buffers awaiting and a completion for the receive operation is generated. .PP A buffer for an incoming message has to be prepared beforehand. .PP The order of buffers in the set does not affect the order of completions of the receive operations got via \fBrpma_cq_get_wc\fP(3). .PP op_context is returned in the wr_id field of the completion (struct ibv_wc). .SH NOTE In the RDMA standard, receive requests form an ordered queue. The librpma library does NOT inherit this guarantee. .SH RETURN VALUE The \fBrpma_srq_recv\fP() function returns 0 on success or a negative error code on failure. .SH ERRORS \fBrpma_srq_recv\fP() can fail with the following errors: .IP \(bu 3 RPMA_E_INVAL - srq == NULL .IP \(bu 3 RPMA_E_INVAL - dst == NULL && (offset != 0 || len != 0) .IP \(bu 3 RPMA_E_PROVIDER - \fBibv_post_srq_recv\fP(3) failed .SH SEE ALSO \fBrpma_mr_reg\fP(3), \fBrpma_srq_new\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/