DOKK / manpages / debian 12 / librpma-dev / rpma_send.3.en
rpma_send(3) RPMA Programmer's Manual rpma_send(3)

rpma_send - initiate the send operation


#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);

rpma_send() initiates the send operation which transfers a message from the local memory to other side of the connection. To send a 0 byte message, set src to NULL and both offset and len to 0.

The attribute flags set the completion notification indicator:

  • RPMA_F_COMPLETION_ON_ERROR - generate the completion on error
  • RPMA_F_COMPLETION_ALWAYS - generate the completion regardless of result of the operation.

op_context is returned in the wr_id field of the completion (struct ibv_wc).

The rpma_send() function returns 0 on success or a negative error code on failure.

rpma_send() can fail with the following errors:

  • RPMA_E_INVAL - conn == NULL || flags == 0
  • RPMA_E_INVAL - src == NULL && (offset != 0 || len != 0)
  • RPMA_E_PROVIDER - ibv_post_send(3) failed

rpma_conn_req_connect(3), rpma_mr_reg(3), librpma(7) and https://pmem.io/rpma/

10 January 2023 RPMA