hash: fix lock release on add
authorMike Stolarchuk <mike.stolarchuk@bigswitch.com>
Fri, 7 Jul 2017 05:54:25 +0000 (06:54 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 8 Jul 2017 17:00:22 +0000 (19:00 +0200)
commit61d04efc3825b5059ded38c3f23e8e8aaf4db943
tree9ef742769e78efcb36b51b4bc9c2ded02e0c7e73
parent60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc
hash: fix lock release on add

When adding items to a hash table with multiple threads,
there is an spinlock used to prevent data corruption
(unless Transactional Memory is supported).

If there is a failure, the spinlock should be released,
but there were cases where that was not happening.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org
Signed-off-by: Mike Stolarchuk <mike.stolarchuk@bigswitch.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_hash/rte_cuckoo_hash.c