[PATCH v4 0/4] Cuckoo hash optimization for small sizes

Stephen Hemminger stephen at networkplumber.org
Tue Sep 16 17:00:43 CEST 2025


Recent discussion around handling small keys motivated furthur
examination of the compare logic.

v4 - add test for more sizes, and a few more special case sizes.

Stephen Hemminger (4):
  hash: move table of hash compare functions out of header
  hash: use static_assert
  hash: reduce architecture special cases
  hash: add support for common small key sizes

 app/test/test_hash.c       |   7 +-
 lib/hash/rte_cmp_arm64.h   |  56 +-------
 lib/hash/rte_cmp_generic.h |  35 +++++
 lib/hash/rte_cmp_x86.h     |  60 +--------
 lib/hash/rte_cuckoo_hash.c | 256 +++++++++++++++++++++++++++++++++++--
 lib/hash/rte_cuckoo_hash.h |  84 +-----------
 6 files changed, 295 insertions(+), 203 deletions(-)
 create mode 100644 lib/hash/rte_cmp_generic.h

-- 
2.47.3



More information about the dev mailing list