---
name: "ibv_modify_cq"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ibv_modify_cq"
---

# ibv\_modify\_cq(3)

modify a completion queue (CQ)

## NAME

ibv\_modify\_cq - modify a completion queue (CQ)

## SYNOPSIS

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

int ibv_modify_cq(struct ibv_cq *cq, struct ibv_modify_cq_attr *cq_attr);

```

## DESCRIPTION

**ibv\_modify\_cq()** modify a CQ *cq.* The argument *cq\_attr* is an ibv\_modify\_cq\_attr struct, as defined in \<infiniband/verbs.h\>.

```
struct ibv_moderate_cq {
uint16_t cq_count;  /* number of completions per event */
uint16_t cq_period; /* in micro seconds */
};
struct ibv_modify_cq_attr {
	uint32_t attr_mask;
	struct ibv_moderate_cq moderate;
};
```

The function **ibv\_modify\_cq()** will modify the CQ, based on the given *cq\_attr-\>attr\_mask*

## RETURN VALUE

returns 0 on success, or the value of errno on failure (which indicates the failure reason).

## SEE ALSO

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

## AUTHORS

- Yonatan Cohen \<yonatanc@mellanox.com\>
