DPDK
20.08.0
|
#include <rte_ring_core.h>
Data Fields | |
char name[RTE_MEMZONE_NAMESIZE] | __rte_cache_aligned |
int | flags |
const struct rte_memzone * | memzone |
uint32_t | size |
uint32_t | mask |
uint32_t | capacity |
char pad0 | __rte_cache_aligned |
union { | |
} | __rte_cache_aligned |
char pad1 | __rte_cache_aligned |
union { | |
} | __rte_cache_aligned |
char pad2 | __rte_cache_aligned |
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). These indexes are between 0 and 2^32, 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 123 of file rte_ring_core.h.
char name [RTE_MEMZONE_NAMESIZE] __rte_cache_aligned |
Name of the ring.
Definition at line 129 of file rte_ring_core.h.
int flags |
Flags supplied at creation.
Definition at line 131 of file rte_ring_core.h.
const struct rte_memzone* memzone |
Memzone, if any, containing the rte_ring
Definition at line 132 of file rte_ring_core.h.
uint32_t size |
Size of ring.
Definition at line 134 of file rte_ring_core.h.
uint32_t mask |
Mask (size-1) of ring.
Definition at line 135 of file rte_ring_core.h.
uint32_t capacity |
Usable size of ring
Definition at line 136 of file rte_ring_core.h.
char pad0 __rte_cache_aligned |
empty cache line
Definition at line 138 of file rte_ring_core.h.
RTE_STD_C11 { ... } __rte_cache_aligned |
Ring producer status.
char pad1 __rte_cache_aligned |
empty cache line
Definition at line 148 of file rte_ring_core.h.
RTE_STD_C11 { ... } __rte_cache_aligned |
Ring consumer status.
char pad2 __rte_cache_aligned |
empty cache line
Definition at line 158 of file rte_ring_core.h.