'\" te .\" -*- nroff -*- .\" .TH IBV_REG_MR 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual" .SH "NAME" ibv_reg_mr, ibv_dereg_mr \- register or deregister a memory region (MR) .SH "SYNOPSIS" .nf .B #include .sp .BI "struct ibv_mr *ibv_reg_mr(struct ibv_pd " "*pd" ", void " "*addr" , .BI " size_t " "length" ", int " "access" ); .sp .BI "int ibv_dereg_mr(struct ibv_mr " "*mr" ); .fi .SH "DESCRIPTION" .B ibv_reg_mr() registers a memory region (MR) associated with the protection domain .I pd\fR. The MR's starting address is .I addr and its size is .I length\fR. The argument .I access describes the desired memory protection attributes; it is either 0 or the bitwise OR of one or more of the following flags: .PP .TP .B IBV_ACCESS_LOCAL_WRITE \fR Enable Local Write Access .TP .B IBV_ACCESS_REMOTE_WRITE \fR Enable Remote Write Access .TP .B IBV_ACCESS_REMOTE_READ\fR Enable Remote Read Access .TP .B IBV_ACCESS_REMOTE_ATOMIC\fR Enable Remote Atomic Operation Access (if supported) .TP .B IBV_ACCESS_MW_BIND\fR Enable Memory Window Binding .PP If .B IBV_ACCESS_REMOTE_WRITE or .B IBV_ACCESS_REMOTE_ATOMIC is set, then .B IBV_ACCESS_LOCAL_WRITE must be set too. .PP Local read access is always enabled for the MR. .PP .B ibv_dereg_mr() deregisters the MR .I mr\fR. .SH "RETURN VALUE" .B ibv_reg_mr() returns a pointer to the registered MR, or NULL if the request fails. The local key (\fBL_Key\fR) field .B lkey is used as the lkey field of struct ibv_sge when posting buffers with ibv_post_* verbs, and the the remote key (\fBR_Key\fR) field .B rkey is used by remote processes to perform Atomic and RDMA operations. The remote process places this .B rkey as the rkey field of struct ibv_send_wr passed to the ibv_post_send function. .PP .B ibv_dereg_mr() returns 0 on success, or the value of errno on failure (which indicates the failure reason). .\" Oracle has added the ARC stability level to this manual page .SH ATTRIBUTES See .BR attributes (5) for descriptions of the following attributes: .sp .TS box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Availability network/open-fabrics = Stability Volatile .TE .PP .SH "NOTES" .B ibv_dereg_mr() fails if any memory window is still bound to this MR. .SH "SEE ALSO" .BR ibv_alloc_pd (3), .BR ibv_post_send (3), .BR ibv_post_recv (3), .BR ibv_post_srq_recv (3) .SH "AUTHORS" .TP Dotan Barak .\" Oracle has added source availability information to this manual page This software was built from source available at https://java.net/projects/solaris-userland. The original community source was downloaded from ['http://download.oracle.com/otn-pub/oss/networking/libsif-1.0.tar.gz', 'http://www.openfabrics.org/downloads/ibutils/ibutils-1.5.7.tar.gz', 'http://www.openfabrics.org/downloads/libibverbs/libibverbs-1.1.4-1.22.g7257cd3.tar.gz', 'http://www.openfabrics.org/downloads/libmlx4/libmlx4-1.0.1-1.18.gb810a27.tar.gz', 'http://www.openfabrics.org/downloads/libsdp/libsdp-1.1.108-0.15.gd7fdb72.tar.gz', 'http://www.openfabrics.org/downloads/management/infiniband-diags-1.5.8.tar.gz', 'http://www.openfabrics.org/downloads/management/libibmad-1.3.7.tar.gz', 'http://www.openfabrics.org/downloads/management/libibumad-1.3.7.tar.gz', 'http://www.openfabrics.org/downloads/management/opensm-3.3.9.tar.gz', 'http://www.openfabrics.org/downloads/perftest/perftest-1.3.0-0.42.gf350d3d.tar.gz', 'http://www.openfabrics.org/downloads/qperf/qperf-0.4.6-0.1.gb81434e.tar.gz', 'http://www.openfabrics.org/downloads/rdmacm/librdmacm-1.0.14.1.tar.gz', 'http://www.openfabrics.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/.