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

Function recycle_root_path

dpdk/lib/fib/trie.c:265–282  ·  view source on GitHub ↗

* recursively recycle tbl8's */

Source from the content-addressed store, hash-verified

263 * recursively recycle tbl8's
264 */
265static void
266recycle_root_path(struct rte_trie_tbl *dp, const uint8_t *ip_part,
267 uint8_t common_tbl8, void *prev)
268{
269 void *p;
270 uint64_t val;
271
272 val = get_val_by_p(prev, dp->nh_sz);
273 if (unlikely((val & TRIE_EXT_ENT) != TRIE_EXT_ENT))
274 return;
275
276 if (common_tbl8 != 0) {
277 p = get_tbl_p_by_idx(dp->tbl8, (val >> 1) *
278 TRIE_TBL8_GRP_NUM_ENT + *ip_part, dp->nh_sz);
279 recycle_root_path(dp, ip_part + 1, common_tbl8 - 1, p);
280 }
281 tbl8_recycle(dp, prev, val >> 1);
282}
283
284static inline int
285build_common_root(struct rte_trie_tbl *dp, const uint8_t *ip,

Callers 1

install_to_dpFunction · 0.85

Calls 3

get_val_by_pFunction · 0.85
get_tbl_p_by_idxFunction · 0.85
tbl8_recycleFunction · 0.70

Tested by

no test coverage detected