|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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_BUCKETS(_bbs) \
51 (BIER_BBS_LEN_TO_BUCKETS(_bbs->bbs_len) / sizeof(int))
61 if (((
int*)
src->bbs_buckets)[
index] != 0) {
static void bier_bit_string_clear_string(const bier_bit_string_t *src, bier_bit_string_t *dest)
static void bier_bit_string_logical_and_string(const bier_bit_string_t *src, bier_bit_string_t *dest)
u32 bier_bp_t
A bit positon as assigned to egress PEs.
u16 bbs_len
The length of the string in BYTES.
static void bier_bit_string_init(bier_bit_string_t *bbs, bier_hdr_len_id_t len, bier_bit_mask_bucket_t *buckets)
void bier_bit_string_clear_bit(bier_bit_string_t *mask, bier_bp_t bp)
u8 bier_bit_mask_bucket_t
A bucket is a byte.
enum bier_hdr_len_id_t_ bier_hdr_len_id_t
bier_hdr_len_id_t enumerator
#define BIER_BBS_NUM_INT_BUCKETS(_bbs)
u8 * format_bier_bit_string(u8 *s, va_list *args)
bier_bit_mask_bucket_t * bbs_buckets
The buckets in the string.
static int bier_bit_string_is_zero(const bier_bit_string_t *src)
u32 bier_hdr_len_id_to_num_bytes(bier_hdr_len_id_t id)
A Variable length BitString.
static int bier_find_first_bit_string_set(int mask)
void bier_bit_string_set_bit(bier_bit_string_t *mask, bier_bp_t bp)