| 1 |
.\" -*- nroff -*- |
| 2 |
.\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md |
| 3 |
.\" |
| 4 |
.TH IBV_OPEN_QP 3 2011-08-12 libibverbs "Libibverbs Programmer's Manual" |
| 5 |
.SH "NAME" |
| 6 |
ibv_open_qp \- open a shareable queue pair (QP) |
| 7 |
.SH "SYNOPSIS" |
| 8 |
.nf |
| 9 |
.B #include <infiniband/verbs.h> |
| 10 |
.sp |
| 11 |
.BI "struct ibv_qp *ibv_open_qp(struct ibv_context " "*context" , |
| 12 |
.BI " struct ibv_qp_open_attr " "*qp_open_attr" ); |
| 13 |
.fi |
| 14 |
.SH "DESCRIPTION" |
| 15 |
.B ibv_open_qp() |
| 16 |
opens an existing queue pair (QP) associated with the extended protection domain |
| 17 |
.I xrcd\fR. |
| 18 |
The argument |
| 19 |
.I qp_open_attr |
| 20 |
is an ibv_qp_open_attr struct, as defined in <infiniband/verbs.h>. |
| 21 |
.PP |
| 22 |
.nf |
| 23 |
struct ibv_qp_open_attr { |
| 24 |
.in +8 |
| 25 |
uint32_t comp_mask; /* Identifies valid fields */ |
| 26 |
uint32_t qp_num; /* QP number */ |
| 27 |
struct *ibv_xrcd; /* XRC domain */ |
| 28 |
void *qp_context; /* User defined opaque value */ |
| 29 |
enum ibv_qp_type qp_type; /* QP transport service type */ |
| 30 |
.fi |
| 31 |
.PP |
| 32 |
.B ibv_destroy_qp() |
| 33 |
closes the opened QP and destroys the underlying QP if it has no |
| 34 |
other references. |
| 35 |
.I qp\fR. |
| 36 |
.SH "RETURN VALUE" |
| 37 |
.B ibv_open_qp() |
| 38 |
returns a pointer to the opened QP, or NULL if the request fails. |
| 39 |
Check the QP number (\fBqp_num\fR) in the returned QP. |
| 40 |
.SH "NOTES" |
| 41 |
.B ibv_open_qp() |
| 42 |
will fail if a it is asked to open a QP that does not exist within |
| 43 |
the xrcd with the specified qp_num and qp_type. |
| 44 |
.SH "SEE ALSO" |
| 45 |
.BR ibv_alloc_pd (3), |
| 46 |
.BR ibv_create_qp (3), |
| 47 |
.BR ibv_create_qp_ex (3), |
| 48 |
.BR ibv_modify_qp (3), |
| 49 |
.BR ibv_query_qp (3) |
| 50 |
.SH "AUTHORS" |
| 51 |
.TP |
| 52 |
Sean Hefty <[email protected]> |