ibv_reg_mr_relaxed - ter or deregister a memory region (MR) in relaxed mode, flush relaxed MRs
#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);
Libibverbs Programmer's Manual IBV_REG_MR_RELAXED(3) NAME ibv_reg_mr_relaxed, ibv_dereg_mr_relaxed, ibv_flush_relaxed_mr - regis- ter 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 pro- cesses 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. ATTRIBUTES See attributes(7) for descriptions of the following attributes: +---------------+-----------------------+ |ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------+-----------------------+ |Availability | network/open-fabrics | +---------------+-----------------------+ |Stability | Pass-through volatile | +---------------+-----------------------+ 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 granu- larity of relaxed memory regions, it is often advisable to use page sized registrations or to align registered regions to a page boundary. Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source- code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from ['https://www.openfabrics.org/down- loads/ibutils/ibutils-1.5.7-0.2.gbd7e502.tar.gz', 'https://www.openfab- rics.org/downloads/libibverbs/libibverbs-1.1.8.tar.gz', 'https://www.openfabrics.org/downloads/libmlx4/libmlx4-1.0.6.tar.gz', 'https://www.openfabrics.org/downloads/libsdp/lib- sdp-1.1.108-0.15.gd7fdb72.tar.gz', 'https://www.openfabrics.org/down- loads/management/infiniband-diags-1.6.5.tar.gz', 'https://www.openfab- rics.org/downloads/management/libibmad-1.3.12.tar.gz', 'https://www.openfabrics.org/downloads/management/libibu- mad-1.3.10.2.tar.gz', 'https://www.openfabrics.org/downloads/manage- ment/opensm-3.3.19.tar.gz', 'https://www.openfabrics.org/down- loads/perftest/perftest-1.3.0-0.42.gf350d3d.tar.gz', 'https://www.open- fabrics.org/downloads/qperf/qperf-0.4.9.tar.gz', 'https://www.openfab- rics.org/downloads/rdmacm/librdmacm-1.0.21.tar.gz', 'https://www.open- fabrics.org/downloads/rds-tools/rds-tools-2.0.4.tar.gz']. Further information about this software can be found on the open source community website at http://www.openfabrics.org/. 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> libibverbs 2012-02-29 IBV_REG_MR_RELAXED(3)