Message ID | 1370371791-15018-7-git-send-email-sean.hefty@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On 6/4/2013 1:49 PM, sean.hefty@intel.com wrote: > From: Sean Hefty <sean.hefty@intel.com> > > Signed-off-by: Sean Hefty <sean.hefty@intel.com> > --- > man/ibv_open_qp.3 | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 50 insertions(+), 0 deletions(-) > create mode 100644 man/ibv_open_qp.3 Udate Makefile.am so this gets installed. There should also be man pages for the other new verbs. Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Jun 04, 2013 at 11:49:50AM -0700, sean.hefty@intel.com wrote: > +struct ibv_qp_open_attr { > +.in +8 > +uint32_t comp_mask; /* Identifies valid fields */ Since the user is expected to set comp_mask we should clearly document what it should be set to. > +uint32_t qp_num; /* QP number */ > +void *qp_context; /* Associated context of the QP */ Would be nice to clarify what this value is too. I took a quick peak and it wasn't clear to me. The XRC example does not use it. Is it a user defined cookie? If so can we call it a cookie instead? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> > +uint32_t qp_num; /* QP number */ > > +void *qp_context; /* Associated context of the QP */ > > Would be nice to clarify what this value is too. I took a quick peak > and it wasn't clear to me. The XRC example does not use it. > > Is it a user defined cookie? If so can we call it a cookie instead? This is similar to qp_context in ibv_qp_init_attr and ibv_qp, which is also consistent with cq_context and srq_context. It is a user defined context. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Jun 04, 2013 at 09:49:00PM +0000, Hefty, Sean wrote: > > > +uint32_t qp_num; /* QP number */ > > > +void *qp_context; /* Associated context of the QP */ > > > > Would be nice to clarify what this value is too. I took a quick peak > > and it wasn't clear to me. The XRC example does not use it. > > > > Is it a user defined cookie? If so can we call it a cookie instead? > > This is similar to qp_context in ibv_qp_init_attr and ibv_qp, which > is also consistent with cq_context and srq_context. It is a user > defined context. Hum, I honestly had no idea about qp_context in struct ibv_qp, it really is not documented well.. Keep the name, but please clarify what it is: 'User defined opaque value' Ideally in the other places too.. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/man/ibv_open_qp.3 b/man/ibv_open_qp.3 new file mode 100644 index 0000000..0bc5647 --- /dev/null +++ b/man/ibv_open_qp.3 @@ -0,0 +1,50 @@ +.\" -*- nroff -*- +.\" +.TH IBV_OPEN_QP 3 2011-08-12 libibverbs "Libibverbs Programmer's Manual" +.SH "NAME" +ibv_open_qp \- open a shareable queue pair (QP) +.SH "SYNOPSIS" +.nf +.B #include <infiniband/verbs.h> +.sp +.BI "struct ibv_qp *ibv_open_qp(struct ibv_xrcd " "*xrcd" , +.BI " struct ibv_qp_open_attr " "*qp_open_attr" ); +.fi +.SH "DESCRIPTION" +.B ibv_open_qp() +opens an existing queue pair (QP) associated with the extended protection domain +.I xrcd\fR. +The argument +.I qp_open_attr +is an ibv_qp_open_attr struct, as defined in <infiniband/verbs.h>. +.PP +.nf +struct ibv_qp_open_attr { +.in +8 +uint32_t comp_mask; /* Identifies valid fields */ +uint32_t qp_num; /* QP number */ +void *qp_context; /* Associated context of the QP */ +enum ibv_qp_type qp_type; /* QP transport service type */ +.fi +.PP +.B ibv_destroy_qp() +closes the opened QP and destroys the underlying QP if it has no +other references. +.I qp\fR. +.SH "RETURN VALUE" +.B ibv_open_qp() +returns a pointer to the opened QP, or NULL if the request fails. +Check the QP number (\fBqp_num\fR) in the returned QP. +.SH "NOTES" +.B ibv_open_qp() +will fail if a it is asked to open a QP that does not exist within +the xrcd with the specified qp_num and qp_type. +.SH "SEE ALSO" +.BR ibv_alloc_pd (3), +.BR ibv_create_qp (3), +.BR ibv_create_qp_ex (3), +.BR ibv_modify_qp (3), +.BR ibv_query_qp (3) +.SH "AUTHORS" +.TP +Sean Hefty <sean.hefty@intel.com>