23 BVT(clib_bihash_kv) kv, value;
27 for (i = 0; i < len; i++)
32 ASSERT(dst_address_length >= 0 && dst_address_length <= 32);
53 BVT(clib_bihash_kv) kv, value;
57 for (i = 0; i < len; i++)
62 ASSERT(dst_address_length >= 0 && dst_address_length <= 128);
121 int dst_address_length = 32 - i;
122 vec_add1 (db->ip4_prefix_lengths_in_search_order, dst_address_length);
130 BVT(clib_bihash_kv) kv, value;
161 kv.key[0] = ((
u64) vni << 32) | key.
as_u32;
166 old_val = value.value;
186 int dst_address_length = 128 - i;
187 vec_add1 (db->ip6_prefix_lengths_in_search_order, dst_address_length);
195 BVT(clib_bihash_kv) kv, value;
223 kv.key[0] = key.
as_u64[0];
224 kv.key[1] = key.
as_u64[1];
225 kv.key[2] = (
u64) vni;
229 old_val = value.value;
321 for (j = 0; j < i0; j++)
#define IP6_LOOKUP_DEFAULT_HASH_NUM_BUCKETS
static void ip6_compute_prefix_lengths_in_search_order(gid_dictionary_t *db)
sll srl srl sll sra u16x4 i
#define gid_address_type(_a)
uword * ip6_non_empty_dst_address_length_bitmap
uword ip4_lookup_table_size
u32 ip6_lookup_table_nbuckets
static void ip4_lookup_init(gid_dictionary_t *db)
#define ip_prefix_len(_a)
u32 ip4_prefix_len_refcount[33]
#define IP4_LOOKUP_DEFAULT_HASH_NUM_BUCKETS
always_inline uword max_log2(uword x)
static void ip4_compute_prefix_lengths_in_search_order(gid_dictionary_t *db)
#define IP4_LOOKUP_DEFAULT_HASH_MEMORY_SIZE
int BV() clib_bihash_add_del(BVT(clib_bihash)*h, BVT(clib_bihash_kv)*add_v, int is_add)
#define ip_prefix_version(_a)
void gid_dictionary_init(gid_dictionary_t *db)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
static u32 add_del_ip4_key(gid_dictionary_t *db, u32 vni, ip_prefix_t *pref, u32 val, u8 is_add)
static void ip6_lookup_init(gid_dictionary_t *db)
static u32 ip_lookup(gid_dictionary_t *db, u32 vni, ip_prefix_t *key)
void BV() clib_bihash_init(BVT(clib_bihash)*h, char *name, u32 nbuckets, uword memory_size)
#define clib_warning(format, args...)
static u32 add_del_ip6_key(gid_dictionary_t *db, u32 vni, ip_prefix_t *pref, u32 val, u8 is_add)
int BV() clib_bihash_search(BVT(clib_bihash)*h, BVT(clib_bihash_kv)*search_key, BVT(clib_bihash_kv)*valuep)
u32 gid_dictionary_lookup(gid_dictionary_t *db, gid_address_t *key)
#define clib_bitmap_foreach(i, ai, body)
u32 gid_dictionary_add_del(gid_dictionary_t *db, gid_address_t *key, u32 value, u8 is_add)
u64 ip6_prefix_len_refcount[129]
always_inline uword * clib_bitmap_set(uword *ai, uword i, uword value)
#define gid_address_ippref(_a)
u8 * ip4_prefix_lengths_in_search_order
static u32 add_del_ip(gid_dictionary_t *db, u32 vni, ip_prefix_t *key, u32 value, u8 is_add)
#define clib_memcpy(a, b, c)
struct _gid_address_t gid_address_t
#define IP6_LOOKUP_DEFAULT_HASH_MEMORY_SIZE
static u32 ip6_lookup(gid_dictionary_t *db, u32 vni, ip_prefix_t *key)
ip4_address_t ip4_fib_masks[33]
u8 * ip6_prefix_lengths_in_search_order
ip6_address_t ip6_fib_masks[129]
static int BV() clib_bihash_search_inline_2(BVT(clib_bihash)*h, BVT(clib_bihash_kv)*search_key, BVT(clib_bihash_kv)*valuep)
#define gid_address_vni(_a)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
uword ip6_lookup_table_size
uword * ip4_non_empty_dst_address_length_bitmap
static u32 ip4_lookup(gid_dictionary_t *db, u32 vni, ip_prefix_t *key)
always_inline void ip6_address_mask(ip6_address_t *a, ip6_address_t *mask)
always_inline uword pow2_mask(uword x)
u32 ip4_lookup_table_nbuckets