diff options
Diffstat (limited to 'src/vppinfra/bihash_32_8.h')
-rw-r--r-- | src/vppinfra/bihash_32_8.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vppinfra/bihash_32_8.h b/src/vppinfra/bihash_32_8.h index 52a18352d71..8139a0eab62 100644 --- a/src/vppinfra/bihash_32_8.h +++ b/src/vppinfra/bihash_32_8.h @@ -43,11 +43,16 @@ typedef struct u64 value; } clib_bihash_kv_32_8_t; +static inline void +clib_bihash_mark_free_32_8 (clib_bihash_kv_32_8_t *v) +{ + v->value = 0xFEEDFACE8BADF00DULL; +} + static inline int clib_bihash_is_free_32_8 (const clib_bihash_kv_32_8_t *v) { - /* Free values are clib_memset to 0xff, check a bit... */ - if (v->key[0] == ~0ULL && v->value == ~0ULL) + if (v->value == 0xFEEDFACE8BADF00DULL) return 1; return 0; } |