vppinfra: don't use memcmp to compare keys in cuckoo
Type: improvement
Change-Id: I7e11bf72be5fad5967724c038eb649a261294ca0
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vppinfra/cuckoo_template.h b/src/vppinfra/cuckoo_template.h
index d48079a..364c291 100644
--- a/src/vppinfra/cuckoo_template.h
+++ b/src/vppinfra/cuckoo_template.h
@@ -383,11 +383,7 @@
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;