aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/bihash_8_16.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/bihash_8_16.h')
-rw-r--r--src/vppinfra/bihash_8_16.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vppinfra/bihash_8_16.h b/src/vppinfra/bihash_8_16.h
index b42b32c33d2..36ddda7149b 100644
--- a/src/vppinfra/bihash_8_16.h
+++ b/src/vppinfra/bihash_8_16.h
@@ -44,13 +44,19 @@ typedef struct
u64 value[2]; /**< the value */
} clib_bihash_kv_8_16_t;
+static inline void
+clib_bihash_mark_free_8_16 (clib_bihash_kv_8_16_t *v)
+{
+ v->value[0] = 0xFEEDFACE8BADF00DULL;
+}
+
/** Decide if a clib_bihash_kv_8_16_t instance is free
@param v- pointer to the (key,value) pair
*/
static inline int
clib_bihash_is_free_8_16 (clib_bihash_kv_8_16_t * v)
{
- if (v->key == ~0ULL && v->value[0] == ~0ULL && v->value[1] == ~0ULL)
+ if (v->value[0] == 0xFEEDFACE8BADF00DULL)
return 1;
return 0;
}
@@ -80,8 +86,7 @@ format_bihash_kvp_8_16 (u8 * s, va_list * args)
clib_bihash_kv_8_16_t *v = va_arg (*args, clib_bihash_kv_8_16_t *);
s =
- format (s, "key %llu value [%ll,%llx]u", v->key, v->value[0],
- v->value[1]);
+ format (s, "key %llx value [%llx,%llx]", v->key, v->value[0], v->value[1]);
return s;
}