hash: support read/write concurrency
authorYipeng Wang <yipeng1.wang@intel.com>
Tue, 10 Jul 2018 16:59:58 +0000 (09:59 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Jul 2018 21:03:50 +0000 (23:03 +0200)
commitf2e3001b53ec107cf0ff26a89dd1b1bd29d51038
tree5f3ace9468e42067ec156ab9f5eaf036cd223bca
parent406da3dfb3b54bc022d3aac6206814512c81c0bf
hash: support read/write concurrency

The existing implementation of librte_hash does not support read-write
concurrency. This commit implements read-write safety using rte_rwlock
and rte_rwlock TM version if hardware transactional memory is available.

Both multi-writer and read-write concurrency is protected by rte_rwlock
now. The x86 specific header file is removed since the x86 specific RTM
function is not called directly by rte hash now.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_hash/meson.build
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_hash/rte_cuckoo_hash.h
lib/librte_hash/rte_cuckoo_hash_x86.h [deleted file]
lib/librte_hash/rte_hash.h