hash: fix free slot check
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 4 Oct 2016 07:16:34 +0000 (08:16 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 4 Oct 2016 09:40:40 +0000 (11:40 +0200)
commit5230bc4c77cae884eda5ac392887339108a2b763
tree739d3430d62629fcd77df502d22ed637c92a0a7d
parentfaaf69adb93e9a286e2506c448857c2dc2b7f225
hash: fix free slot check

In function rte_hash_cuckoo_insert_mw_tm, while looking for
an empty slot, only the first entry in the bucket was being checked,
as key_idx array was not being iterated.

Fixes: 5fc74c2e146d ("hash: check if slot is empty with key index")

Reported-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_hash/rte_cuckoo_hash_x86.h