1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2020 Marvell International Ltd.
5 #ifndef _RTE_GRAPH_PRIVATE_H_
6 #define _RTE_GRAPH_PRIVATE_H_
11 #include <rte_common.h>
14 #include "rte_graph.h"
19 * Structure that holds node internal data.
22 STAILQ_ENTRY(node) next; /**< Next node in the list. */
23 char name[RTE_NODE_NAMESIZE]; /**< Name of the node. */
24 uint64_t flags; /**< Node configuration flag. */
25 rte_node_process_t process; /**< Node process function. */
26 rte_node_init_t init; /**< Node init function. */
27 rte_node_fini_t fini; /**< Node fini function. */
28 rte_node_t id; /**< Allocated identifier for the node. */
29 rte_node_t parent_id; /**< Parent node identifier. */
30 rte_edge_t nb_edges; /**< Number of edges from this node. */
31 char next_nodes[][RTE_NODE_NAMESIZE]; /**< Names of next nodes. */
35 STAILQ_HEAD(node_head, node);
40 * Get the head of the node list.
43 * Pointer to the node head.
45 struct node_head *node_list_head_get(void);
50 * Get node pointer from node name.
53 * Pointer to character string containing the node name.
56 * Pointer to the node.
58 struct node *node_from_name(const char *name);
64 * Take a lock on the graph internal spin lock.
66 void graph_spinlock_lock(void);
71 * Release a lock on the graph internal spin lock.
73 void graph_spinlock_unlock(void);
75 #endif /* _RTE_GRAPH_PRIVATE_H_ */