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

Function rte_node_edge_shrink

dpdk/lib/graph/node.c:267–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267rte_edge_t
268rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
269{
270 rte_edge_t rc = RTE_EDGE_ID_INVALID;
271 struct node *node;
272
273 NODE_ID_CHECK(id);
274 graph_spinlock_lock();
275
276 STAILQ_FOREACH(node, &node_list, next) {
277 if (node->id == id) {
278 if (node->nb_edges < size) {
279 rte_errno = E2BIG;
280 } else {
281 node->nb_edges = size;
282 rc = size;
283 }
284 break;
285 }
286 }
287
288 graph_spinlock_unlock();
289fail:
290 return rc;
291}
292
293rte_edge_t
294rte_node_edge_update(rte_node_t id, rte_edge_t from, const char **next_nodes,

Callers 2

graph_node_getFunction · 0.85
test_update_edgesFunction · 0.85

Calls 2

graph_spinlock_lockFunction · 0.85
graph_spinlock_unlockFunction · 0.85

Tested by 2

graph_node_getFunction · 0.68
test_update_edgesFunction · 0.68