rte_mempool(3)
π rte_mempool β bestie's guide to the mempool struct π
okay so this is from the Library Functions Manual, page rte_mempool(3). it's the C struct that DPDK uses to describe a mempool, and likeβ¦ it's lowkey the whole personality of your object allocator. let's get into it π«Ά
β¨ NAME β¨
rte_mempool β literally the RTE mempool structure itself, no cap
πΈ SYNOPSIS πΈ
#include <rte_mempool.h>
π Data Fields π
here's every single field, in order, exactly as they come. no notes, just vibes and types π
char name [RTE_MEMPOOL_NAMESIZE]
void * pool_config
const struct rte_memzone * mz
unsigned int flags
int socket_id
uint32_t size
uint32_t cache_size
uint32_t elt_size
uint32_t header_size
uint32_t trailer_size
unsigned private_data_size
int32_t ops_index
struct rte_mempool_cache * local_cache
uint32_t populated_size
struct rte_mempool_objhdr_list elt_list
uint32_t nb_mem_chunks
struct rte_mempool_memhdr_list mem_list
π¦ Detailed Description π¦
okay so this whole thing? it's The RTE mempool structure. that's it, that's the sentence. iconic. it lives at Definition at line 230 of file rte_mempool.h.
π Field Documentation π
this is the part where we go field by field and I tell you what each one's deal is. grab a snack bestie, there's a lot π
π char name[RTE_MEMPOOL_NAMESIZE]
Name of mempool. that's it β the name.
Definition at line 231 of file rte_mempool.h.
π void* pool_data
Ring or pool to store objects.
Definition at line 233 of file rte_mempool.h.
okay so heads up βpool_dataandpool_idshow up here in the field docs but they are not in the synopsis field list above. I'm just telling you exactly what the page says, no editing, fr fr. π
π uint64_t pool_id
External mempool identifier.
Definition at line 234 of file rte_mempool.h.
π void* pool_config
optional args for ops alloc.
Definition at line 236 of file rte_mempool.h.
π const struct rte_memzone* mz
Memzone where pool is alloc'd.
Definition at line 237 of file rte_mempool.h.
π unsigned int flags
Flags of the mempool.
Definition at line 238 of file rte_mempool.h.
π int socket_id
Socket id passed at create.
Definition at line 239 of file rte_mempool.h.
π uint32_t size
Max size of the mempool.
Definition at line 240 of file rte_mempool.h.
π uint32_t cache_size
Size of per-lcore default local cache.
Definition at line 241 of file rte_mempool.h.
π uint32_t elt_size
Size of an element.
Definition at line 244 of file rte_mempool.h.
π uint32_t header_size
Size of header (before elt).
Definition at line 245 of file rte_mempool.h.
π uint32_t trailer_size
Size of trailer (after elt).
Definition at line 246 of file rte_mempool.h.
π unsigned private_data_size
Size of private data.
Definition at line 248 of file rte_mempool.h.
π int32_t ops_index
Index into rte_mempool_ops_table array of mempool ops structs, which contain callback function pointers. We're using an index here rather than pointers to the callbacks to facilitate any secondary processes that may want to use this mempool.
the way that this one is doing the most β it's just an index, but it's an index on purpose, so secondary processes can still use the mempool. main character energy tbh β¨
Definition at line 256 of file rte_mempool.h.
π struct rte_mempool_cache* local_cache
Per-lcore local cache
Definition at line 258 of file rte_mempool.h.
π uint32_t populated_size
Number of populated objects.
Definition at line 260 of file rte_mempool.h.
π struct rte_mempool_objhdr_list elt_list
List of objects in pool
Definition at line 261 of file rte_mempool.h.
π uint32_t nb_mem_chunks
Number of memory chunks
Definition at line 262 of file rte_mempool.h.
π struct rte_mempool_memhdr_list mem_list
List of memory chunks
Definition at line 263 of file rte_mempool.h.
π§ Author π§
Generated automatically by Doxygen for DPDK from the source code.
likeβ¦ it literally wrote itself. slay π
and that's the whole page bestie! this lil doc came from DPDK Version 25.11.3, so if you're quoting it in a group chat, cite your source. mwah ππβ¨
π¦ 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