rdma_dereg_mr

Deregisters a memory region that is registered.

Syntax

#include <rdma/rdma_cma.h>
struct ibv_mr * rdma_dereg_mr (struct ibv_mr *mr);

Description

Deregisters a memory buffer that is registered for RDMA or message operations. You must run the rdma_dereg_mr call for all registered memory that is associated with an rdma_cm_id identifier before you destroy the rdma_cm_id identifier.

Note: All memory buffers that is registered with an rdma_cm_id identifier are associated with the protection domain that is associated with the ID. You must deregister all registered memory before the protection domain can be destroyed.

Parameters

Item Description
mr Specifies a reference to a registered memory buffer.

Return Values

Returns 0 on success, or -1 on error. If an error occurs, the errno is set to indicate the reason for failure.