rte_graph_feature_arc_worker.h(3)

πŸ“¦
version 25.11 Β· 3 versions
, in centos-stream 9

✨ 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_arc
  • struct rte_feature_arc_main
  • struct rte_graph_feature_data
  • struct 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 is 3
  • #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 mbuf
  • dyn_offset β€” retrieved from arc->mbuf_dyn_offset

Returns:

  • NULL on failure, a non-NULL pointer 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 β€” an rte_graph_feature_t

Returns:

  • 1 if the feature is valid, 0 if 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 β€” an rte_graph_feature_data_t

Returns:

  • 1 if the feature data is valid, 0 if 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:

  • NULL on failure, a non-NULL pointer 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 arc
  • fdata β€” 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.


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.


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 arc
  • fdata β€” 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 arc
  • fdata β€” pointer to the feature data object
  • next_edge β€” the next_edge from the current feature to the next enabled feature

Returns:

  • 1 if the next feature is enabled on the index, 0 if 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 arc
  • fdata β€” the feature data object

Returns:

  • NULL on failure, a non-NULL pointer 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 arc
  • index β€” interface index
  • fdata β€” the feature data object
  • edge β€” the rte_edge_t object

Returns:

  • 1 if any feature is enabled on the index, returning the corresponding valid feature data; 0 if 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:

  • 0 if 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 object
  • fdata β€” 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