Lines Matching defs:graph
15 graph_fp_mem_calc_size(struct graph *graph)
24 sz += sizeof(rte_graph_off_t) * graph->src_node_count;
26 val = rte_align32pow2(graph->node_count * sizeof(rte_graph_off_t));
28 graph->cir_start = sz;
29 graph->cir_mask = rte_align32pow2(graph->node_count) - 1;
34 graph->nodes_start = sz;
36 STAILQ_FOREACH(graph_node, &graph->node_list, next) {
43 graph->xstats_start = sz;
45 STAILQ_FOREACH(graph_node, &graph->node_list, next) {
52 graph->mem_sz = sz;
57 graph_header_popluate(struct graph *_graph)
59 struct rte_graph *graph = _graph->graph;
61 graph->tail = 0;
62 graph->head = (int32_t)-_graph->src_node_count;
63 graph->cir_mask = _graph->cir_mask;
64 graph->nb_nodes = _graph->node_count;
65 graph->cir_start = RTE_PTR_ADD(graph, _graph->cir_start);
66 graph->nodes_start = _graph->nodes_start;
67 graph->socket = _graph->socket;
68 graph->id = _graph->id;
69 memcpy(graph->name, _graph->name, RTE_GRAPH_NAMESIZE);
70 graph->fence = RTE_GRAPH_FENCE;
74 graph_nodes_populate(struct graph *_graph)
78 struct rte_graph *graph = _graph->graph;
85 struct rte_node *node = RTE_PTR_ADD(graph, off);
121 __rte_node_stream_alloc(graph, node);
126 graph_node_id_to_ptr(const struct rte_graph *graph, rte_node_t id)
132 rte_graph_foreach_node(count, off, graph, node)
140 graph_node_name_to_ptr(const struct rte_graph *graph, const char *name)
146 rte_graph_foreach_node(count, off, graph, node)
154 graph_node_nexts_populate(struct graph *_graph)
159 const struct rte_graph *graph = _graph->graph;
162 rte_graph_foreach_node(count, off, graph, node) {
165 node->nodes[val] = graph_node_name_to_ptr(graph, name);
177 graph_src_nodes_offset_populate(struct graph *_graph)
179 struct rte_graph *graph = _graph->graph;
188 node = graph_node_name_to_ptr(graph, name);
192 __rte_node_stream_alloc(graph, node);
193 graph->cir_start[head--] = node->off;
203 graph_fp_mem_populate(struct graph *graph)
207 graph_header_popluate(graph);
209 graph_pcap_init(graph);
210 graph_nodes_populate(graph);
211 rc = graph_node_nexts_populate(graph);
212 rc |= graph_src_nodes_offset_populate(graph);
218 graph_fp_mem_create(struct graph *graph)
223 sz = graph_fp_mem_calc_size(graph);
224 mz = rte_memzone_reserve(graph->name, sz, graph->socket, 0);
227 graph->name);
229 graph->graph = mz->addr;
230 graph->mz = mz;
232 return graph_fp_mem_populate(graph);
238 graph_nodes_mem_destroy(struct rte_graph *graph)
244 if (graph == NULL)
247 rte_graph_foreach_node(count, off, graph, node)
252 graph_fp_mem_destroy(struct graph *graph)
255 graph_pcap_exit(graph->graph);
257 graph_nodes_mem_destroy(graph->graph);
258 return rte_memzone_free(graph->mz);