rdma_reg_read

Registers the data buffer for remote direct memory access (RDMA) read access.

Syntax

#include <rdma/rdma_cma.h>
struct ibv_mr * rdma_reg_read (struct rdma_cm_id *id, void *addr, size_t length);      

Description

Registers a memory buffer that is accessed by a remote direct memory access (RDMA) read operation. Memory buffers that are registered by using the rdma_reg_read operation can be targeted in an RDMA read request. The memory buffer is specified on the remote side of an RDMA connection as the remote_addr parameter of rdma_post_read operation, or a similar operation.

Notes: The rdma_reg_read operation registers a data buffer that is the target of an RDMA read operation on a queue pair that is associated with an rdma_cm_id identifier. The memory buffer is registered with the protection domain that is associated with the identifier. The start of the data buffer array is specified by using the addr parameter, and the total size of the array is specified by the length parameter. All data buffers must be registered before being posted as a work request. You must unregister all the registered memory by using the rdma_dereg_mr operation.

Parameters

Item Description
addr Specifies the address of the memory buffer to register.
id Specifies a reference to a communication identifier where the message buffer must be used.
length Specifies the total length of the memory to register.

Return Values

Returns a reference to the registered memory region on success, or NULL on error. If an error occurs, the errno is set to indicate the reason for failure.