.TH "rte_graph_feature_arc_worker.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_graph_feature_arc_worker.h
.SH SYNOPSIS
.br
.PP
\fR#include <stddef\&.h>\fP
.br
\fR#include <rte_graph_feature_arc\&.h>\fP
.br
\fR#include <rte_bitops\&.h>\fP
.br
\fR#include <rte_mbuf\&.h>\fP
.br
\fR#include <rte_mbuf_dyn\&.h>\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBrte_graph_feature_arc\fP"
.br
.ti -1c
.RI "struct \fBrte_feature_arc_main\fP"
.br
.ti -1c
.RI "struct \fBrte_graph_feature_data\fP"
.br
.ti -1c
.RI "struct \fBrte_graph_feature_arc_mbuf_dynfields\fP"
.br
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBRTE_GRAPH_FEATURE_ARC_DYNFIELD_NAME\fP   '__rte_graph_feature_arc_mbuf_dynfield'"
.br
.ti -1c
.RI "#define \fBRTE_GRAPH_FEATURE_DATA_SIZE_LOG2\fP   3"
.br
.ti -1c
.RI "#define \fBRTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE\fP(arc)"
.br
.ti -1c
.RI "#define \fBRTE_GRAPH_FEATURE_TO_FEATURE_DATA\fP(arc,  feature,  index)"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "\fBtypedef\fP struct \fBrte_feature_arc_main\fP \fBrte_graph_feature_arc_main_t\fP"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_arc_mbuf_dynfields\fP * \fBrte_graph_feature_arc_mbuf_dynfields_get\fP (struct \fBrte_mbuf\fP *mbuf, const int dyn_offset)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP int \fBrte_graph_feature_is_valid\fP (\fBrte_graph_feature_t\fP feature)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP int \fBrte_graph_feature_data_is_valid\fP (\fBrte_graph_feature_data_t\fP feature_data)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_arc\fP * \fBrte_graph_feature_arc_get\fP (\fBrte_graph_feature_arc_t\fP arc)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_data\fP * \fB__rte_graph_feature_data_get\fP (struct \fBrte_graph_feature_arc\fP *arc, \fBrte_graph_feature_data_t\fP fdata)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP \fBrte_edge_t\fP \fB__rte_graph_feature_data_edge_get\fP (struct \fBrte_graph_feature_data\fP *fdata)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP uint16_t \fB__rte_graph_feature_data_app_cookie_get\fP (struct \fBrte_graph_feature_data\fP *fdata)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP \fBrte_graph_feature_data_t\fP \fB__rte_graph_feature_data_next_feature_get\fP (struct \fBrte_graph_feature_data\fP *fdata)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP uint16_t \fBrte_graph_feature_data_app_cookie_get\fP (struct \fBrte_graph_feature_arc\fP *arc, \fBrte_graph_feature_data_t\fP fdata)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP int \fBrte_graph_feature_data_next_feature_get\fP (struct \fBrte_graph_feature_arc\fP *arc, \fBrte_graph_feature_data_t\fP *fdata, \fBrte_edge_t\fP *next_edge)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_data\fP * \fBrte_graph_feature_data_get\fP (struct \fBrte_graph_feature_arc\fP *arc, \fBrte_graph_feature_data_t\fP fdata)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP int \fBrte_graph_feature_data_first_feature_get\fP (struct \fBrte_graph_feature_arc\fP *arc, uint32_t index, \fBrte_graph_feature_data_t\fP *fdata, \fBrte_edge_t\fP *edge)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP uint64_t \fBrte_graph_feature_arc_is_any_feature_enabled\fP (struct \fBrte_graph_feature_arc\fP *arc)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP void \fBrte_graph_feature_arc_prefetch\fP (struct \fBrte_graph_feature_arc\fP *arc)"
.br
.ti -1c
.RI "static __rte_experimental \fB__rte_always_inline\fP void \fBrte_graph_feature_arc_feature_data_prefetch\fP (struct \fBrte_graph_feature_arc\fP *arc, \fBrte_graph_feature_data_t\fP fdata)"
.br
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "\fBrte_graph_feature_arc_main_t\fP * \fB__rte_graph_feature_arc_main\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 

.PP
\fBWarning\fP
.RS 4
\fBEXPERIMENTAL:\fP All functions in this file may be changed or removed without prior notice\&.
.RE
.PP
Fast path Graph feature arc API 
.PP
Definition in file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SH "Macro Definition Documentation"
.PP 
.SS "#define RTE_GRAPH_FEATURE_ARC_DYNFIELD_NAME   '__rte_graph_feature_arc_mbuf_dynfield'"
Name of dynamic mbuf field offset registered in \fBrte_graph_feature_arc_init()\fP 
.PP
Definition at line \fB262\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2   3"
log2(sizeof (struct rte_graph_feature_data)) 
.PP
Definition at line \fB265\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE( arc)"
\fBValue:\fP
.nf
    (arc\->feature_size >> RTE_GRAPH_FEATURE_DATA_SIZE_LOG2)
