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)
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>

No differences found