| 1 | --- |
| 2 | date: 2006-10-31 |
| 3 | footer: libibverbs |
| 4 | header: "Libibverbs Programmer's Manual" |
| 5 | layout: page |
| 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' |
| 7 | section: 3 |
| 8 | title: IBV_RESIZE_CQ |
| 9 | --- |
| 10 | |
| 11 | # NAME |
| 12 | |
| 13 | ibv_resize_cq - resize a completion queue (CQ) |
| 14 | |
| 15 | # SYNOPSIS |
| 16 | |
| 17 | ```c |
| 18 | #include <infiniband/verbs.h> |
| 19 | |
| 20 | int ibv_resize_cq(struct ibv_cq *cq, int cqe); |
| 21 | ``` |
| 22 | |
| 23 | # DESCRIPTION |
| 24 | |
| 25 | **ibv_resize_cq()** resizes the completion queue (CQ) *cq* to have at least |
| 26 | *cqe* entries. *cqe* must be at least the number of unpolled entries in the CQ |
| 27 | *cq*. If *cqe* is a valid value less than the current CQ size, |
| 28 | **ibv_resize_cq()** may not do anything, since this function is only |
| 29 | guaranteed to resize the CQ to a size at least as big as the requested size. |
| 30 | |
| 31 | # RETURN VALUE |
| 32 | |
| 33 | **ibv_resize_cq()** returns 0 on success, or the value of errno on failure |
| 34 | (which indicates the failure reason). |
| 35 | |
| 36 | # NOTES |
| 37 | |
| 38 | **ibv_resize_cq()** may assign a CQ size greater than or equal to the |
| 39 | requested size. The cqe member of *cq* will be updated to the actual size. |
| 40 | |
| 41 | # SEE ALSO |
| 42 | |
| 43 | **ibv_create_cq**(3), |
| 44 | **ibv_destroy_cq**(3) |
| 45 | |
| 46 | # AUTHOR |
| 47 | |
| 48 | Dotan Barak <[email protected]> |