DPDK  24.07.0-rc3
Data Structures | Data Fields
rte_ring Struct Reference

#include <rte_ring_core.h>

Data Structures

union  __rte_cache_aligned

Data Fields

int flags
const struct rte_memzonememzone
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.

examples/bbdev_app/main.c, examples/distributor/main.c, examples/dma/dmafwd.c, examples/ip_pipeline/pipeline.c, examples/ip_pipeline/swq.c, examples/ip_pipeline/thread.c, examples/multi_process/client_server_mp/mp_client/client.c, examples/multi_process/simple_mp/main.c, examples/packet_ordering/main.c, examples/pipeline/cli.c, examples/qos_sched/init.c, and examples/server_node_efd/efd_node/node.c.

Definition at line 120 of file rte_ring_core.h.

Field Documentation

◆ name


Name of the ring.

examples/ip_pipeline/pipeline.c, and examples/pipeline/cli.c.

Definition at line 121 of file rte_ring_core.h.

◆ flags

int flags

Flags supplied at creation.


Definition at line 123 of file rte_ring_core.h.

◆ memzone

const struct rte_memzone* memzone

Memzone, if any, containing the rte_ring

Definition at line 124 of file rte_ring_core.h.

◆ size

uint32_t size

Size of ring.


Definition at line 126 of file rte_ring_core.h.

◆ mask

uint32_t mask

Mask (size-1) of ring.

Definition at line 127 of file rte_ring_core.h.

◆ capacity

uint32_t capacity

Usable size of ring

Definition at line 128 of file rte_ring_core.h.

The documentation for this struct was generated from the following file: