RTE_NODE_MBUF_OVERLOAD_FIELDS_T(3)
π rte_node_mbuf_dynfield.h(3) β Library Functions Manual π
okay bestie, welcome to the manual page for rte_node_mbuf_dynfield.h, straight outta section 3 (the Library Functions Manual, if you're keeping track π). this is where DPDK keeps the receipts for the rte_node-specific mbuf dynamic field region. let's get into it, no cap β¨
πΈ NAME πΈ
rte_node_mbuf_dynfield.h
β¨ SYNOPSIS β¨
#include <rte_common.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
π«Ά Data Structures
struct rte_node_mbuf_overload_fieldsstruct rte_node_mbuf_dynfield
π Macros
#define RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE (0)
#define RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE (8)
#define RTE_NODE_MBUF_DYNFIELD_SIZE
(RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE +
RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE)
π¦ Typedefs
typedef struct rte_node_mbuf_overload_fields
rte_node_mbuf_overload_fields_t
typedef struct rte_node_mbuf_dynfield rte_node_mbuf_dynfield_t
π Functions
static __rte_experimental __rte_always_inline rte_node_mbuf_dynfield_t *
rte_node_mbuf_dynfield_get (struct rte_mbuf *m, const int offset)
static __rte_experimental __rte_always_inline
rte_node_mbuf_overload_fields_t * rte_node_mbuf_overload_fields_get
(struct rte_mbuf *m, const int offset)
__rte_experimental int rte_node_mbuf_dynfield_register (void)
π₯ Detailed Description π₯
Warning π¨ EXPERIMENTAL: this API may change without prior notice. it's giving "we're still cooking", so don't build your whole personality on it being stable, bestie.
Defines rte_node specific mbuf dynamic field region [rte_node_mbuf_dynfield_t] which can be used by both DPDK built-in and out-of-tree nodes for storing per-mbuf fields for graph walk. β¨
Definition in file rte_node_mbuf_dynfield.h.
π Macro Definition Documentation π
#define RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE (0)
Size of persistent mbuf fields.
Definition at line 29 of file rte_node_mbuf_dynfield.h.
#define RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE (8)
Size of overloadable mbuf fields.
Definition at line 34 of file rte_node_mbuf_dynfield.h.
#define RTE_NODE_MBUF_DYNFIELD_SIZE
(RTE_NODE_MBUF_PERSISTENT_FIELDS_SIZE +
RTE_NODE_MBUF_OVERLOADABLE_FIELDS_SIZE)
Size of node mbuf dynamic field.
Definition at line 38 of file rte_node_mbuf_dynfield.h.
π§ Typedef Documentation π§
typedef struct rte_node_mbuf_overload_fields rte_node_mbuf_overload_fields_t
Node mbuf overloadable data. π«
Out-of-tree nodes can repurpose overloadable fields via rte_node_mbuf_overload_fields_get(mbuf). Overloadable fields are not preserved and typically can be used with-in two adjacent nodes in the graph. (two adjacent nodes only, babe β that's the whole bit π«Ά)
typedef struct rte_node_mbuf_dynfield rte_node_mbuf_dynfield_t
rte_node specific mbuf dynamic field structure [rte_node_mbuf_dynfield_t]. π
It holds two types of fields:
- Persistent fields: Fields which are preserved across nodes during graph walk.
- Eg: rx/tx interface etc
- Overloadable fields: Fields which can be repurposed by two adjacent nodes.
β Function Documentation β
__rte_experimental __rte_always_inline rte_node_mbuf_dynfield_t * rte_node_mbuf_dynfield_get (struct rte_mbuf * m, const int offset) [static]
For a given mbuf and dynamic offset, return pointer to rte_node_mbuf_dynfield_t *. literally hand you the pointer, iconic behavior π
Parameters
- m β Mbuf
- offset β Dynamic offset returned by
rte_node_mbuf_dynfield_register()
Returns
Pointer to node specific mbuf dynamic field structure.
Definition at line 107 of file rte_node_mbuf_dynfield.h.
__rte_experimental __rte_always_inline rte_node_mbuf_overload_fields_t * rte_node_mbuf_overload_fields_get (struct rte_mbuf * m, const int offset) [static]
For a given mbuf and dynamic offset, return pointer to overloadable fields. Nodes can typecast returned pointer to reuse for their own purpose. (typecast away, bestie, it's your world π )
Parameters
- m β Mbuf
- offset β Dynamic offset returned by
rte_node_mbuf_dynfield_register()
Returns
Pointer to node mbuf overloadable fields.
Definition at line 125 of file rte_node_mbuf_dynfield.h.
__rte_experimental int rte_node_mbuf_dynfield_register (void )
Register rte_node specific common mbuf dynamic field region. Can be called in rte_node_register()->init() function to save offset in node->ctx. π―
In process() function, node->ctx can be passed to:
rte_node_mbuf_dynfield_get(mbuf, offset)rte_node_mbuf_overload_fields_get(mbuf, offset)
Can be called multiple times by any number of nodes in init() function. the way it's just chill about repeat calls, obsessed π₯°
- Very first call registers dynamic field and returns offset.
- Subsequent calls return same offset.
Returns
<0 on error: rte_errno set to one of:
ENOMEM- no memory>=0on success: dynamic field offset
πΈ Author πΈ
Generated automatically by Doxygen for DPDK from the source code. (not a human, just vibes π€π)
and that's the whole page, babe π this was DPDK Version 25.11.3, page rte_node_mbuf_dynfield.h(3) β take care of her, she's experimental ππ¦β¨
π¦ 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