hash: use partial-key hashing
authorYipeng Wang <yipeng1.wang@intel.com>
Mon, 22 Oct 2018 18:39:48 +0000 (11:39 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 25 Oct 2018 23:04:33 +0000 (01:04 +0200)
commitc7d93df552c2687d5941eab647a5e198b502d28e
tree3cd91901a1add219ef0c8ae71e8a78d4f98833ce
parent6f4d0c79072a98282f566ff550f2639479dbc484
hash: use partial-key hashing

This commit changes the hashing mechanism to "partial-key
hashing" to calculate bucket index and signature of key.

This is  proposed in Bin Fan, et al's paper
"MemC3: Compact and Concurrent MemCache with Dumber Caching
and Smarter Hashing". Basically the idea is to use "xor" to
derive alternative bucket from current bucket index and
signature.

With "partial-key hashing", it reduces the bucket memory
requirement from two cache lines to one cache line, which
improves the memory efficiency and thus the lookup speed.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
doc/guides/rel_notes/release_18_11.rst
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_hash/rte_cuckoo_hash.h
lib/librte_hash/rte_hash.h