Changeset View
Changeset View
Standalone View
Standalone View
contrib/ofed/libibverbs/man/ibv_exp_bind_mw.3
- This file was added.
.\" -*- nroff -*- | |||||
.\" | |||||
.TH IBV_EXP_BIND_MW 3 2014-04-27 libibverbs "Libibverbs Programmer's Manual" | |||||
.SH "NAME" | |||||
ibv_exp_bind_mw \- post a request to bind a type 1 memory window to a memory region | |||||
.SH "SYNOPSIS" | |||||
.nf | |||||
.B #include <infiniband/verbs_exp.h> | |||||
.sp | |||||
.BI "int ibv_exp_bind_mw(struct ibv_exp_mw_bind " "*mw_bind" ); | |||||
.fi | |||||
.SH "DESCRIPTION" | |||||
.B ibv_exp_bind_mw() | |||||
posts to the queue pair | |||||
.I mw_bind->qp | |||||
a request to bind the memory window | |||||
.I mw_bind->mw | |||||
according to the details in | |||||
.I mw_bind\fR. | |||||
.PP | |||||
The argument | |||||
.I mw_bind | |||||
is an ibv_exp_mw_bind struct, as defined in <infiniband/verbs_exp.h>. | |||||
.PP | |||||
.nf | |||||
struct ibv_exp_mw_bind { | |||||
.in +8 | |||||
struct ibv_qp *qp; | |||||
struct ibv_mw *mw; | |||||
uint64_t wr_id; /* User defined WR ID */ | |||||
uint64_t exp_send_flags; /* Use ibv_exp_send_flags */ | |||||
struct ibv_exp_mw_bind_info bind_info; | |||||
uint32_t comp_mask; /* reserved for future growth (must be 0) */ | |||||
.in -8 | |||||
}; | |||||
.PP | |||||
struct ibv_exp_mw_bind_info { | |||||
.in +8 | |||||
struct ibv_mr *mr; /* The MR to bind the MW to */ | |||||
uint64_t addr; /* The address the MW should start at */ | |||||
uint64_t length; /* The length (in byte) the MW should span */ | |||||
uint64_t exp_mw_access_flags; /* Access flags to the MW. Use ibv_exp_access_flags */ | |||||
.in -8 | |||||
}; | |||||
.fi | |||||
.PP | |||||
The QP Transport Service Type must be either UC or RC for bind operations. | |||||
.PP | |||||
The attribute exp_send_flags describes the properties of the \s-1WR\s0. It is either 0 or the bitwise \s-1OR\s0 of one or more of the following flags: | |||||
.PP | |||||
.TP | |||||
.B IBV_EXP_SEND_FENCE \fR Set the fence indicator. Valid only for QPs with Transport Service Type \fBIBV_QPT_RC | |||||
.TP | |||||
.B IBV_EXP_SEND_SIGNALED \fR Set the completion notification indicator. Relevant only if QP was created with sq_sig_all=0 | |||||
.TP | |||||
.B IBV_EXP_SEND_SOLICITED \fR Set the solicited event indicator. Valid only for Send and RDMA Write with immediate | |||||
.PP | |||||
The exp_mw_access_flags define the allowed access to the MW after the bind | |||||
completes successfully. It is either 0 or the bitwise \s-1OR\s0 of one | |||||
or more of the following flags: | |||||
.TP | |||||
.B IBV_EXP_ACCESS_REMOTE_WRITE \fR Enable Remote Write Access. Requires local write access to the MR. | |||||
.TP | |||||
.B IBV_EXP_ACCESS_REMOTE_READ\fR Enable Remote Read Access | |||||
.TP | |||||
.B IBV_EXP_ACCESS_REMOTE_ATOMIC\fR Enable Remote Atomic Operation Access (if supported). Requires local write access to the MR. | |||||
.TP | |||||
.B IBV_EXP_ACCESS_MW_ZERO_BASED\fR If set, the address given in post send is offset from the MW's start address. | |||||
.SH "RETURN VALUE" | |||||
.B ibv_exp_bind_mw() | |||||
returns 0 on success, or the value of errno on failure (which | |||||
indicates the failure reason). In case of a success, the R_Key of the | |||||
memory window after the bind is returned in the mw_bind->mw->rkey field. | |||||
.SH "NOTES" | |||||
The bind does not complete when the function return - it is merely | |||||
posted to the QP. The user should keep a copy of the old R_Key, and | |||||
fix the mw structure if the subsequent CQE for the bind operation | |||||
indicates a failure. The user may safely send the R_Key using a send | |||||
request on the same QP, but must not transfer it to the remote in any | |||||
other manner before reading a successful CQE. | |||||
.PP | |||||
Note that for type 2 MW, one should directly post bind WQE to the QP, | |||||
using ibv_post_send. | |||||
.SH "SEE ALSO" | |||||
.BR ibv_alloc_mw (3), | |||||
.BR ibv_post_send (3), | |||||
.BR ibv_poll_cq (3) | |||||
.BR ibv_reg_mr (3), | |||||
.SH "AUTHORS" | |||||
.TP | |||||
Haggai Eran <haggaie@mellanox.com> | |||||
.TP | |||||
Shachar Raindel <raindel@mellanox.com> | |||||
.TP | |||||
Yaniv Saar <ysaar@mellanox.com> | |||||
.TP | |||||
Majd Dibbiny <majd@mellanox.com> | |||||
.TP | |||||
Moshe Lazer <moshel@mellanox.com> |