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

Function rte_fib_free

dpdk/lib/fib/rte_fib.c:280–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void
281rte_fib_free(struct rte_fib *fib)
282{
283 struct rte_tailq_entry *te;
284 struct rte_fib_list *fib_list;
285
286 if (fib == NULL)
287 return;
288
289 fib_list = RTE_TAILQ_CAST(rte_fib_tailq.head, rte_fib_list);
290
291 rte_mcfg_tailq_write_lock();
292
293 /* find our tailq entry */
294 TAILQ_FOREACH(te, fib_list, next) {
295 if (te->data == (void *)fib)
296 break;
297 }
298 if (te != NULL)
299 TAILQ_REMOVE(fib_list, te, next);
300
301 rte_mcfg_tailq_write_unlock();
302
303 free_dataplane(fib);
304 rte_rib_free(fib->rib);
305 rte_free(fib);
306 rte_free(te);
307}
308
309void *
310rte_fib_get_dp(struct rte_fib *fib)

Callers 5

test_multiple_createFunction · 0.85
test_free_nullFunction · 0.85
test_add_del_invalidFunction · 0.85
test_lookupFunction · 0.85
test_fib_perfFunction · 0.85

Calls 5

rte_rib_freeFunction · 0.85
rte_freeFunction · 0.85
free_dataplaneFunction · 0.70

Tested by 5

test_multiple_createFunction · 0.68
test_free_nullFunction · 0.68
test_add_del_invalidFunction · 0.68
test_lookupFunction · 0.68
test_fib_perfFunction · 0.68