rte_ring
Contents
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
charname[RTE_RING_NAMESIZE]
Name of the ring.
Definition at line 117 of file rte_ring_core.h.
intflags
Flags supplied at creation.
Definition at line 119 of file rte_ring_core.h.
conststructrte_memzone*memzone
Memzone, if any, containing the rte_ring
Definition at line 120 of file rte_ring_core.h.
uint32_tsize
Size of ring.
Definition at line 122 of file rte_ring_core.h.
uint32_tmask
Mask (size-1) of ring.
Definition at line 123 of file rte_ring_core.h.
uint32_tcapacity
Usable size of ring
Definition at line 124 of file rte_ring_core.h.
Name
rte_ring
Synopsis
#include <rte_ring_core.h>
DataStructures
union __rte_cache_alignedDataFields
char name [RTE_RING_NAMESIZE]
int flags
const struct rte_memzone * memzone
uint32_t size
uint32_t mask
uint32_t capacity