.PP
.fi
Number of struct \fBrte_graph_feature_data\fP per feature 
.PP
Definition at line \fB268\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "#define RTE_GRAPH_FEATURE_TO_FEATURE_DATA( arc,  feature,  index)"
\fBValue:\fP
.nf
        ((rte_graph_feature_data_t)                 \\
         ((RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc) * (feature)) + (index)))
.PP
.fi
Get \fBrte_graph_feature_data_t\fP from \fBrte_graph_feature_t\fP 
.PP
Definition at line \fB272\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SH "Typedef Documentation"
.PP 
.SS "\fBtypedef\fP struct \fBrte_feature_arc_main\fP \fBrte_graph_feature_arc_main_t\fP"
Feature arc main object

.PP
Holds all feature arcs created by application 
.SH "Function Documentation"
.PP 
.SS "__rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_arc_mbuf_dynfields\fP * rte_graph_feature_arc_mbuf_dynfields_get (struct \fBrte_mbuf\fP * mbuf, const int dyn_offset)\fR [static]\fP"
Get dynfield offset to feature arc specific fields in mbuf

.PP
Feature arc mbuf dynamic field is separate to utilize mbuf->dynfield2 instead of dynfield1

.PP
This arc specific dynamic offset is registered as part of \fBrte_graph_feature_arc_init()\fP and copied in each arc for fast path access\&. This avoids node maintaining dynamic offset for feature arc and if we are lucky, field would be allocated from mbuf->dynfield2\&. Otherwise each node has to maintain at least two dynamic offset in fast path

.PP
\fBParameters\fP
.RS 4
\fImbuf\fP Pointer to mbuf 
.br
\fIdyn_offset\fP Retrieved from arc->mbuf_dyn_offset
.RE
.PP
\fBReturns\fP
.RS 4
NULL: On Failure Non-NULL pointer on Success 
.RE
.PP

.PP
Definition at line \fB307\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP int rte_graph_feature_is_valid (\fBrte_graph_feature_t\fP feature)\fR [static]\fP"
API to know if feature is valid or not

.PP
\fBParameters\fP
.RS 4
\fIfeature\fP \fBrte_graph_feature_t\fP
.RE
.PP
\fBReturns\fP
.RS 4
1: If feature is valid 0: If feature is invalid 
.RE
.PP

.PP
Definition at line \fB326\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP int rte_graph_feature_data_is_valid (\fBrte_graph_feature_data_t\fP feature_data)\fR [static]\fP"
API to know if feature data is valid or not

.PP
\fBParameters\fP
.RS 4
\fIfeature_data\fP \fBrte_graph_feature_data_t\fP
.RE
.PP
\fBReturns\fP
.RS 4
1: If feature data is valid 0: If feature data is invalid 
.RE
.PP

.PP
Definition at line \fB343\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_arc\fP * rte_graph_feature_arc_get (\fBrte_graph_feature_arc_t\fP arc)\fR [static]\fP"
Get pointer to feature arc object from \fBrte_graph_feature_arc_t\fP

.PP
\fBParameters\fP
.RS 4
\fIarc\fP feature arc
.RE
.PP
\fBReturns\fP
.RS 4
NULL: On Failure Non-NULL pointer on Success 
.RE
.PP

.PP
Definition at line \fB360\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_data\fP * __rte_graph_feature_data_get (struct \fBrte_graph_feature_arc\fP * arc, \fBrte_graph_feature_data_t\fP fdata)\fR [static]\fP"
Get \fBrte_graph_feature_t\fP from feature arc object without any checks

.PP
\fBParameters\fP
.RS 4
\fIarc\fP feature arc 
.br
\fIfdata\fP feature data object
.RE
.PP
\fBReturns\fP
.RS 4
Pointer to feature data object 
.RE
.PP

.PP
Definition at line \fB387\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP \fBrte_edge_t\fP __rte_graph_feature_data_edge_get (struct \fBrte_graph_feature_data\fP * fdata)\fR [static]\fP"
Get next edge from feature data pointer, without any check

.PP
\fBParameters\fP
.RS 4
\fIfdata\fP feature data object
.RE
.PP
\fBReturns\fP
.RS 4
next edge 
.RE
.PP

.PP
Definition at line \fB405\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP uint16_t __rte_graph_feature_data_app_cookie_get (struct \fBrte_graph_feature_data\fP * fdata)\fR [static]\fP"
Get app_cookie from feature data pointer, without any check

.PP
\fBParameters\fP
.RS 4
\fIfdata\fP feature data object
.RE
.PP
\fBReturns\fP
.RS 4
app_cookie set by caller in \fBrte_graph_feature_enable()\fP API 
.RE
.PP

