-*- nroff -*-

IBV_REG_MR_RELAXED 3 2012-02-29 libibverbs "Libibverbs Programmer's Manual"
"NAME"
ibv_reg_mr_relaxed, ibv_dereg_mr_relaxed, ibv_flush_relaxed_mr - register or deregister a memory region (MR) in relaxed mode, flush relaxed MRs
"SYNOPSIS"
 #include <infiniband/verbs.h>  "struct ibv_mr *ibv_reg_mr_relaxed(struct ibv_pd " "*pd" ", void " "*addr" ,  " size_t " "length" ", int " "access" );  "int ibv_dereg_mr_relaxed(struct ibv_mr " "*mr" );  "int ibv_flush_relaxed_mr(struct ibv_pd " "*pd" ); 
"DESCRIPTION"
Relaxed MRs are different from normal MRs in following ways :

* Registration is done using Fast Memory Registration(FMR) interface provided by the RDMA device.

* Access permissions are extended to specified memory area's last page boundary.

* There could be a finite time gap between the deregistration call and actual invalidation in the RDMA device for an MR.

ibv_reg_mr_relaxed() registers a memory region (MR) associated with the protection domain pd. The MR's starting address is addr and its size is length. The argument access describes the desired memory protection attributes; for details on access options see description of ibv_reg_mr().

ibv_dereg_mr_relaxed() deregisters the MR mr. This call marks mr as ready to be invalidated; however actual invalidation happens later.

ibv_flush_relaxed_mr() forces all deregistered relaxed MRs under PD pd to be invalidated by the RDMA device.

"RETURN VALUE"
ibv_reg_mr_relaxed() returns a pointer to the registered MR, or NULL if the request fails. The local key (L_Key) field lkey is used as the lkey field of struct ibv_sge when posting buffers with ibv_post_* verbs, and the remote key (R_Key) field rkey is used by remote processes to perform Atomic and RDMA operations. The remote process places this rkey as the rkey field of struct ibv_send_wr passed to the ibv_post_send function.

ibv_dereg_mr_relaxed() returns 0 on success, or the value of errno on failure (which indicates the failure reason).

ibv_flush_relaxed_mr() returns 0 on success, or the value of errno on failure.

"NOTES"
ibv_reg_mr_relaxed() can return transient error EAGAIN. User may retry the operation after sometime.

The user of relaxed memory regions should take care to avoid reliance on immediate deregistration behavior. Also, because of the page granularity of relaxed memory regions, it is often advisable to use page sized registrations or to align registered regions to a page boundary.

"SEE ALSO"
ibv_alloc_pd (3), ibv_post_send (3), ibv_post_recv (3), ibv_post_srq_recv (3)
"AUTHORS"

Arun Kaimalettu <gotoarunk at gmail dot com>