rte_graph_feature_arc_worker.h(3)
β¨ rte_graph_feature_arc_worker.h(3) β¨
okay so bestie, this is the DPDK manual page for rte_graph_feature_arc_worker.h(3) β and it is lowkey a whole vibe of fast-path graph feature-arc energy. Buckle up, weβre reading the whole thing together, no skipping, no cap. π
π NAME
rte_graph_feature_arc_worker.h
π οΈ SYNOPSIS
#include <stddef.h>
#include <rte_graph_feature_arc.h>
#include <rte_bitops.h>
#include <rte_mbuf.h>
#include <rte_mbuf_dyn.h>
π§± Data Structures
struct rte_graph_feature_arcstruct rte_feature_arc_mainstruct rte_graph_feature_datastruct rte_graph_feature_arc_mbuf_dynfields
π§ Macros
#define RTE_GRAPH_FEATURE_ARC_DYNFIELD_NAMEβ value is'__rte_graph_feature_arc_mbuf_dynfield'#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2β value is3#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc)β value is(arc->feature_size >> RTE_GRAPH_FEATURE_DATA_SIZE_LOG2)#define RTE_GRAPH_FEATURE_TO_FEATURE_DATA(arc, feature, index)β value is:
((rte_graph_feature_data_t) ((RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc) * (feature)) + (index)))
π«Ά Typedefs
typedef struct rte_feature_arc_main rte_graph_feature_arc_main_tβ feature arc main object. Holds all feature arcs created by application.
π Functions
rte_graph_feature_arc_mbuf_dynfields_getβ signature:
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)
rte_graph_feature_is_validβ signature:
static __rte_experimental __rte_always_inline int
rte_graph_feature_is_valid (rte_graph_feature_t feature)
rte_graph_feature_data_is_validβ signature:
static __rte_experimental __rte_always_inline int
rte_graph_feature_data_is_valid (rte_graph_feature_data_t
feature_data)
rte_graph_feature_arc_getβ signature:
static __rte_experimental __rte_always_inline struct
rte_graph_feature_arc * rte_graph_feature_arc_get
(rte_graph_feature_arc_t arc)
__rte_graph_feature_data_getβ signature:
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)
__rte_graph_feature_data_edge_getβ signature:
static __rte_experimental __rte_always_inline rte_edge_t
__rte_graph_feature_data_edge_get (struct rte_graph_feature_data
*fdata)
__rte_graph_feature_data_app_cookie_getβ signature:
static __rte_experimental __rte_always_inline uint16_t
__rte_graph_feature_data_app_cookie_get (struct
rte_graph_feature_data *fdata)
__rte_graph_feature_data_next_feature_getβ signature:
static __rte_experimental __rte_always_inline rte_graph_feature_data_t
__rte_graph_feature_data_next_feature_get (struct
rte_graph_feature_data *fdata)
rte_graph_feature_data_app_cookie_getβ signature:
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)
rte_graph_feature_data_next_feature_getβ signature:
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)
rte_graph_feature_data_getβ signature:
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)
rte_graph_feature_data_first_feature_getβ signature:
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)
rte_graph_feature_arc_is_any_feature_enabledβ signature:
static __rte_experimental __rte_always_inline uint64_t
rte_graph_feature_arc_is_any_feature_enabled (struct
rte_graph_feature_arc *arc)
rte_graph_feature_arc_prefetchβ signature:
static __rte_experimental __rte_always_inline void
rte_graph_feature_arc_prefetch (struct rte_graph_feature_arc *arc)
rte_graph_feature_arc_feature_data_prefetchβ signature:
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
rte_graph_feature_arc_main_t * __rte_graph_feature_arc_main
π¦ Detailed Description
Warning EXPERIMENTAL: All functions in this file may be changed or removed without prior notice.
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
#define RTE_GRAPH_FEATURE_ARC_DYNFIELD_NAME
'__rte_graph_feature_arc_mbuf_dynfield'
Name of dynamic mbuf field offset registered in rte_graph_feature_arc_init()
Definition at line 262 of file rte_graph_feature_arc_worker.h.
#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2 3
#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2 3
log2(sizeof (struct rte_graph_feature_data))
Definition at line 265 of file rte_graph_feature_arc_worker.h.
#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc)
#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc) (arc->feature_size >>
RTE_GRAPH_FEATURE_DATA_SIZE_LOG2)
Number of struct rte_graph_feature_data per feature
Definition at line 268 of file rte_graph_feature_arc_worker.h.
#define RTE_GRAPH_FEATURE_TO_FEATURE_DATA(arc, feature, index)
#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)))
Get rte_graph_feature_data_t from rte_graph_feature_t
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
typedef struct rte_feature_arc_main rte_graph_feature_arc_main_t
Feature arc main object
Holds all feature arcs created by application
π« FUNCTION DOCUMENTATION π«
okay bestie, this is the part where we meet the actual functions β the little worker bees π of the feature arc. every single one of them is static __rte_experimental __rte_always_inline, which likeβ¦ yeah, they're built for speed, no cap. let's go one by one, no skipping, i don't make the rules π
π«Ά rte_graph_feature_arc_mbuf_dynfields_get()
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]
Get the dynfield offset for the feature-arc-specific fields inside the mbuf. π
So here's the tea: the feature arc mbuf dynamic field is separate, and it uses mbuf->dynfield2 instead of dynfield1. iconique of it honestly.
This arc-specific dynamic offset is registered as part of rte_graph_feature_arc_init() and then copied into each arc for fast path access. why? because it avoids the node having to maintain a dynamic offset for the feature arc β and if we're lucky π, the field gets allocated out of mbuf->dynfield2. otherwise every single node would have to maintain at least two dynamic offsets in the fast path, and that's giving overhead.
Parameters:
mbufβ pointer to the mbufdyn_offsetβ retrieved fromarc->mbuf_dyn_offset
Returns:
NULLon failure, a non-NULLpointer on success β¨
Definition at line 307 of file rte_graph_feature_arc_worker.h.
π¦ rte_graph_feature_is_valid()
static __rte_experimental __rte_always_inline int rte_graph_feature_is_valid
(rte_graph_feature_t feature) [static]
The vibe-check API: is this feature valid or not? π
Parameters:
featureβ anrte_graph_feature_t
Returns:
1if the feature is valid,0if the feature is invalid
Definition at line 326 of file rte_graph_feature_arc_worker.h.
πΈ rte_graph_feature_data_is_valid()
static __rte_experimental __rte_always_inline int
rte_graph_feature_data_is_valid (rte_graph_feature_data_t feature_data)
[static]
Same energy, different struct: is this feature data valid or not? π
Parameters:
feature_dataβ anrte_graph_feature_data_t
Returns:
1if the feature data is valid,0if the feature data is invalid
Definition at line 343 of file rte_graph_feature_arc_worker.h.
π§ rte_graph_feature_arc_get()
static __rte_experimental __rte_always_inline struct rte_graph_feature_arc*
rte_graph_feature_arc_get (rte_graph_feature_arc_t arc) [static]
Get a pointer to the feature arc object from an rte_graph_feature_arc_t. literally just handing you the real thing π
Parameters:
arcβ the feature arc
Returns:
NULLon failure, a non-NULLpointer on success
Definition at line 360 of file rte_graph_feature_arc_worker.h.
β __rte_graph_feature_data_get()
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]
Get the rte_graph_feature_t from the feature arc object β and no, there are no checks here, that's the whole point of the double-underscore naming, iykyk π fast path behavior fr.
Parameters:
arcβ the feature arcfdataβ the feature data object
Returns:
Pointer to the feature data object
Definition at line 387 of file rte_graph_feature_arc_worker.h.
π₯ __rte_graph_feature_data_edge_get()
static __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 straight from a feature data pointer, without any check. main character energy, zero validation π
Parameters:
fdataβ the feature data object
Returns:
The next edge
Definition at line 405 of file rte_graph_feature_arc_worker.h.
π __rte_graph_feature_data_app_cookie_get()
static __rte_experimental __rte_always_inline uint16_t
__rte_graph_feature_data_app_cookie_get (struct rte_graph_feature_data *
fdata) [static]
Grab the app_cookie from the feature data pointer, without any check. yes, another unchecked one, the drama never stops π
Parameters:
fdataβ the feature data object
Returns:
The app_cookie set by the caller in the rte_graph_feature_enable() API
Definition at line 421 of file rte_graph_feature_arc_worker.h.
π __rte_graph_feature_data_next_feature_get()
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]
Get next_enabled_feature_data from a pointer to the feature data, without any check. are we sensing a pattern bestie π
Parameters:
fdataβ the feature data object
Returns:
The next enabled feature data from this feature data
Definition at line 437 of file rte_graph_feature_arc_worker.h.
π rte_graph_feature_data_app_cookie_get()
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]
Same cookie, but now with checks β this is the version where we actually look both ways before crossing the street πΈβ¨
Parameters:
arcβ the feature arcfdataβ the feature data object
Returns:
The app_cookie set by the caller in the rte_graph_feature_enable() API
Definition at line 456 of file rte_graph_feature_arc_worker.h.
π rte_graph_feature_data_next_feature_get()
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]
Get next_enabled_feature_data from the current feature data object β and this time with checks, because we're being responsible π
Parameters:
arcβ the feature arcfdataβ pointer to the feature data objectnext_edgeβ thenext_edgefrom the current feature to the next enabled feature
Returns:
1if the next feature is enabled on the index,0if no feature is enabled on the index
Definition at line 483 of file rte_graph_feature_arc_worker.h.
π¦ rte_graph_feature_data_get()
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]
Get the struct rte_graph_feature_data from an rte_graph_feature_dat_t. yes the type name really says rte_graph_feature_dat_t in the source β not me, not my fault, i copy faithfully π
Parameters:
arcβ the feature arcfdataβ the feature data object
Returns:
NULLon failure, a non-NULLpointer on success
Definition at line 511 of file rte_graph_feature_arc_worker.h.
π rte_graph_feature_data_first_feature_get()
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]
Get the feature data that corresponds to the first enabled feature on an index. the first one to show up gets the spotlight π
Parameters:
arcβ the feature arcindexβ interface indexfdataβ the feature data objectedgeβ therte_edge_tobject
Returns:
1if any feature is enabled on the index, returning the corresponding valid feature data;0if no feature is enabled on the index
Definition at line 539 of file rte_graph_feature_arc_worker.h.
β‘ rte_graph_feature_arc_is_any_feature_enabled()
static __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 to check if any feature is enabled on a feature arc β typically called from arc->start_node's process function. this is the "is anyone home??" of the arc πͺβ¨
Parameters:
arcβ the feature arc object
Returns:
0if no feature is enabled, non-zero bitmask of the enabled features
Definition at line 580 of file rte_graph_feature_arc_worker.h.
πΈ rte_graph_feature_arc_prefetch()
static __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 β get it warm before the fast path actually needs it π₯
Parameters:
arcβ the RTE_GRAPH feature arc object
Definition at line 597 of file rte_graph_feature_arc_worker.h.
π§ rte_graph_feature_arc_feature_data_prefetch()
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) [static]
Prefetch the feature-data-related fast path cache line. same cozy warming-up energy, different cache line π«Ά
Parameters:
arcβ the RTE_GRAPH feature arc objectfdataβ pointer to the feature data object
Definition 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]β extern variables β¨
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code. yes bestie, a robot wrote it, i just gave it a personality π π€
okay that's the whole page! mwah π it's from DPDK, version 25.11.0, with a date stamp starting Fri Jan 30 202 β go be iconic with your feature arcs, and remember: the double-underscore versions do not check anything, so pls be careful out there π«Άβ¨π
π¦ where this page comes from
- centos-stream 9: dpdk-devel 2:25.11-1.el9 Β· BSD and LGPLv2 and GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms