hash: fix key store element alignment
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Fri, 26 Oct 2018 05:37:31 +0000 (00:37 -0500)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 26 Oct 2018 10:45:40 +0000 (12:45 +0200)
commitdbdbc4a2e9c4b67247ef2f6556debe7522b5d2e4
tree75acd2183b146163d1762812ae3da9640c7bb777
parent9d033dac7d7cacca9559e0381f99b4c730e80979
hash: fix key store element alignment

Fix the key store array element alignment such that every array
element is aligned on KEY_ALIGNMENT boundary. This is required to
make 'pdata' in 'struct rte_hash_key' align on its natural boundary
for atomic load/store.

Fixes: 473d1bebce43 ("hash: allow to store data in hash table")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_hash/rte_cuckoo_hash.h