DPDK  2.0.0
Data Structures | Data Fields
rte_ring Struct Reference

#include <rte_ring.h>

Data Structures

struct  cons
struct  prod

Data Fields

char name [RTE_RING_NAMESIZE]
int flags
void *ring[0] __rte_cache_aligned

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). 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.

Field Documentation

void* ring [0] __rte_cache_aligned

Memory space of ring starts here. not volatile so need to be careful about compiler re-ordering

int flags

Flags supplied at creation.

char name[RTE_RING_NAMESIZE]

Name of the ring.


The documentation for this struct was generated from the following file: