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

Function rte_graph_destroy

dpdk/lib/graph/graph.c:486–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484}
485
486int
487rte_graph_destroy(rte_graph_t id)
488{
489 struct graph *graph, *tmp;
490 int rc = -ENOENT;
491
492 graph_spinlock_lock();
493
494 graph = STAILQ_FIRST(&graph_list);
495 while (graph != NULL) {
496 tmp = STAILQ_NEXT(graph, next);
497 if (graph->id == id) {
498 /* Destroy the schedule work queue if has */
499 if (rte_graph_worker_model_get(graph->graph) ==
500 RTE_GRAPH_MODEL_MCORE_DISPATCH)
501 graph_sched_wq_destroy(graph);
502
503 /* Call fini() of the all the nodes in the graph */
504 graph_node_fini(graph);
505 /* Destroy graph fast path memory */
506 rc = graph_fp_mem_destroy(graph);
507 if (rc)
508 SET_ERR_JMP(rc, done, "Graph %s destroy failed",
509 graph->name);
510
511 graph_cleanup(graph);
512 STAILQ_REMOVE(&graph_list, graph, graph, next);
513 free(graph);
514 goto done;
515 }
516 graph = tmp;
517 }
518done:
519 graph_spinlock_unlock();
520 return rc;
521}
522
523static rte_graph_t
524graph_clone(struct graph *parent_graph, const char *name, struct rte_graph_param *prm)

Callers 8

graph_finiFunction · 0.85
test_graph_cloneFunction · 0.85
test_graph_id_collisionsFunction · 0.85
graph_teardownFunction · 0.85
mainFunction · 0.85

Calls 8

graph_spinlock_lockFunction · 0.85
graph_sched_wq_destroyFunction · 0.85
graph_node_finiFunction · 0.85
graph_fp_mem_destroyFunction · 0.85
graph_cleanupFunction · 0.85
graph_spinlock_unlockFunction · 0.85
freeFunction · 0.50