DPDK  16.04.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
struct rte_memzonememzone
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.

Examples:
distributor/main.c, ip_pipeline/thread.c, ip_pipeline/thread_fe.c, l2fwd-ivshmem/guest/guest.c, l2fwd-ivshmem/host/host.c, load_balancer/init.c, load_balancer/runtime.c, multi_process/client_server_mp/mp_client/client.c, multi_process/l2fwd_fork/main.c, multi_process/simple_mp/main.c, packet_ordering/main.c, performance-thread/common/lthread_tls.c, performance-thread/l3fwd-thread/main.c, qos_sched/init.c, quota_watermark/qw/init.c, quota_watermark/qw/main.c, quota_watermark/qwctl/commands.c, tep_termination/main.c, and vhost/main.c.

Definition at line 149 of file rte_ring.h.

Field Documentation

char name[RTE_RING_NAMESIZE]

Name of the ring.

Examples:
l2fwd-ivshmem/host/host.c, and multi_process/l2fwd_fork/main.c.

Definition at line 150 of file rte_ring.h.

int flags

Flags supplied at creation.

Examples:
multi_process/l2fwd_fork/main.c.

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.

void* ring [0] __rte_cache_aligned

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

Definition at line 182 of file rte_ring.h.


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