#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" );
* 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.
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.
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.
Arun Kaimalettu <gotoarunk at gmail dot com>