X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fbihash_40_8.h;h=27207a3a69c1a8b3b83a83e0bfad3abf16095c3b;hb=7ec62fb0cd8c4d794d6f22ccc2fe8dae672a63a6;hp=f64784f0488ed71c13ab83f1af8f76f76ce4c681;hpb=495c320a7f06c9ddf2693a4ea9dcbce36e6829de;p=vpp.git diff --git a/src/vppinfra/bihash_40_8.h b/src/vppinfra/bihash_40_8.h index f64784f0488..27207a3a69c 100644 --- a/src/vppinfra/bihash_40_8.h +++ b/src/vppinfra/bihash_40_8.h @@ -44,11 +44,16 @@ typedef struct u64 value; } clib_bihash_kv_40_8_t; +static inline void +clib_bihash_mark_free_40_8 (clib_bihash_kv_40_8_t *v) +{ + v->value = 0xFEEDFACE8BADF00DULL; +} + static inline int clib_bihash_is_free_40_8 (const clib_bihash_kv_40_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; }