---
name: "ibv_resize_cq"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/ibv_resize_cq"
---

# ibv\_resize\_cq(3)

resize a completion queue (CQ)

## NAME

ibv\_resize\_cq - resize a completion queue (CQ)

## SYNOPSIS

```
#include <infiniband/verbs.h>

int ibv_resize_cq(struct ibv_cq *cq, int cqe);
```

## DESCRIPTION

**ibv\_resize\_cq()** resizes the completion queue (CQ) *cq* to have at least *cqe* entries. *cqe* must be at least the number of unpolled entries in the CQ *cq.* If *cqe* is a valid value less than the current CQ size, **ibv\_resize\_cq()** may not do anything, since this function is only guaranteed to resize the CQ to a size at least as big as the requested size.

## RETURN VALUE

**ibv\_resize\_cq()** returns 0 on success, or the value of errno on failure (which indicates the failure reason).

## NOTES

**ibv\_resize\_cq()** may assign a CQ size greater than or equal to the requested size. The cqe member of *cq* will be updated to the actual size.

## SEE ALSO

[**ibv\_create\_cq**(3)](/ibv_create_cq/3.md) [**ibv\_destroy\_cq**(3)](/ibv_destroy_cq/3.md)

## AUTHORS

- Dotan Barak \<dotanba@gmail.com\>
