hash: fix multiwriter lock memory allocation
authorYipeng Wang <yipeng1.wang@intel.com>
Tue, 10 Jul 2018 16:59:54 +0000 (09:59 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 12 Jul 2018 21:03:14 +0000 (23:03 +0200)
commit27c813679ea961b94d3184c09e50a055ad726da3
tree773e4a3d1258bd607a85a09a8e2379b373ddd863
parent179c7e893f64195c5b1f12fddf34b1921386837a
hash: fix multiwriter lock memory allocation

When malloc for multiwriter_lock, the align should be
RTE_CACHE_LINE_SIZE rather than LCORE_CACHE_SIZE.

Also there should be check to verify the success of
rte_malloc.

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