test/rcu: make global variable per core
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Thu, 16 May 2019 01:14:17 +0000 (20:14 -0500)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 5 Jun 2019 12:14:55 +0000 (14:14 +0200)
commit752fc771e594a808e7840d78c877c6865a9ef960
treed601da6e9805bfe68d0ad48400d209893d64df9e
parent74ea082f96b8392e1df9adb9c69a3d36efe98c07
test/rcu: make global variable per core

Each hash entry has a pointer to one uint32 memory location.
However, all the readers increment the same location causing
race conditions. Allocate memory for each thread so that each
thread will increment its own memory location.

Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Tested-by: David Marchand <david.marchand@redhat.com>
app/test/test_rcu_qsbr.c
app/test/test_rcu_qsbr_perf.c