rte_ring_core.h(3)
π rte_ring_core.h β Library Functions Manual β¨
okay so bestie, welcome to rte_ring_core.h(3) β yes that's the manual name, that's the page, we're here, we're seated π
πΈ NAME πΈ
rte_ring_core.h β it's giving header file, it's giving DPDK ring internals, it's giving main character energy fr fr π
β¨ SYNOPSIS β¨
the vibes start with these includes, 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
struct rte_ring_headtailstruct rte_ringunion 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 }
π DETAILED DESCRIPTION π
okay so this file is literally the definition of the RTE ring structure itself, plus the init flags, plus some related macros. like, the whole core of it. periodt.
and here's the tea bestie: for the majority of DPDK entities, it is not recommended to include this file directly π instead use include <rte_ring.h> or <rte_ring_elem.h> β those are the ones you actually want, iykyk.
Definition in file rte_ring_core.h.
π MACRO DEFINITION DOCUMENTATION π
π #define RTE_RING_NAMESIZE
Value:
(RTE_MEMZONE_NAMESIZE - \
sizeof(RTE_RING_MZ_PREFIX) + 1)
this is the maximum length of a ring name, bestie. yes it's math, yes it slays β¨
Definition at line 49 of file rte_ring_core.h.
π #define RING_F_SP_ENQ 0x0001
the default enqueue is "single-producer". iconic.
Definition at line 147 of file rte_ring_core.h.
π #define RING_F_SC_DEQ 0x0002
the default dequeue is "single-consumer". we love a matched set π«Ά
Definition at line 148 of file rte_ring_core.h.
π #define RING_F_EXACT_SZ 0x0004
okay this one actually matters so listen up: the ring is to hold exactly the requested number of entries. without this flag set, the ring size you request must be a power of 2, and the usable space will be that size minus one (yes really). with the flag, the requested size gets rounded up to the next power of two, but the usable space will be exactly that requested amount.
worst case? if you request a power-of-2 size, half the ring space will be wasted π so like, choose wisely.
Definition at line 157 of file rte_ring_core.h.
π #define RTE_RING_SZ_MASK (0x7fffffffU)
ring size mask. she's a mask, she masks, we stan π
Definition at line 158 of file rte_ring_core.h.
π #define RING_F_MP_RTS_ENQ 0x0008
the default enqueue is "MP RTS". slay.
Definition at line 160 of file rte_ring_core.h.
π #define RING_F_MC_RTS_DEQ 0x0010
the default dequeue is "MC RTS". periodt.
Definition at line 161 of file rte_ring_core.h.
π #define RING_F_MP_HTS_ENQ 0x0020
the default enqueue is "MP HTS". yes another one, we love an acronym β¨
Definition at line 163 of file rte_ring_core.h.
π #define RING_F_MC_HTS_DEQ 0x0040
the default dequeue is "MC HTS". and that's the last flag bestie, we made it π
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, like the personality types of your queue fr fr
Enumerator:
RTE_RING_QUEUE_FIXEDβ enq/deq a fixed number of items from a ring. commitment, we respect it π€RTE_RING_QUEUE_VARIABLEβ enq/deq as many items as possible from the ring. chaotic, flexible, honestly relatable π
Definition at line 40 of file rte_ring_core.h.
π¦ enum rte_ring_sync_type
these are the prod/cons sync types β the whole thread-safety vibe check πΈ
Enumerator:
RTE_RING_SYNC_MTβ multi-thread safe (default mode). the classic, the standard, the default queen πRTE_RING_SYNC_STβ single thread only. just you, no one else, very solo main character energyRTE_RING_SYNC_MT_RTSβ multi-thread relaxed tail sync. relaxed but make it threaded πRTE_RING_SYNC_MT_HTSβ multi-thread head/tail sync. head AND tail? obsessed π₯
Definition at line 53 of file rte_ring_core.h.
π AUTHOR π
generated automatically by Doxygen for DPDK from the source code. so like, not a human author, a whole robot did this. ate, honestly π€β¨
and that's the whole page bestie!! this was DPDK, Version 25.11.3, and the page is rte_ring_core.h(3) β go forth and ring responsibly, ily, byeee πππ¦
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms