* Get an index of a free tbl8 from the pool */
| 172 | * Get an index of a free tbl8 from the pool |
| 173 | */ |
| 174 | static inline uint32_t |
| 175 | tbl8_get(struct rte_lpm6 *lpm, uint32_t *tbl8_ind) |
| 176 | { |
| 177 | if (lpm->tbl8_pool_pos == lpm->number_tbl8s) |
| 178 | /* no more free tbl8 */ |
| 179 | return -ENOSPC; |
| 180 | |
| 181 | /* next index */ |
| 182 | *tbl8_ind = lpm->tbl8_pool[lpm->tbl8_pool_pos++]; |
| 183 | return 0; |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | * Put an index of a free tbl8 back to the pool |