18 #ifndef included_l2fib_h 19 #define included_l2fib_h 27 #define L2FIB_NUM_BUCKETS (64 * 1024) 28 #define L2FIB_MEMORY_SIZE (256<<20) 76 temp_a = key->
words.w0;
77 temp_b = key->
words.w1;
89 #if CLIB_ARCH_IS_LITTLE_ENDIAN 92 temp = *((
u64 *)(mac_address - 2));
93 temp = (temp & ~0xffff) | (
u64)(bd_index);
97 temp = *((
u64 *)(mac_address)) >> 16;
98 temp = temp | (((
u64)bd_index) << 48);
131 if (key0->
raw == cached_key->
raw) {
133 result0->
raw = cached_result->
raw;
136 BVT(clib_bihash_kv) kv;
141 result0->
raw = kv.value;
144 cached_key->
raw = key0->
raw;
145 cached_result->
raw = result0->
raw;
179 if ((key0->
raw == cached_key->
raw) &&
180 (key1->
raw == cached_key->
raw)) {
182 result0->
raw = cached_result->
raw;
183 result1->
raw = cached_result->
raw;
188 BVT(clib_bihash_kv) kv0, kv1;
200 result0->
raw = kv0.value;
201 result1->
raw = kv1.value;
204 cached_key->
raw = key1->
raw;
205 cached_result->
raw = result1->
raw;
210 BVT(clib_bihash) *get_mac_table(
void);
#define static_always_inline
struct l2fib_entry_key_t::@124::@127 words
void l2fib_add_entry(u64 mac, u32 bd_index, u32 sw_if_index, u32 static_mac, u32 drop_mac, u32 bvi_mac)
BVT(clib_bihash)*get_mac_table(void)
always_inline u64 l2fib_make_key(u8 *mac_address, u16 bd_index)
#define L2FIB_NUM_BUCKETS
u32 l2fib_del_entry(u64 mac, u32 bd_index)
#define hash_mix32(a0, b0, c0)
static_always_inline void l2fib_lookup_2(BVT(clib_bihash)*mac_table, l2fib_entry_key_t *cached_key, l2fib_entry_result_t *cached_result, u8 *mac0, u8 *mac1, u16 bd_index0, u16 bd_index1, l2fib_entry_key_t *key0, l2fib_entry_key_t *key1, u32 *bucket0, u32 *bucket1, l2fib_entry_result_t *result0, l2fib_entry_result_t *result1)
void l2fib_clear_table(uint keep_static)
void l2fib_table_dump(u32 bd_index, l2fib_entry_key_t **l2fe_key, l2fib_entry_result_t **l2fe_res)
u8 * format_vnet_sw_if_index_name_with_NA(u8 *s, va_list *args)
always_inline u32 l2fib_compute_hash_bucket(l2fib_entry_key_t *key)
static_always_inline void l2fib_lookup_1(BVT(clib_bihash)*mac_table, l2fib_entry_key_t *cached_key, l2fib_entry_result_t *cached_result, u8 *mac0, u16 bd_index0, l2fib_entry_key_t *key0, u32 *bucket0, l2fib_entry_result_t *result0)
static int BV() clib_bihash_search_inline(BVT(clib_bihash)*h, BVT(clib_bihash_kv)*kvp)