} clib_bihash_kv_24_8_t;
static inline int
-clib_bihash_is_free_24_8 (clib_bihash_kv_24_8_t * v)
+clib_bihash_is_free_24_8 (const clib_bihash_kv_24_8_t * v)
{
/* Free values are memset to 0xff, check a bit... */
if (v->key[0] == ~0ULL && v->value == ~0ULL)
}
static inline u64
-clib_bihash_hash_24_8 (clib_bihash_kv_24_8_t * v)
+clib_bihash_hash_24_8 (const clib_bihash_kv_24_8_t * v)
{
- u32 *dp = (u32 *) & v->key[0];
+ const u32 *dp = (const u32 *) &v->key[0];
u32 value = 0;
value = crc_u32 (dp[0], value);
}
#else
static inline u64
-clib_bihash_hash_24_8 (clib_bihash_kv_24_8_t * v)
+clib_bihash_hash_24_8 (const clib_bihash_kv_24_8_t * v)
{
u64 tmp = v->key[0] ^ v->key[1] ^ v->key[2];
return clib_xxhash (tmp);
}
static inline int
-clib_bihash_key_compare_24_8 (u64 * a, u64 * b)
+clib_bihash_key_compare_24_8 (const u64 * a, const u64 * b)
{
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0;
}