5 #ifndef _RTE_GRAPH_MODEL_MCORE_DISPATCH_H_ 6 #define _RTE_GRAPH_MODEL_MCORE_DISPATCH_H_ 26 #define RTE_GRAPH_SCHED_WQ_SIZE_MULTIPLIER 8 27 #define RTE_GRAPH_SCHED_WQ_SIZE(nb_nodes) \ 28 ((typeof(nb_nodes))((nb_nodes) * RTE_GRAPH_SCHED_WQ_SIZE_MULTIPLIER)) 47 bool __rte_noinline __rte_graph_mcore_dispatch_sched_node_enqueue(
struct rte_node *node,
48 struct rte_graph_rq_head *rq);
62 void __rte_graph_mcore_dispatch_sched_wq_process(
struct rte_graph *graph);
77 unsigned int lcore_id);
93 uint32_t head = graph->head;
94 struct rte_node *node;
96 if (graph->dispatch.wq != NULL)
97 __rte_graph_mcore_dispatch_sched_wq_process(graph);
99 while (
likely(head != graph->tail)) {
100 node = (
struct rte_node *)
RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
103 if ((int32_t)head < 1 && node->dispatch.lcore_id != graph->dispatch.lcore_id)
107 if (node->dispatch.lcore_id != RTE_MAX_LCORE &&
108 graph->dispatch.lcore_id != node->dispatch.lcore_id &&
109 graph->dispatch.rq != NULL &&
110 __rte_graph_mcore_dispatch_sched_node_enqueue(node, graph->dispatch.rq))
113 __rte_node_process(graph, node);
115 head =
likely((int32_t)head > 0) ? head & mask : head;
#define RTE_PTR_ADD(ptr, x)
static void rte_graph_walk_mcore_dispatch(struct rte_graph *graph)
int rte_graph_model_mcore_dispatch_node_lcore_affinity_set(const char *name, unsigned int lcore_id)