| 263 | } |
| 264 | |
| 265 | static inline rte_node_t |
| 266 | graph_node_get(const char *pname, char *nname) |
| 267 | { |
| 268 | rte_node_t pnode_id = rte_node_from_name(pname); |
| 269 | char lookup_name[RTE_NODE_NAMESIZE]; |
| 270 | rte_node_t node_id; |
| 271 | |
| 272 | snprintf(lookup_name, RTE_NODE_NAMESIZE, "%s-%s", pname, nname); |
| 273 | node_id = rte_node_from_name(lookup_name); |
| 274 | |
| 275 | if (node_id != RTE_NODE_ID_INVALID) { |
| 276 | if (rte_node_edge_count(node_id)) |
| 277 | rte_node_edge_shrink(node_id, 0); |
| 278 | return node_id; |
| 279 | } |
| 280 | |
| 281 | return rte_node_clone(pnode_id, nname); |
| 282 | } |
| 283 | |
| 284 | static uint16_t |
| 285 | graph_node_count_edges(uint32_t stage, uint16_t node, uint16_t nodes_per_stage, |
no test coverage detected