| 153 | } |
| 154 | |
| 155 | static int |
| 156 | tbl8_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 | |
| 172 | static void |
| 173 | tbl8_recycle(struct rte_trie_tbl *dp, void *par, uint64_t tbl8_idx) |
no test coverage detected