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

rpma_peer_new - create a peer object


#include <librpma.h>
struct ibv_context;
struct rpma_peer;
int rpma_peer_new(struct ibv_context *ibv_ctx, struct rpma_peer **peer_ptr);

rpma_peer_new() creates a new peer object.

The rpma_peer_new() function returns 0 on success or a negative error code on failure. rpma_peer_new() does not set *peer_ptr value on failure.

rpma_peer_new() can fail with the following errors:

  • RPMA_E_INVAL - ibv_ctx or peer_ptr is NULL
  • RPMA_E_NOMEM - creating a verbs protection domain failed with ENOMEM.
  • RPMA_E_PROVIDER - creating a verbs protection domain failed with error other than ENOMEM.
  • RPMA_E_UNKNOWN - creating a verbs protection domain failed without error value.
  • RPMA_E_NOMEM - out of memory

rpma_conn_req_new(3), rpma_ep_listen(3), rpma_mr_reg(3), rpma_peer_delete(3), rpma_utils_get_ibv_context(3), librpma(7) and https://pmem.io/rpma/

10 January 2023 RPMA