---
name: "io_uring_cqe_nr"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_cqe_nr"
---

# io\_uring\_cqe\_nr(3)

return the number of CQ ring slots consumed by a CQE

## NAME

io\_uring\_cqe\_nr - return the number of CQ ring slots consumed by a CQE

## SYNOPSIS

```
#include <liburing.h>
```

**unsigned io\_uring\_cqe\_nr(const struct io\_uring\_cqe \****cqe***);**

## DESCRIPTION

The [**io\_uring\_cqe\_nr**(3)](/io_uring_cqe_nr/3.md) function returns the number of CQ ring slots consumed by *cqe*. For normal 16-byte CQEs, this returns 1. For 32-byte CQEs (when **IORING\_CQE\_F\_32** is set in the CQE flags), this returns 2.

This function is useful when advancing the CQ ring with [**io\_uring\_cq\_advance**(3)](/io_uring_cq_advance/3.md) on rings that use **IORING\_SETUP\_CQE\_MIXED** where both 16-byte and 32-byte CQEs may be present.

## RETURN VALUE

Returns 1 for normal CQEs, or 2 for 32-byte CQEs.

## SEE ALSO

[**io\_uring\_cq\_advance**(3)](/io_uring_cq_advance/3.md), [**io\_uring\_cqe\_seen**(3)](/io_uring_cqe_seen/3.md), [**io\_uring\_setup**(2)](/io_uring_setup/2.md)
