5#ifndef _RTE_GRAPH_FEATURE_ARC_WORKER_H_
6#define _RTE_GRAPH_FEATURE_ARC_WORKER_H_
34struct rte_graph_feature_node_list {
36 STAILQ_ENTRY(rte_graph_feature_node_list) next_feature;
262#define RTE_GRAPH_FEATURE_ARC_DYNFIELD_NAME "__rte_graph_feature_arc_mbuf_dynfield"
265#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2 3
268#define RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc) \
269 (arc->feature_size >> RTE_GRAPH_FEATURE_DATA_SIZE_LOG2)
272#define RTE_GRAPH_FEATURE_TO_FEATURE_DATA(arc, feature, index) \
273 ((rte_graph_feature_data_t) \
274 ((RTE_GRAPH_FEATURE_DATA_NUM_PER_FEATURE(arc) * (feature)) + (index)))
279#define GRAPH_FEATURE_ARC_PTR_INITIALIZER ((uintptr_t)UINTPTR_MAX)
308 const int dyn_offset)
328 return (feature != RTE_GRAPH_FEATURE_INVALID);
345 return (
feature_data != RTE_GRAPH_FEATURE_DATA_INVALID);
362 uintptr_t fa = GRAPH_FEATURE_ARC_PTR_INITIALIZER;
367 if (
likely((fm != NULL) && (arc < fm->max_feature_arcs)))
370 return (fa == GRAPH_FEATURE_ARC_PTR_INITIALIZER) ?
407 return rte_atomic_load_explicit(&fdata->
next_edge, rte_memory_order_relaxed);
423 return rte_atomic_load_explicit(&fdata->
app_cookie, rte_memory_order_relaxed);
439 return rte_atomic_load_explicit(&fdata->
next_feature_data, rte_memory_order_relaxed);
464 return rte_atomic_load_explicit(&fdata_obj->
app_cookie, rte_memory_order_relaxed);
490 *fdata = rte_atomic_load_explicit(&fdptr->
next_feature_data, rte_memory_order_relaxed);
494 return ((*fdata) != RTE_GRAPH_FEATURE_DATA_INVALID);
514 if (fdata != RTE_GRAPH_FEATURE_DATA_INVALID)
550 if ((*fd) != RTE_GRAPH_FEATURE_DATA_INVALID) {
555 *edge = rte_atomic_load_explicit(&fdata_obj->
next_edge,
556 rte_memory_order_relaxed);
559 rte_memory_order_relaxed);
586 rte_memory_order_relaxed));
__extension__ typedef uint8_t RTE_MARKER8[0]
#define __rte_cache_aligned
#define __rte_always_inline
__extension__ typedef void * RTE_MARKER[0]
uint16_t(* rte_node_process_t)(struct rte_graph *graph, struct rte_node *node, void **objs, uint16_t nb_objs)
#define RTE_GRAPH_FEATURE_ARC_NAMELEN
uint32_t rte_graph_feature_data_t
uint16_t rte_graph_feature_arc_t
uint8_t rte_graph_feature_t
void(* rte_graph_feature_change_notifier_cb_t)(const char *arc_name, const char *feature_name, rte_node_t feature_node_id, uint32_t index, bool enable_disable, uint16_t app_cookie)
static __rte_experimental __rte_always_inline uint16_t __rte_graph_feature_data_app_cookie_get(struct rte_graph_feature_data *fdata)
#define RTE_GRAPH_FEATURE_DATA_SIZE_LOG2
static __rte_experimental __rte_always_inline int rte_graph_feature_is_valid(rte_graph_feature_t feature)
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 __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 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_is_valid(rte_graph_feature_data_t feature_data)
struct rte_feature_arc_main rte_graph_feature_arc_main_t
static __rte_experimental __rte_always_inline void rte_graph_feature_arc_prefetch(struct rte_graph_feature_arc *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 uint64_t rte_graph_feature_arc_is_any_feature_enabled(struct rte_graph_feature_arc *arc)
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 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_arc_mbuf_dynfields * rte_graph_feature_arc_mbuf_dynfields_get(struct rte_mbuf *mbuf, const int dyn_offset)
rte_graph_feature_arc_main_t * __rte_graph_feature_arc_main
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 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)
#define RTE_MBUF_DYNFIELD(m, offset, type)
static void rte_prefetch0(const volatile void *p)
uint32_t num_feature_arcs
uint32_t max_feature_arcs
rte_graph_feature_data_t feature_data
STAILQ_HEAD(, rte_graph_feature_node_list) all_features
struct rte_node_register * start_node
rte_graph_feature_arc_t feature_arc_index
uint16_t fp_first_feature_offset
uint32_t runtime_enabled_features
uint16_t num_added_features
uint64_t fp_feature_enable_bitmask
RTE_MARKER fast_path_variables
RTE_MARKER slow_path_variables
rte_node_process_t arc_start_process
uint16_t fp_feature_data_offset
uint64_t * feature_bit_mask_by_index
rte_graph_feature_data_t * feature_data_by_index
rte_graph_feature_data_t next_feature_data