* recursively recycle tbl8's */
| 263 | * recursively recycle tbl8's |
| 264 | */ |
| 265 | static void |
| 266 | recycle_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 | |
| 284 | static inline int |
| 285 | build_common_root(struct rte_trie_tbl *dp, const uint8_t *ip, |
no test coverage detected