| 75 | } |
| 76 | |
| 77 | static int |
| 78 | test_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 */ |
| 104 | static uint16_t |
nothing calls this directly
no test coverage detected