Debian Codegraph @

libibverbs/man/ibv_create_cq.3

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