16 #ifndef __BIER_BIT_STRING_H__ 17 #define __BIER_BIT_STRING_H__ 24 #define BIER_BBS_LEN_TO_BUCKETS(_len) (_len) 25 #define BIER_BBS_LEN_TO_BITS(_len) (_len * 8) 26 #define BIER_BBS_LEN_TO_INTS(_len) ((_len) / sizeof(int)) 27 #define BIER_BIT_MASK_BITS_PER_INT (sizeof(int) * 8) 37 return (__builtin_ffs(clib_net_to_host_u32(mask)));
50 #define BIER_BBS_NUM_INT_BUKCETS(_bbs) \ 51 (BIER_BBS_LEN_TO_BUCKETS(_bbs->bbs_len) / sizeof(int))
static void bier_bit_string_clear_string(const bier_bit_string_t *src, bier_bit_string_t *dest)
u32 bier_hdr_len_id_to_num_bytes(bier_hdr_len_id_t id)
u16 bbs_len
The length of the string in BYTES.
static int bier_find_first_bit_string_set(int mask)
A Variable length BitString.
#define BIER_BBS_NUM_INT_BUKCETS(_bbs)
u32 bier_bp_t
A bit positon as assigned to egress PEs.
void bier_bit_string_set_bit(bier_bit_string_t *mask, bier_bp_t bp)
u8 * format_bier_bit_string(u8 *s, va_list *args)
enum bier_hdr_len_id_t_ bier_hdr_len_id_t
bier_hdr_len_id_t enumerator
static void bier_bit_string_init(bier_bit_string_t *bbs, bier_hdr_len_id_t len, bier_bit_mask_bucket_t *buckets)
bier_bit_mask_bucket_t * bbs_buckets
The buckets in the string.
void bier_bit_string_clear_bit(bier_bit_string_t *mask, bier_bp_t bp)
static void bier_bit_string_logical_and_string(const bier_bit_string_t *src, bier_bit_string_t *dest)
u8 bier_bit_mask_bucket_t
A bucket is a byte.
static int bier_bit_string_is_zero(const bier_bit_string_t *src)