3 .TH IBV_CREATE_CQ 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual"
5 ibv_create_cq, ibv_destroy_cq \- create or destroy a completion queue (CQ)
8 .B #include <infiniband/verbs.h>
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" );
15 .BI "int ibv_destroy_cq(struct ibv_cq " "*cq" );
19 creates a completion queue (CQ) with at least
21 entries for the RDMA device context
25 will be used to set user context pointer of the CQ structure. The argument
27 is optional; if not NULL, the completion channel
29 will be used to return completion events. The CQ will use the
32 for signaling completion events; it must be at least zero and less than
33 .I context\fR->num_comp_vectors.
40 returns a pointer to the CQ, or NULL if the request fails.
43 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
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.
50 fails if any queue pair is still associated with this CQ.
52 .BR ibv_resize_cq (3),
53 .BR ibv_req_notify_cq (3),
54 .BR ibv_ack_cq_events (3),
58 Dotan Barak <dotanb@mellanox.co.il>