DPDK
24.11.0-rc1
|
#include <stdalign.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <rte_common.h>
#include <rte_config.h>
#include <rte_memory.h>
#include <rte_lcore.h>
#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_memzone.h>
#include <rte_pause.h>
#include <rte_debug.h>
Go to the source code of this file.
Data Structures | |
struct | rte_ring_headtail |
struct | rte_ring |
union | rte_ring::__rte_cache_aligned |
union | rte_ring::__rte_cache_aligned |
Macros | |
#define | RTE_RING_NAMESIZE |
#define | RING_F_SP_ENQ 0x0001 |
#define | RING_F_SC_DEQ 0x0002 |
#define | RING_F_EXACT_SZ 0x0004 |
#define | RTE_RING_SZ_MASK (0x7fffffffU) |
#define | RING_F_MP_RTS_ENQ 0x0008 |
#define | RING_F_MC_RTS_DEQ 0x0010 |
#define | RING_F_MP_HTS_ENQ 0x0020 |
#define | RING_F_MC_HTS_DEQ 0x0040 |
Enumerations | |
enum | rte_ring_queue_behavior { RTE_RING_QUEUE_FIXED = 0, RTE_RING_QUEUE_VARIABLE } |
enum | rte_ring_sync_type { RTE_RING_SYNC_MT, RTE_RING_SYNC_ST, RTE_RING_SYNC_MT_RTS, RTE_RING_SYNC_MT_HTS } |
This file contains definition of RTE ring structure itself, init flags and some related macros. For majority of DPDK entities, it is not recommended to include this file directly, use include <rte_ring.h> or <rte_ring_elem.h> instead.
Definition in file rte_ring_core.h.
#define RTE_RING_NAMESIZE |
The maximum length of a ring name.
Definition at line 49 of file rte_ring_core.h.
#define RING_F_SP_ENQ 0x0001 |
The default enqueue is "single-producer".
Definition at line 147 of file rte_ring_core.h.
#define RING_F_SC_DEQ 0x0002 |
The default dequeue is "single-consumer".
Definition at line 148 of file rte_ring_core.h.
#define RING_F_EXACT_SZ 0x0004 |
Ring is to hold exactly requested number of entries. Without this flag set, the ring size requested must be a power of 2, and the usable space will be that size - 1. With the flag, the requested size will be rounded up to the next power of two, but the usable space will be exactly that requested. Worst case, if a power-of-2 size is requested, half the ring space will be wasted.
Definition at line 157 of file rte_ring_core.h.
#define RTE_RING_SZ_MASK (0x7fffffffU) |
Ring size mask
Definition at line 158 of file rte_ring_core.h.
#define RING_F_MP_RTS_ENQ 0x0008 |
The default enqueue is "MP RTS".
Definition at line 160 of file rte_ring_core.h.
#define RING_F_MC_RTS_DEQ 0x0010 |
The default dequeue is "MC RTS".
Definition at line 161 of file rte_ring_core.h.
#define RING_F_MP_HTS_ENQ 0x0020 |
The default enqueue is "MP HTS".
Definition at line 163 of file rte_ring_core.h.
#define RING_F_MC_HTS_DEQ 0x0040 |
The default dequeue is "MC HTS".
Definition at line 164 of file rte_ring_core.h.
enqueue/dequeue behavior types
Enumerator | |
---|---|
RTE_RING_QUEUE_FIXED | Enq/Deq a fixed number of items from a ring |
RTE_RING_QUEUE_VARIABLE | Enq/Deq as many items as possible from ring |
Definition at line 40 of file rte_ring_core.h.
enum rte_ring_sync_type |
prod/cons sync types
Enumerator | |
---|---|
RTE_RING_SYNC_MT | multi-thread safe (default mode) |
RTE_RING_SYNC_ST | single thread only |
RTE_RING_SYNC_MT_RTS | multi-thread relaxed tail sync |
RTE_RING_SYNC_MT_HTS | multi-thread head/tail sync |
Definition at line 53 of file rte_ring_core.h.