hash: fix multi-process support
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 1 Apr 2016 15:03:49 +0000 (16:03 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 1 Apr 2016 16:56:27 +0000 (18:56 +0200)
commitf9bd3342114a9db436f71b12ac424aff224482cb
treef0d78f76d52648fc396dd4400f7f1d5ebe5b958b
parentdbf17d44f3756af1d12eab59f79fdda315b5e062
hash: fix multi-process support

Hash library used a function pointer to choose a different
key compare function, depending on the key size.
As a result, multiple processes could not use the same hash table,
as the function addresses vary from one process to another.

Instead, a jump table is used, so each process has its own
function addresses, accessing this table with an index stored
in the hash table (note that using a custom key compare function
is not supported in multi-process mode).

Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
doc/guides/prog_guide/hash_lib.rst
doc/guides/rel_notes/release_16_04.rst
lib/librte_hash/rte_cuckoo_hash.c