| rte_graph.h(3) | Library Functions Manual | rte_graph.h(3) |
rte_graph.h
#include <stdbool.h>
#include <stdio.h>
#include <rte_common.h>
struct rte_graph_param
struct rte_graph_cluster_stats_param
struct rte_graph_cluster_node_stats
struct rte_node_xstats
struct rte_node_register
#define RTE_GRAPH_NAMESIZE 64
#define RTE_NODE_NAMESIZE 64
#define RTE_NODE_XSTAT_DESC_SIZE 64
#define RTE_GRAPH_PCAP_FILE_SZ 64
#define RTE_GRAPH_OFF_INVALID UINT32_MAX
#define RTE_NODE_ID_INVALID UINT32_MAX
#define RTE_EDGE_ID_INVALID UINT16_MAX
#define RTE_GRAPH_ID_INVALID UINT16_MAX
#define RTE_GRAPH_FENCE 0xdeadbeef12345678ULL
#define rte_graph_foreach_node(count, off, graph, node)
#define RTE_NODE_SOURCE_F (1ULL << 0)
#define RTE_NODE_REGISTER(node)
typedef uint32_t rte_graph_off_t
typedef uint32_t rte_node_t
typedef uint16_t rte_edge_t
typedef uint16_t rte_graph_t
typedef uint16_t(* rte_node_process_t) (struct rte_graph *graph,
struct rte_node *node, void **objs, uint16_t nb_objs)
typedef int(* rte_node_init_t) (const struct rte_graph *graph,
struct rte_node *node)
typedef void(* rte_node_fini_t) (const struct rte_graph *graph,
struct rte_node *node)
typedef int(* rte_graph_cluster_stats_cb_t) (bool is_first, bool
is_last, void *cookie, const struct rte_graph_cluster_node_stats
*stats)
rte_graph_t rte_graph_create (const char *name,
struct rte_graph_param *prm)
int rte_graph_destroy (rte_graph_t id)
rte_graph_t rte_graph_clone (rte_graph_t id, const char
*name, struct rte_graph_param *prm)
rte_graph_t rte_graph_from_name (const char *name)
char * rte_graph_id_to_name (rte_graph_t id)
int rte_graph_export (const char *name, FILE *f)
int rte_graph_model_mcore_dispatch_core_bind (rte_graph_t id,
int lcore)
void rte_graph_model_mcore_dispatch_core_unbind (rte_graph_t id)
struct rte_graph * rte_graph_lookup (const char *name)
rte_graph_t rte_graph_max_count (void)
void rte_graph_dump (FILE *f, rte_graph_t id)
void rte_graph_list_dump (FILE *f)
void rte_graph_obj_dump (FILE *f, struct rte_graph *graph, bool all)
struct rte_node * rte_graph_node_get (rte_graph_t graph_id,
rte_node_t node_id)
struct rte_node * rte_graph_node_get_by_name (const char *graph, const
char *name)
struct rte_graph_cluster_stats * rte_graph_cluster_stats_create (const
struct rte_graph_cluster_stats_param *prm)
void rte_graph_cluster_stats_destroy (struct rte_graph_cluster_stats
*stat)
void rte_graph_cluster_stats_get (struct rte_graph_cluster_stats *stat,
bool skip_cb)
void rte_graph_cluster_stats_reset (struct rte_graph_cluster_stats
*stat)
rte_node_t __rte_node_register (const struct
rte_node_register *node)
rte_node_t rte_node_clone (rte_node_t id, const char
*name)
rte_node_t rte_node_from_name (const char *name)
char * rte_node_id_to_name (rte_node_t id)
rte_edge_t rte_node_edge_count (rte_node_t id)
rte_edge_t rte_node_edge_update (rte_node_t id,
rte_edge_t from, const char **next_nodes, uint16_t nb_edges)
rte_edge_t rte_node_edge_shrink (rte_node_t id,
rte_edge_t size)
rte_node_t rte_node_edge_get (rte_node_t id, char
*next_nodes[])
rte_node_t rte_node_max_count (void)
void rte_node_dump (FILE *f, rte_node_t id)
void rte_node_list_dump (FILE *f)
static __rte_always_inline int rte_node_is_invalid
(rte_node_t id)
static __rte_always_inline int rte_edge_is_invalid
(rte_edge_t id)
static __rte_always_inline int rte_graph_is_invalid
(rte_graph_t id)
static __rte_always_inline int rte_graph_has_stats_feature
(void)
Graph architecture abstracts the data processing functions as 'node' and 'link' them together to create a complex 'graph' to enable reusable/modular data processing functions.
This API enables graph framework operations such as create, lookup, dump and destroy on graph and node operations such as clone, edge update, and edge shrink, etc. The API also allows to create the stats cluster to monitor per graph and per node stats.
Definition in file rte_graph.h.
Max length of graph name.
Definition at line 30 of file rte_graph.h.
Max length of node name.
Definition at line 31 of file rte_graph.h.
Max length of node xstat description.
Definition at line 32 of file rte_graph.h.
Max length of pcap file name.
Definition at line 33 of file rte_graph.h.
Invalid graph offset.
Definition at line 34 of file rte_graph.h.
Invalid node id.
Definition at line 35 of file rte_graph.h.
Invalid edge id.
Definition at line 36 of file rte_graph.h.
Invalid graph id.
Definition at line 37 of file rte_graph.h.
Graph fence data.
Definition at line 38 of file rte_graph.h.
Value:.PP
for (count = 0, off = graph->nodes_start, \
node = RTE_PTR_ADD(graph, off); \
count < graph->nb_nodes; \
off = node->next, node = RTE_PTR_ADD(graph, off), count++)
Macro to browse rte_node object after the graph creation
Definition at line 395 of file rte_graph.h.
Node type is source.
Definition at line 485 of file rte_graph.h.
Value:.PP
RTE_INIT(rte_node_register_##node) \
{ \
node.parent_id = RTE_NODE_ID_INVALID; \
node.id = __rte_node_register(&node); \
}
Register a static node.
The static node is registered through the constructor scheme, thereby, it can be used in a multi-process scenario.
Parameters
Definition at line 520 of file rte_graph.h.
Graph offset type.
Definition at line 40 of file rte_graph.h.
Node id type.
Definition at line 41 of file rte_graph.h.
Edge id type.
Definition at line 42 of file rte_graph.h.
Graph id type.
Definition at line 43 of file rte_graph.h.
Node stats within cluster of graphs Node process function.
The function invoked when the worker thread walks on nodes using rte_graph_walk().
Parameters
Returns
See also
Definition at line 94 of file rte_graph.h.
Node initialization function.
The function invoked when the user creates the graph using rte_graph_create()
Parameters
Returns
See also
Definition at line 114 of file rte_graph.h.
Node finalization function.
The function invoked when the user destroys the graph using rte_graph_destroy().
Parameters
See also
Definition at line 130 of file rte_graph.h.
Graph cluster stats callback.
Parameters
Returns
Definition at line 149 of file rte_graph.h.
Create Graph.
Create memory reel, detect loops and find isolated nodes.
Parameters
Returns
Destroy Graph.
Free Graph memory reel.
Parameters
Returns
Clone Graph.
Clone a graph from static graph (graph created from rte_graph_create()). And all cloned graphs attached to the parent graph MUST be destroyed together for fast schedule design limitation (stop ALL graph walk firstly).
Parameters
Returns
Get graph id from graph name.
Parameters
Returns
Get graph name from graph id.
Parameters
Returns
Export the graph as graph viz dot file
Parameters
Returns
Bind graph with specific lcore for mcore dispatch model.
Parameters
Returns
Unbind graph with lcore for mcore dispatch model
Parameters
Get graph object from its name.
Typical usage of this API to get graph objects in the worker thread and followed calling rte_graph_walk() in a loop.
Parameters
Returns
See also
Get maximum number of graph available.
Returns
Dump the graph information to file.
Parameters
Dump all graphs information to file
Parameters
Dump graph information along with node info to file
Parameters
Get node object with in graph from id.
Parameters
Returns
Get node pointer with in graph from name.
Parameters
Returns
Create graph stats cluster to aggregate runtime node stats.
Parameters
Returns
Destroy cluster stats.
Parameters
Get stats to application.
Parameters
Reset cluster stats to zero.
Parameters
Register new packet processing node. Nodes can be registered dynamically via this call or statically via the RTE_NODE_REGISTER macro.
Parameters
Returns
See also
Clone a node from static node(node created from RTE_NODE_REGISTER).
Parameters
Returns
Get node id from node name.
Parameters
Returns
Get node name from node id.
Parameters
Returns
Get the number of edges(next-nodes) for a node from node id.
Parameters
Returns
Update the edges for a node from node id.
Parameters
Returns
Shrink the edges to a given size.
Parameters
Returns
Get the edge names from a given node.
Parameters
Returns
Get maximum nodes available.
Returns
Dump node info to file.
Parameters
Dump all node info to file.
Parameters
Test the validity of node id.
Parameters
Returns
Definition at line 659 of file rte_graph.h.
Test the validity of edge id.
Parameters
Returns
Definition at line 674 of file rte_graph.h.
Test the validity of graph id.
Parameters
Returns
Definition at line 689 of file rte_graph.h.
Test stats feature support.
Returns
Definition at line 701 of file rte_graph.h.
Generated automatically by Doxygen for DPDK from the source code.
| Version 24.11.3 | DPDK |