.PP
Definition at line \fB421\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP \fBrte_graph_feature_data_t\fP __rte_graph_feature_data_next_feature_get (struct \fBrte_graph_feature_data\fP * fdata)\fR [static]\fP"
Get next_enabled_feature_data from pointer to feature data, without any check

.PP
\fBParameters\fP
.RS 4
\fIfdata\fP feature data object
.RE
.PP
\fBReturns\fP
.RS 4
next enabled feature data from this feature data 
.RE
.PP

.PP
Definition at line \fB437\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP uint16_t rte_graph_feature_data_app_cookie_get (struct \fBrte_graph_feature_arc\fP * arc, \fBrte_graph_feature_data_t\fP fdata)\fR [static]\fP"
Get app_cookie from feature data object with checks

.PP
\fBParameters\fP
.RS 4
\fIarc\fP feature arc 
.br
\fIfdata\fP feature data object
.RE
.PP
\fBReturns\fP
.RS 4
app_cookie set by caller in \fBrte_graph_feature_enable()\fP API 
.RE
.PP

.PP
Definition at line \fB456\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP int rte_graph_feature_data_next_feature_get (struct \fBrte_graph_feature_arc\fP * arc, \fBrte_graph_feature_data_t\fP * fdata, \fBrte_edge_t\fP * next_edge)\fR [static]\fP"
Get next_enabled_feature_data from current feature data object with checks

.PP
\fBParameters\fP
.RS 4
\fIarc\fP feature arc 
.br
\fIfdata\fP Pointer to feature data object 
.br
\fInext_edge\fP next_edge from current feature to next enabled feature
.RE
.PP
\fBReturns\fP
.RS 4
1: if next feature enabled on index 0: if no feature is enabled on index 
.RE
.PP

.PP
Definition at line \fB483\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP struct \fBrte_graph_feature_data\fP * rte_graph_feature_data_get (struct \fBrte_graph_feature_arc\fP * arc, \fBrte_graph_feature_data_t\fP fdata)\fR [static]\fP"
Get struct \fBrte_graph_feature_data\fP from rte_graph_feature_dat_t

.PP
\fBParameters\fP
.RS 4
\fIarc\fP feature arc 
.br
\fIfdata\fP feature data object
.RE
.PP
\fBReturns\fP
.RS 4
NULL: On Failure Non-NULL pointer on Success 
.RE
.PP

.PP
Definition at line \fB511\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP int rte_graph_feature_data_first_feature_get (struct \fBrte_graph_feature_arc\fP * arc, uint32_t index, \fBrte_graph_feature_data_t\fP * fdata, \fBrte_edge_t\fP * edge)\fR [static]\fP"
Get feature data corresponding to first enabled feature on index 
.PP
\fBParameters\fP
.RS 4
\fIarc\fP feature arc 
.br
\fIindex\fP Interface index 
.br
\fIfdata\fP feature data object 
.br
\fIedge\fP rte_edge object
.RE
.PP
\fBReturns\fP
.RS 4
1: if any feature enabled on index, return corresponding valid feature data 0: if no feature is enabled on index 
.RE
.PP

.PP
Definition at line \fB539\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP uint64_t rte_graph_feature_arc_is_any_feature_enabled (struct \fBrte_graph_feature_arc\fP * arc)\fR [static]\fP"
Fast path API to check if any feature enabled on a feature arc Typically from arc->start_node process function

.PP
\fBParameters\fP
.RS 4
\fIarc\fP Feature arc object
.RE
.PP
\fBReturns\fP
.RS 4
0: If no feature enabled Non-Zero: Bitmask of features enabled\&. 
.RE
.PP

.PP
Definition at line \fB580\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP void rte_graph_feature_arc_prefetch (struct \fBrte_graph_feature_arc\fP * arc)\fR [static]\fP"
Prefetch feature arc fast path cache line

.PP
\fBParameters\fP
.RS 4
\fIarc\fP RTE_GRAPH feature arc object 
.RE
.PP

.PP
Definition at line \fB597\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SS "__rte_experimental \fB__rte_always_inline\fP void rte_graph_feature_arc_feature_data_prefetch (struct \fBrte_graph_feature_arc\fP * arc, \fBrte_graph_feature_data_t\fP fdata)\fR [static]\fP"
Prefetch feature data related fast path cache line

.PP
\fBParameters\fP
.RS 4
\fIarc\fP RTE_GRAPH feature arc object 
.br
\fIfdata\fP Pointer to feature data object 
.RE
.PP

.PP
Definition at line \fB612\fP of file \fBrte_graph_feature_arc_worker\&.h\fP\&.
.SH "Variable Documentation"
.PP 
.SS "\fBrte_graph_feature_arc_main_t\fP* __rte_graph_feature_arc_main\fR [extern]\fP"
extern variables 
.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
