rte_graph_...c_worker.h(3)
โจ rte_graph_feature_arc_worker.h โ Library Functions Manual, section 3 โจ
okay bestie sit DOWN because we're doing the header file of header files ๐ this is rte_graph_feature_arc_worker.h, it lives in the Library Functions Manual (that's the manual name, section 3, iykyk), and it is entirely about the fast path of graph feature arcs. no cap.
๐ธ NAME ๐ธ
rte_graph_feature_arc_worker.h โ yes that's the whole name. iconic, brief, unbothered.
๐ฆ SYNOPSIS ๐ฆ
First things first, the includes, literally copy-paste these:
#include <stddef.h>
#include <rte_graph_feature_arc.h>
#include <rte_bitops.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
๐ Data Structures
the squad of structs showing up in this file:
struct rte_graph_feature_arcstruct rte_feature_arc_mainstruct rte_graph_feature_datastruct rte_graph_feature_arc_mbuf_dynfields
๐ Macros
the four macros, right there in the synopsis:
#define RTE_GRAPH_FEATURE_ARC_DYNFIELD_NAMEโ'__rte_graph_feature_arc_mbuf_dynfield'#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2 3#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc)#define RTE_GRAPH_FEATURE_TO_FEATURE_DATA(arc, feature, index)
๐ Typedefs
just the one, but she's important:
typedef struct rte_feature_arc_main rte_graph_feature_arc_main_t
๐ Functions
every single one of these, exactly as declared, no edits, no shortcuts, we don't do that here:
static __rte_experimental __rte_always_inline struct
rte_graph_feature_arc_mbuf_dynfields *
rte_graph_feature_arc_mbuf_dynfields_get (struct rte_mbuf *mbuf,
const int dyn_offset)
static __rte_experimental __rte_always_inline int
rte_graph_feature_is_valid (rte_graph_feature_t feature)
static __rte_experimental __rte_always_inline int
rte_graph_feature_data_is_valid (rte_graph_feature_data_t
feature_data)
static __rte_experimental __rte_always_inline struct
rte_graph_feature_arc * rte_graph_feature_arc_get
(rte_graph_feature_arc_t arc)
static __rte_experimental __rte_always_inline struct
rte_graph_feature_data * __rte_graph_feature_data_get (struct
rte_graph_feature_arc *arc, rte_graph_feature_data_t fdata)
static __rte_experimental __rte_always_inline rte_edge_t
__rte_graph_feature_data_edge_get (struct rte_graph_feature_data
*fdata)
static __rte_experimental __rte_always_inline uint16_t
__rte_graph_feature_data_app_cookie_get (struct
rte_graph_feature_data *fdata)
static __rte_experimental __rte_always_inline rte_graph_feature_data_t
__rte_graph_feature_data_next_feature_get (struct
rte_graph_feature_data *fdata)
static __rte_experimental __rte_always_inline uint16_t
rte_graph_feature_data_app_cookie_get (struct rte_graph_feature_arc
*arc, rte_graph_feature_data_t fdata)
static __rte_experimental __rte_always_inline int
rte_graph_feature_data_next_feature_get (struct
rte_graph_feature_arc *arc, rte_graph_feature_data_t *fdata,
rte_edge_t *next_edge)
static __rte_experimental __rte_always_inline struct
rte_graph_feature_data * rte_graph_feature_data_get (struct
rte_graph_feature_arc *arc, rte_graph_feature_data_t fdata)
static __rte_experimental __rte_always_inline int
rte_graph_feature_data_first_feature_get (struct
rte_graph_feature_arc *arc, uint32_t index, rte_graph_feature_data_t
*fdata, rte_edge_t *edge)
static __rte_experimental __rte_always_inline uint64_t
rte_graph_feature_arc_is_any_feature_enabled (struct
rte_graph_feature_arc *arc)
static __rte_experimental __rte_always_inline void
rte_graph_feature_arc_prefetch (struct rte_graph_feature_arc *arc)
static __rte_experimental __rte_always_inline void
rte_graph_feature_arc_feature_data_prefetch (struct
rte_graph_feature_arc *arc, rte_graph_feature_data_t fdata)
โญ Variables
one glorious global, that's it:
rte_graph_feature_arc_main_t * __rte_graph_feature_arc_main
๐ Detailed Description ๐
โ ๏ธ Warning โ EXPERIMENTAL: every single function in this file can be changed or removed without prior notice. fr fr. do not get attached, she is โจunstableโจ and that is on purpose.
so basically: this is the Fast path Graph feature arc API ๐ซ
Definition in file rte_graph_feature_arc_worker.h.
๐ Macro Definition Documentation ๐
#define RTE_GRAPH_FEATURE_ARC_DYNFIELD_NAME
'__rte_graph_feature_arc_mbuf_dynfield'
okay so this one is the name of the dynamic mbuf field offset that gets registered over in rte_graph_feature_arc_init() ๐ so when you see that dynfield name floating around in your mbufs, you know exactly who put it there.
Definition at line 262 of file rte_graph_feature_arc_worker.h.
#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2 3
literally just log2(sizeof (struct rte_graph_feature_data)) โ the log squared business for sizing, nothing scary, it's giving "trust the math" ๐งฎโจ
Definition at line 265 of file rte_graph_feature_arc_worker.h.
#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE( arc)
Value:
(arc->feature_size >> RTE_GRAPH_FEATURE_DATA_SIZE_LOG2)
this is the number of struct rte_graph_feature_data per feature ๐ like how many feature-data slots each feature gets to claim. divide by shifting, slay.
Definition at line 268 of file rte_graph_feature_arc_worker.h.
#define RTE_GRAPH_FEATURE_TO_FEATURE_DATA( arc, feature, index)
Value:
((rte_graph_feature_data_t) \
((RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc) * (feature)) + (index)))
this is the glow-up conversion: get a rte_graph_feature_data_t from a rte_graph_feature_t โจ you hand it the arc, the feature and the index, and it hands you back the feature-data. main character energy honestly.
Definition at line 272 of file rte_graph_feature_arc_worker.h.
๐ซถ Typedef Documentation ๐ซถ
typedef struct rte_feature_arc_main rte_graph_feature_arc_main_t
Feature arc main object ๐
she holds all feature arcs created by application โ every single one, no feature arc left behind, that's the vibe.
๐ซ FUNCTION DOCUMENTATION ๐ซ
๐ธ rte_graph_feature_arc_mbuf_dynfields_get
__rte_experimental __rte_always_inline struct
rte_graph_feature_arc_mbuf_dynfields *
rte_graph_feature_arc_mbuf_dynfields_get (struct rte_mbuf * mbuf, const
int dyn_offset) [static]
okay bestie, this one gets you the dynfield offset for the feature-arc-specific fields living inside the mbuf ๐ฅ
So the feature arc mbuf dynamic field is separate so that it can use mbuf->dynfield2 instead of dynfield1. not me being all about that dynfield2 life ๐
This arc-specific dynamic offset gets registered as part of rte_graph_feature_arc_init() and then copied into every arc for fast path access. the whole point? it stops nodes from having to maintain a dynamic offset themselves for the feature arc, and if we're lucky the field gets allocated from mbuf->dynfield2. if we're not lucky, then every node has to maintain at least two dynamic offsets in the fast path ๐ญ
Parameters
- mbuf โ pointer to mbuf
- dyn_offset โ retrieved from
arc->mbuf_dyn_offset
Returns
NULLโ on failure- Non-
NULLpointer โ on success โจ
Defined at line 307 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_is_valid
__rte_experimental __rte_always_inline int rte_graph_feature_is_valid
(rte_graph_feature_t feature) [static]
The API that tells you whether a feature is valid or not โ the vibe check, basically ๐ฆ
Parameters
- feature โ
rte_graph_feature_t
Returns
1โ if feature is valid0โ if feature is invalid
Defined at line 326 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_data_is_valid
__rte_experimental __rte_always_inline int rte_graph_feature_data_is_valid
(rte_graph_feature_data_t feature_data) [static]
Same energy, but for feature data this time ๐ซถ
Parameters
- feature_data โ
rte_graph_feature_data_t
Returns
1โ if feature data is valid0โ if feature data is invalid
Defined at line 343 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_arc_get
__rte_experimental __rte_always_inline struct rte_graph_feature_arc *
rte_graph_feature_arc_get (rte_graph_feature_arc_t arc) [static]
Grab yourself a pointer to the feature arc object from an rte_graph_feature_arc_t ๐
Parameters
- arc โ feature arc
Returns
NULLโ on failure- Non-
NULLpointer โ on success
Defined at line 360 of file rte_graph_feature_arc_worker.h.
๐ธ __rte_graph_feature_data_get
__rte_experimental __rte_always_inline struct rte_graph_feature_data *
__rte_graph_feature_data_get (struct rte_graph_feature_arc * arc,
rte_graph_feature_data_t fdata) [static]
Get the rte_graph_feature_t out of a feature arc object โ and babe, no checks at all, this is the raw unhinged version ๐ (that leading double underscore in the name is your lil warning label, iykyk)
Parameters
- arc โ feature arc
- fdata โ feature data object
Returns
- Pointer to feature data object
Defined at line 387 of file rte_graph_feature_arc_worker.h.
๐ธ __rte_graph_feature_data_edge_get
__rte_experimental __rte_always_inline rte_edge_t
__rte_graph_feature_data_edge_get (struct rte_graph_feature_data *
fdata) [static]
Get the next edge from a feature data pointer. once again: without any check ๐
Parameters
- fdata โ feature data object
Returns
- next edge
Defined at line 405 of file rte_graph_feature_arc_worker.h.
๐ธ __rte_graph_feature_data_app_cookie_get
__rte_experimental __rte_always_inline uint16_t
__rte_graph_feature_data_app_cookie_get (struct rte_graph_feature_data *
fdata) [static]
Get the app_cookie straight off the feature data pointer, and yep โ without any check, the theme continues ๐
Parameters
- fdata โ feature data object
Returns
app_cookieset by the caller inrte_graph_feature_enable()API
Defined at line 421 of file rte_graph_feature_arc_worker.h.
๐ธ __rte_graph_feature_data_next_feature_get
__rte_experimental __rte_always_inline rte_graph_feature_data_t
__rte_graph_feature_data_next_feature_get (struct rte_graph_feature_data
* fdata) [static]
Pull next_enabled_feature_data from a pointer to feature data. without any check, bestie, we live dangerously here ๐
Parameters
- fdata โ feature data object
Returns
- next enabled feature data from this feature data
Defined at line 437 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_data_app_cookie_get
__rte_experimental __rte_always_inline uint16_t
rte_graph_feature_data_app_cookie_get (struct rte_graph_feature_arc *
arc, rte_graph_feature_data_t fdata) [static]
The polite, well-behaved twin of the earlier one: get app_cookie from a feature data object, but this time with checks ๐
Parameters
- arc โ feature arc
- fdata โ feature data object
Returns
app_cookieset by the caller inrte_graph_feature_enable()API
Defined at line 456 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_data_next_feature_get
__rte_experimental __rte_always_inline int
rte_graph_feature_data_next_feature_get (struct rte_graph_feature_arc *
arc, rte_graph_feature_data_t * fdata, rte_edge_t * next_edge) [static]
Get next_enabled_feature_data from the current feature data object, and this one does check for you ๐ซถ
Parameters
- arc โ feature arc
- fdata โ pointer to feature data object
- next_edge โ the
next_edgefrom the current feature to the next enabled feature
Returns
1โ if next feature enabled on index0โ if no feature is enabled on index
Defined at line 483 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_data_get
__rte_experimental __rte_always_inline struct rte_graph_feature_data *
rte_graph_feature_data_get (struct rte_graph_feature_arc * arc,
rte_graph_feature_data_t fdata) [static]
Get the struct rte_graph_feature_data from an rte_graph_feature_dat_t ๐
Parameters
- arc โ feature arc
- fdata โ feature data object
Returns
NULLโ on failure- Non-
NULLpointer โ on success
Defined at line 511 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_data_first_feature_get
__rte_experimental __rte_always_inline int
rte_graph_feature_data_first_feature_get (struct rte_graph_feature_arc *
arc, uint32_t index, rte_graph_feature_data_t * fdata, rte_edge_t *
edge) [static]
Get the feature data that corresponds to the first enabled feature on a given index โญ
Parameters
- arc โ feature arc
- index โ interface index
- fdata โ feature data object
- edge โ
rte_edgeobject
Returns
1โ if any feature enabled on index, and it returns the corresponding valid feature data0โ if no feature is enabled on index
Defined at line 539 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_arc_is_any_feature_enabled
__rte_experimental __rte_always_inline uint64_t
rte_graph_feature_arc_is_any_feature_enabled (struct
rte_graph_feature_arc * arc) [static]
Fast path API that checks whether any feature is enabled on a feature arc. typically you'd call this from arc->start_node's process function, main character energy ๐
Parameters
- arc โ feature arc object
Returns
0โ if no feature is enabled- Non-zero โ a bitmask of the features that are enabled โจ
Defined at line 580 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_arc_prefetch
__rte_experimental __rte_always_inline void rte_graph_feature_arc_prefetch
(struct rte_graph_feature_arc * arc) [static]
Prefetch the feature arc fast path cache line so it's already warm when you need it โ manifesting that cache hit for you ๐ง
Parameters
- arc โ RTE_GRAPH feature arc object
Defined at line 597 of file rte_graph_feature_arc_worker.h.
๐ธ rte_graph_feature_arc_feature_data_prefetch
__rte_experimental __rte_always_inline void
rte_graph_feature_arc_feature_data_prefetch (struct
rte_graph_feature_arc * arc, rte_graph_feature_data_t fdata) [static]
Same deal but for the feature-data-related fast path cache line ๐
Parameters
- arc โ RTE_GRAPH feature arc object
- fdata โ pointer to feature data object
Defined at line 612 of file rte_graph_feature_arc_worker.h.
๐ฆ VARIABLE DOCUMENTATION ๐ฆ
๐ฆ rte_graph_feature_arc_main_t* __rte_graph_feature_arc_main [extern]
Just your friendly neighbourhood extern variable ๐ โ it's declared extern, so the actual storage lives somewhere else, as extern variables do.
โ๏ธ AUTHOR โ๏ธ
Generated automatically by Doxygen for DPDK from the source code. so technically the real author is a robot, and honestly? slay, the robot ate ๐ค๐
and that's a wrap on part 2 bestie!! ๐ this whole page was served fresh from the DPDK source code, Version 25.11.3, in the rte_graph_...c_worker.h(3) manual โ go forth and enable your features, ily, 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