MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_node_ctx_init

Function test_node_ctx_init

dpdk/app/test/test_graph_perf.c:77–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static int
78test_node_ctx_init(const struct rte_graph *graph, struct rte_node *node)
79{
80 struct test_graph_perf *graph_data;
81 struct test_node_data *node_data;
82 const struct rte_memzone *mz;
83 rte_node_t nid = node->id;
84 rte_edge_t edge = 0;
85 int i;
86
87 RTE_SET_USED(graph);
88
89 mz = rte_memzone_lookup(TEST_GRAPH_PERF_MZ);
90 if (mz == NULL)
91 return -ENOMEM;
92 graph_data = mz->addr;
93 node_data = graph_get_node_data(graph_data, nid);
94 node->ctx[0] = node->nb_edges;
95 for (i = 0; i < node->nb_edges && !node_data->is_sink; i++, edge++) {
96 node->ctx[i + 1] = edge;
97 node->ctx[i + 9] = node_data->next_percentage[i];
98 }
99
100 return 0;
101}
102
103/* Source node function */
104static uint16_t

Callers

nothing calls this directly

Calls 2

rte_memzone_lookupFunction · 0.85
graph_get_node_dataFunction · 0.85

Tested by

no test coverage detected