rte_ring_core.h(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

🌸 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_headtail
  • struct rte_ring
  • union 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