bitmask_alloc_idx
if (bitmask_alloc_idx(&ctl->nh_idx_head, &idx) != 0) {
int bitmask_alloc_idx(struct bitmask_head *bi, uint16_t *pidx);