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

Function graph_node_get

dpdk/app/test/test_graph_perf.c:265–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static inline rte_node_t
266graph_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
284static uint16_t
285graph_node_count_edges(uint32_t stage, uint16_t node, uint16_t nodes_per_stage,

Callers 1

graph_initFunction · 0.85

Calls 5

rte_node_from_nameFunction · 0.85
snprintfFunction · 0.85
rte_node_edge_countFunction · 0.85
rte_node_edge_shrinkFunction · 0.85
rte_node_cloneFunction · 0.85

Tested by

no test coverage detected