summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/bihash_12_4.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/bihash_12_4.h')
-rw-r--r--src/vppinfra/bihash_12_4.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vppinfra/bihash_12_4.h b/src/vppinfra/bihash_12_4.h
index fe050e15924..3fdf1847861 100644
--- a/src/vppinfra/bihash_12_4.h
+++ b/src/vppinfra/bihash_12_4.h
@@ -36,11 +36,16 @@ typedef union
u64 as_u64[2];
} clib_bihash_kv_12_4_t;
+static inline void
+clib_bihash_mark_free_12_4 (clib_bihash_kv_12_4_t *v)
+{
+ v->value = 0xFEEDFACE;
+}
+
static inline int
clib_bihash_is_free_12_4 (const clib_bihash_kv_12_4_t *v)
{
- /* Free values are clib_memset to 0xff, check a bit... */
- if (v->as_u64[0] == ~0ULL && v->value == ~0)
+ if (v->value == 0xFEEDFACE)
return 1;
return 0;
}