---
name: "rte_ring"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_ring"
---

# rte\_ring(3)

## NAME

rte\_ring

## SYNOPSIS

`#include <rte_ring_core.h>`

### Data Structures

union **\_\_rte\_cache\_aligned**\

### Data Fields

char **name** \[**RTE\_RING\_NAMESIZE**\]\
 int **flags**\
 const struct **rte\_memzone** \* **memzone**\
 uint32\_t **size**\
 uint32\_t **mask**\
 uint32\_t **capacity**\

## Detailed Description

An RTE ring structure.

The producer and the consumer have a head and a tail index. The particularity of these index is that they are not between 0 and **size(ring)**-1. These indexes are between 0 and 2^32 -1, and we mask their value when we access the ring\[\] field. Thanks to this assumption, we can do subtractions between 2 index values in a modulo-32bit base: that's why the overflow of the indexes is not a problem.

Definition at line **116** of file **rte\_ring\_core.h**.

## Field Documentation

### char name\[RTE\_RING\_NAMESIZE\]

Name of the ring.

Definition at line **117** of file **rte\_ring\_core.h**.

### int flags

Flags supplied at creation.

Definition at line **119** of file **rte\_ring\_core.h**.

### const struct rte\_memzone\* memzone

Memzone, if any, containing the **rte\_ring**

Definition at line **120** of file **rte\_ring\_core.h**.

### uint32\_t size

Size of ring.

Definition at line **122** of file **rte\_ring\_core.h**.

### uint32\_t mask

Mask (size-1) of ring.

Definition at line **123** of file **rte\_ring\_core.h**.

### uint32\_t capacity

Usable size of ring

Definition at line **124** of file **rte\_ring\_core.h**.

## Author

Generated automatically by Doxygen for DPDK from the source code.
