| 227 | |
| 228 | #define BYTE_SIZE 8 |
| 229 | static inline uint32_t |
| 230 | get_idx(const uint8_t *ip, uint32_t prev_idx, int bytes, int first_byte) |
| 231 | { |
| 232 | int i; |
| 233 | uint32_t idx = 0; |
| 234 | uint8_t bitshift; |
| 235 | |
| 236 | for (i = first_byte; i < (first_byte + bytes); i++) { |
| 237 | bitshift = (int8_t)(((first_byte + bytes - 1) - i)*BYTE_SIZE); |
| 238 | idx |= ip[i] << bitshift; |
| 239 | } |
| 240 | return (prev_idx * TRIE_TBL8_GRP_NUM_ENT) + idx; |
| 241 | } |
| 242 | |
| 243 | static inline uint64_t |
| 244 | get_val_by_p(void *p, uint8_t nh_sz) |
no outgoing calls
no test coverage detected