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

Function tbl8_alloc

dpdk/lib/fib/trie.c:155–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155static int
156tbl8_alloc(struct rte_trie_tbl *dp, uint64_t nh)
157{
158 int64_t tbl8_idx;
159 uint8_t *tbl8_ptr;
160
161 tbl8_idx = tbl8_get(dp);
162 if (tbl8_idx < 0)
163 return tbl8_idx;
164 tbl8_ptr = get_tbl_p_by_idx(dp->tbl8,
165 tbl8_idx * TRIE_TBL8_GRP_NUM_ENT, dp->nh_sz);
166 /*Init tbl8 entries with nexthop from tbl24*/
167 write_to_dp((void *)tbl8_ptr, nh, dp->nh_sz,
168 TRIE_TBL8_GRP_NUM_ENT);
169 return tbl8_idx;
170}
171
172static void
173tbl8_recycle(struct rte_trie_tbl *dp, void *par, uint64_t tbl8_idx)

Callers 2

build_common_rootFunction · 0.70
write_edgeFunction · 0.70

Calls 3

get_tbl_p_by_idxFunction · 0.85
write_to_dpFunction · 0.85
tbl8_getFunction · 0.70

Tested by

no test coverage detected