hash: fix position returned in free slots
authorDharmik Thakkar <dharmik.thakkar@arm.com>
Thu, 9 May 2019 17:19:05 +0000 (17:19 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 9 May 2019 20:29:36 +0000 (22:29 +0200)
commit2bc731197b8afc0ea0a0796dd7cea43474a6e1f9
tree4c73e5bbf13e2f0947657789fad1aa2920abc0f4
parent2d119c3baac4409092d064d386deb33d8f61f90f
hash: fix position returned in free slots

Currently, in rte_hash_free_key_with_position(), the position returned
to the ring of free_slots leads to an unexpected conflict with a key
already in use.

This patch fixes incorrect position returned to the ring of free_slots.

Bugzilla ID: 261
Fixes: 9d033dac7d7c ("hash: support no free on delete")
Cc: stable@dpdk.org
Reported-by: Linfan <zhongdahulinfan@163.com>
Suggested-by: Linfan <zhongdahulinfan@163.com>
Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
lib/librte_hash/rte_cuckoo_hash.c