|
DPDK
17.02.1
|
#include <rte_ring.h>
Data Structures | |
| struct | cons |
| struct | prod |
Data Fields | |
| char | name [RTE_MEMZONE_NAMESIZE] |
| int | flags |
| struct rte_memzone * | memzone |
| void *ring[] | __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 152 of file rte_ring.h.
| char name[RTE_MEMZONE_NAMESIZE] |
Name of the ring.
Definition at line 158 of file rte_ring.h.
| int flags |
Flags supplied at creation.
Definition at line 159 of file rte_ring.h.
| struct rte_memzone* memzone |
Memzone, if any, containing the rte_ring
Definition at line 160 of file rte_ring.h.
| void* ring [] __rte_cache_aligned |
Memory space of ring starts here. not volatile so need to be careful about compiler re-ordering
Definition at line 190 of file rte_ring.h.
1.8.1.2