rte_ring_core.h(3)
πΈ NAME πΈ
Okay bestie, this is the manual page for rte_ring_core.h from the DPDK Library Functions Manual β it's the core ring-structure file, and yes, it's giving very "internals only, don't touch unless you know what you're doing" energy. π
β¨ SYNOPSIS β¨
First up, here's everything this header pulls in β copy these exactly, no cap:
#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>
π§Έ Data Structures
The structures in this header are literally:
struct rte_ring_headtailstruct rte_ringunion rte_ring::__rte_cache_aligned
π Macros
Here are the macro names and values exactly as they appear in the synopsis, bestie:
#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
And the enums are:
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 }
π Detailed Description π
This file contains the definition of the RTE ring structure itself, plus init flags and some related macros. For the majority of DPDK entities, it is not recommended to include this file directly β use include <rte_ring.h> or include <rte_ring_elem.h> instead. Like, respect the layer, okay? π«Ά
Definition in file rte_ring_core.h.
π Macro Definition Documentation π
π RTE_RING_NAMESIZE
Value:
(RTE_MEMZONE_NAMESIZE - \
sizeof(RTE_RING_MZ_PREFIX) + 1)
This is the maximum length of a ring name. Iconic little limit. β¨
Definition at line 49 of file rte_ring_core.h.
π RING_F_SP_ENQ 0x0001
The default enqueue is "single-producer". That's the vibe this flag selects. π
Definition at line 147 of file rte_ring_core.h.
π RING_F_SC_DEQ 0x0002
The default dequeue is "single-consumer". Slay. π
Definition at line 148 of file rte_ring_core.h.
π RING_F_EXACT_SZ 0x0004
This flag says the ring is to hold exactly the 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. Not me wasting half the ring π β that's just what the doc says.
Definition at line 157 of file rte_ring_core.h.
π RTE_RING_SZ_MASK (0x7fffffffU)
Ring size mask. Tiny but important. πΈ
Definition at line 158 of file rte_ring_core.h.
π RING_F_MP_RTS_ENQ 0x0008
The default enqueue is "MP RTS". Periodt.
Definition at line 160 of file rte_ring_core.h.
π RING_F_MC_RTS_DEQ 0x0010
The default dequeue is "MC RTS". Yup, exactly that. β¨
Definition at line 161 of file rte_ring_core.h.
π RING_F_MP_HTS_ENQ 0x0020
The default enqueue is "MP HTS". Obsessed with the acronym honestly.
Definition at line 163 of file rte_ring_core.h.
π RING_F_MC_HTS_DEQ 0x0040
The default dequeue is "MC HTS". That's the one. π
Definition at line 164 of file rte_ring_core.h.
π Enumeration Type Documentation π
π¦ enum rte_ring_queue_behavior
These are the enqueue/dequeue behavior types.
Enumerators:
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
These are the prod/cons sync types, iykyk.
Enumerators:
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.
π Author π
Generated automatically by Doxygen for DPDK from the source code. Very "the tool wrote me, but make it cute" energy. π
π Cute little sign-off: this page is from DPDK Version 26.03.0, auto-generated by Doxygen for DPDK from the source code. Bye bestie, go read rte_ring.h instead if you're not doing deep internals! π«Άβ¨
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms