DPDK 25.07.0
|
Go to the source code of this file.
Data Structures | |
struct | rte_node_mbuf_overload_fields |
struct | 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) |
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.
#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.
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.
rte_node specific mbuf dynamic field structure [rte_node_mbuf_dynfield_t]
It holds two types of fields:
|
static |
For a given mbuf and dynamic offset, return pointer to rte_node_mbuf_dynfield_t *
m | Mbuf |
offset | Dynamic offset returned by rte_node_mbuf_dynfield_register() |
Definition at line 107 of file rte_node_mbuf_dynfield.h.
|
static |
For a given mbuf and dynamic offset, return pointer to overloadable fields. Nodes can typecast returned pointer to reuse for their own purpose.
m | Mbuf |
offset | Dynamic offset returned by rte_node_mbuf_dynfield_register() |
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
Can be called multiple times by any number of nodes in init() function.