#include <rte_ring.h>
成员变量 | |
char | name [RTE_NAMESIZE] |
int | flags |
uint32_t | size |
uint32_t | mask |
uint32_t | capacity |
struct rte_ring_headtail | prod |
struct rte_ring_headtail | cons |
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.
uint32_t rte_ring::capacity |
Usable size of ring
struct rte_ring_headtail rte_ring::cons |
Ring consumer status.
int rte_ring::flags |
Flags supplied at creation. Memzone, if any, containing the rte_ring
uint32_t rte_ring::mask |
Mask (size-1) of ring.
char rte_ring::name[RTE_NAMESIZE] |
struct rte_ring_headtail rte_ring::prod |
Ring producer status.
uint32_t rte_ring::size |
Size of ring.