diff options
Diffstat (limited to 'src/plugins/cnat/cnat_bihash.h')
-rw-r--r-- | src/plugins/cnat/cnat_bihash.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/cnat/cnat_bihash.h b/src/plugins/cnat/cnat_bihash.h index c488e61a07d..75099f6bfdb 100644 --- a/src/plugins/cnat/cnat_bihash.h +++ b/src/plugins/cnat/cnat_bihash.h @@ -44,11 +44,16 @@ typedef struct u64 value[7]; } clib_bihash_kv_40_56_t; +static inline void +clib_bihash_mark_free_40_56 (clib_bihash_kv_40_56_t *v) +{ + v->value[0] = 0xFEEDFACE8BADF00DULL; +} + static inline int clib_bihash_is_free_40_56 (const clib_bihash_kv_40_56_t *v) { - /* Free values are clib_memset to 0xff, check a bit... */ - if (v->key[0] == ~0ULL && v->value[0] == ~0ULL) + if (v->value[0] == 0xFEEDFACE8BADF00DULL) return 1; return 0; } |