1IBV_CREATE_CQ(3)        Libibverbs Programmer's Manual        IBV_CREATE_CQ(3)
2
3
4

NAME

6       ibv_create_cq,  ibv_destroy_cq  -  create or destroy a completion queue
7       (CQ)
8

SYNOPSIS

10       #include <infiniband/verbs.h>
11
12       struct ibv_cq *ibv_create_cq(struct ibv_context *context, int cqe,
13                                    void *cq_context,
14                                    struct ibv_comp_channel *channel,
15                                    int comp_vector);
16       int ibv_destroy_cq(struct ibv_cq *cq);
17

DESCRIPTION

19       ibv_create_cq() creates a completion  queue  (CQ)  with  at  least  cqe
20       entries for the InfiniBand device context context.  The pointer cq_con‐
21       text will be used to set user context pointer of the CQ structure.  The
22       argument channel is optional; if not NULL, the completion channel chan‐
23       nel will be used to return completion events.  The CQ will use the com‐
24       pletion  vector comp_vector for signaling completion events; it must be
25       at least zero and less than context->num_comp_vectors.
26
27       ibv_destroy_cq() destroys the CQ cq.
28

RETURN VALUE

30       ibv_create_cq() returns a pointer to the CQ, or  NULL  if  the  request
31       fails.
32
33       ibv_destroy_cq() returns 0 on success, or the value of errno on failure
34       (which indicates the failure reason).
35

NOTES

37       ibv_create_cq() may create a CQ with size greater than or equal to  the
38       requested  size.  Check  the  cqe  attribute in the returned CQ for the
39       actual size.
40
41       ibv_destroy_cq() fails if any queue pair is still associated with  this
42       CQ.
43

SEE ALSO

45       ibv_resize_cq(3), ibv_req_notify_cq(3), ibv_create_qp(3)
46

AUTHORS

48       Dotan Barak <dotanb@mellanox.co.il>
49
50
51
52libibverbs                        2006-10-31                  IBV_CREATE_CQ(3)
Impressum