]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/libibverbs/man/ibv_create_cq.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / libibverbs / man / ibv_create_cq.3
1 .\" -*- nroff -*-
2 .\"
3 .TH IBV_CREATE_CQ 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
4 .SH "NAME"
5 ibv_create_cq, ibv_destroy_cq \- create or destroy a completion queue (CQ)
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/verbs.h>
9 .sp
10 .BI "struct ibv_cq *ibv_create_cq(struct ibv_context " "*context" ", int " "cqe" ,
11 .BI "                             void " "*cq_context" ,
12 .BI "                             struct ibv_comp_channel " "*channel" ,
13 .BI "                             int " "comp_vector" );
14 .sp
15 .BI "int ibv_destroy_cq(struct ibv_cq " "*cq" );
16 .fi
17 .SH "DESCRIPTION"
18 .B ibv_create_cq()
19 creates a completion queue (CQ) with at least
20 .I cqe
21 entries for the RDMA device context
22 .I context\fR.
23 The pointer
24 .I cq_context
25 will be used to set user context pointer of the CQ structure. The argument
26 .I channel
27 is optional; if not NULL, the completion channel
28 .I channel
29 will be used to return completion events.  The CQ will use the
30 completion vector
31 .I comp_vector
32 for signaling completion events; it must be at least zero and less than
33 .I context\fR->num_comp_vectors.
34 .PP
35 .B ibv_destroy_cq()
36 destroys the CQ
37 .I cq\fR.
38 .SH "RETURN VALUE"
39 .B ibv_create_cq()
40 returns a pointer to the CQ, or NULL if the request fails.
41 .PP
42 .B ibv_destroy_cq()
43 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
44 .SH "NOTES"
45 .B ibv_create_cq()
46 may create a CQ with size greater than or equal to the requested
47 size. Check the cqe attribute in the returned CQ for the actual size.
48 .PP
49 .B ibv_destroy_cq()
50 fails if any queue pair is still associated with this CQ.
51 .SH "SEE ALSO"
52 .BR ibv_resize_cq (3),
53 .BR ibv_req_notify_cq (3),
54 .BR ibv_ack_cq_events (3),
55 .BR ibv_create_qp (3)
56 .SH "AUTHORS"
57 .TP
58 Dotan Barak <dotanb@mellanox.co.il>