hash: fix key slot size accuracy
authorYipeng Wang <yipeng1.wang@intel.com>
Tue, 10 Jul 2018 16:59:56 +0000 (09:59 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Jul 2018 21:03:26 +0000 (23:03 +0200)
commit575a48c961f47f1078bd1ceacf8484fb1038f7f8
tree290c8e33b5c5a2692a4192e3d09e2c23380f5aa4
parenteb067d431d9411a0054bc3ec084b0e9eadbb0a16
hash: fix key slot size accuracy

This commit calculates the needed key slot size more
accurately. The previous local cache fix requires
the free slot ring to be larger than actually needed.
The calculation of the value is inaccurate.

Fixes: 5915699153d7 ("hash: fix scaling by reducing contention")
Cc: stable@dpdk.org
Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_hash/rte_cuckoo_hash.c