| 261 | } |
| 262 | |
| 263 | static struct rte_graph * |
| 264 | graph_mem_fixup_node_ctx(struct rte_graph *graph) |
| 265 | { |
| 266 | struct rte_node *node; |
| 267 | struct node *node_db; |
| 268 | rte_graph_off_t off; |
| 269 | rte_node_t count; |
| 270 | const char *name; |
| 271 | |
| 272 | rte_graph_foreach_node(count, off, graph, node) { |
| 273 | if (node->parent_id == RTE_NODE_ID_INVALID) /* Static node */ |
| 274 | name = node->name; |
| 275 | else /* Cloned node */ |
| 276 | name = node->parent; |
| 277 | |
| 278 | node_db = node_from_name(name); |
| 279 | if (node_db == NULL) |
| 280 | SET_ERR_JMP(ENOLINK, fail, "Node %s not found", name); |
| 281 | |
| 282 | if (graph->pcap_enable) { |
| 283 | node->process = graph_pcap_dispatch; |
| 284 | node->original_process = node_db->process; |
| 285 | } else |
| 286 | node->process = node_db->process; |
| 287 | } |
| 288 | |
| 289 | return graph; |
| 290 | fail: |
| 291 | return NULL; |
| 292 | } |
| 293 | |
| 294 | static struct rte_graph * |
| 295 | graph_mem_fixup_secondary(struct rte_graph *graph) |
no test coverage detected