diff options
author | Damjan Marion <damarion@cisco.com> | 2020-04-15 20:37:54 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-04-15 19:34:11 +0000 |
commit | 8daeea9a5dc2c68c8e54fe7bdae98cec7072a9cd (patch) | |
tree | e768bc215dba740efc86120ac2ffc003a7e2bfbf /src/vppinfra/cuckoo_template.h | |
parent | 88bcba80d5328fa2b3191fab4ffdd396d69937f1 (diff) |
vppinfra: don't use memcmp to compare keys in cuckoo
Type: improvement
Change-Id: I7e11bf72be5fad5967724c038eb649a261294ca0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/cuckoo_template.h')
-rw-r--r-- | src/vppinfra/cuckoo_template.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/vppinfra/cuckoo_template.h b/src/vppinfra/cuckoo_template.h index d48079a9e6c..364c2919d96 100644 --- a/src/vppinfra/cuckoo_template.h +++ b/src/vppinfra/cuckoo_template.h @@ -383,11 +383,7 @@ always_inline int CV (clib_cuckoo_bucket_search) (CVT (clib_cuckoo_bucket) * break; } #endif - if ( -#if CLIB_CUCKOO_OPTIMIZE_CMP_REDUCED_HASH - reduced_hash == b->reduced_hashes[i] && -#endif - 0 == memcmp (&kvp->key, &b->elts[i].key, sizeof (kvp->key))) + if (CV (clib_cuckoo_key_compare) (kvp->key, b->elts[i].key)) { kvp->value = b->elts[i].value; clib_cuckoo_bucket_aux_t bucket_aux2 = b->aux; |