DPDK
17.05.2
|
#include <rte_ring.h>
Public Member Functions | |
struct rte_ring_headtail prod | __rte_aligned (PROD_ALIGN) |
struct rte_ring_headtail cons | __rte_aligned (CONS_ALIGN) |
Data Fields | |
char name[RTE_MEMZONE_NAMESIZE] | __rte_cache_aligned |
int | flags |
struct rte_memzone * | memzone |
uint32_t | size |
uint32_t | mask |
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 144 of file rte_ring.h.
|
read |
Ring producer status.
|
read |
Ring consumer status.
char name [RTE_MEMZONE_NAMESIZE] __rte_cache_aligned |
Name of the ring.
Definition at line 150 of file rte_ring.h.
int flags |
Flags supplied at creation.
Definition at line 151 of file rte_ring.h.
struct rte_memzone* memzone |
Memzone, if any, containing the rte_ring
Definition at line 152 of file rte_ring.h.
uint32_t size |
Size of ring.
Definition at line 154 of file rte_ring.h.
uint32_t mask |
Mask (size-1) of ring.
Definition at line 155 of file rte_ring.h.