DPDK  19.08.0-rc0
Data Fields
rte_ring Struct Reference

#include <rte_ring.h>

Data Fields

char name [RTE_MEMZONE_NAMESIZE__rte_cache_aligned
 
int flags
 
const struct rte_memzonememzone
 
uint32_t size
 
uint32_t mask
 
uint32_t capacity
 
char pad0 __rte_cache_aligned
 
struct rte_ring_headtail prod __rte_cache_aligned
 
char pad1 __rte_cache_aligned
 
struct rte_ring_headtail cons __rte_cache_aligned
 
char pad2 __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
examples/bbdev_app/main.c, examples/distributor/main.c, examples/ip_pipeline/pipeline.c, examples/ip_pipeline/swq.c, examples/ip_pipeline/thread.c, examples/load_balancer/init.c, examples/load_balancer/runtime.c, examples/multi_process/client_server_mp/mp_client/client.c, examples/multi_process/simple_mp/main.c, examples/packet_ordering/main.c, examples/performance-thread/common/lthread_tls.c, examples/performance-thread/l3fwd-thread/main.c, examples/qos_sched/init.c, examples/quota_watermark/qw/init.c, examples/quota_watermark/qw/main.c, examples/quota_watermark/qwctl/commands.c, examples/server_node_efd/node/node.c, and examples/tep_termination/main.c.

Definition at line 81 of file rte_ring.h.

Field Documentation

◆ __rte_cache_aligned [1/6]

char name [RTE_MEMZONE_NAMESIZE] __rte_cache_aligned

Name of the ring.

Definition at line 87 of file rte_ring.h.

◆ flags

int flags

Flags supplied at creation.

Examples
examples/bbdev_app/main.c, and examples/ip_pipeline/swq.c.

Definition at line 88 of file rte_ring.h.

◆ memzone

const struct rte_memzone* memzone

Memzone, if any, containing the rte_ring

Definition at line 89 of file rte_ring.h.

◆ size

uint32_t size

Size of ring.

Examples
examples/performance-thread/l3fwd-thread/main.c.

Definition at line 91 of file rte_ring.h.

◆ mask

uint32_t mask

Mask (size-1) of ring.

Definition at line 92 of file rte_ring.h.

◆ capacity

uint32_t capacity

Usable size of ring

Definition at line 93 of file rte_ring.h.

◆ __rte_cache_aligned [2/6]

char pad0 __rte_cache_aligned

empty cache line

Definition at line 95 of file rte_ring.h.

◆ __rte_cache_aligned [3/6]

struct rte_ring_headtail prod __rte_cache_aligned

Ring producer status.

Definition at line 98 of file rte_ring.h.

◆ __rte_cache_aligned [4/6]

char pad1 __rte_cache_aligned

empty cache line

Definition at line 99 of file rte_ring.h.

◆ __rte_cache_aligned [5/6]

struct rte_ring_headtail cons __rte_cache_aligned

Ring consumer status.

Definition at line 102 of file rte_ring.h.

◆ __rte_cache_aligned [6/6]

char pad2 __rte_cache_aligned

empty cache line

Definition at line 103 of file rte_ring.h.


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