]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ofed/librdmacm/man/rdma_create_qp.3
MFV r368607:
[FreeBSD/FreeBSD.git] / contrib / ofed / librdmacm / man / rdma_create_qp.3
1 .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md
2 .TH "RDMA_CREATE_QP" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm
3 .SH NAME
4 rdma_create_qp \- Allocate a QP.
5 .SH SYNOPSIS
6 .B "#include <rdma/rdma_cma.h>"
7 .P
8 .B "int" rdma_create_qp
9 .BI "(struct rdma_cm_id *" id ","
10 .BI "struct ibv_pd *" pd ","
11 .BI "struct ibv_qp_init_attr *" qp_init_attr ");"
12 .SH ARGUMENTS
13 .IP "id" 12
14 RDMA identifier.
15 .IP "pd" 12
16 Optional protection domain for the QP.
17 .IP "qp_init_attr" 12
18 Initial QP attributes.
19 .SH "DESCRIPTION"
20 Allocate a QP associated with the specified rdma_cm_id and transition it
21 for sending and receiving.
22 .SH "RETURN VALUE"
23 Returns 0 on success, or -1 on error.  If an error occurs, errno will be
24 set to indicate the failure reason.
25 .SH "NOTES"
26 The rdma_cm_id must be bound to a local RDMA device before calling this
27 function, and the protection domain must be for that same device.
28 QPs allocated to an rdma_cm_id are automatically transitioned by the
29 librdmacm through their states.  After being allocated, the QP will be
30 ready to handle posting of receives.  If the QP is unconnected, it will
31 be ready to post sends.
32 .P
33 If a protection domain is not given - pd parameter is NULL - then
34 the rdma_cm_id will be created using a default protection domain.  One
35 default protection domain is allocated per RDMA device.
36 .P
37 The initial QP attributes are specified by the qp_init_attr parameter.  The
38 send_cq and recv_cq fields in the ibv_qp_init_attr are optional.  If
39 a send or receive completion queue is not specified, then a CQ will be
40 allocated by the rdma_cm for the QP, along with corresponding completion
41 channels.  Completion channels and CQ data created by the rdma_cm are
42 exposed to the user through the rdma_cm_id structure.
43 .P
44 The actual capabilities and properties of the created QP will be
45 returned to the user through the qp_init_attr parameter.  An rdma_cm_id
46 may only be associated with a single QP.
47 .SH "SEE ALSO"
48 rdma_bind_addr(3), rdma_resolve_addr(3), rdma_destroy_qp(3), ibv_create_qp(3),
49 ibv_modify_qp(3)