test/hash: use existing lcore API
authorDavid Marchand <david.marchand@redhat.com>
Wed, 22 May 2019 15:06:56 +0000 (17:06 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 29 May 2019 22:36:53 +0000 (00:36 +0200)
commitdfd9d5537e876676014827cdaf24da3718a25bc7
tree52d1f20f4e19bbb342a64255aee99b38fccdcca9
parent4df7d46bbdba4f390816476fa62f21668f87b995
test/hash: use existing lcore API

Prefer the existing apis rather than direct access the configuration
structure.

test_hash_multi_add_lookup() currently starts n readers and N writers
using rte_eal_remote_launch().
It then waits for the N writers to complete with a custom
multi_writer_done[] array to synchronise over.
Jump on the occasion to use rte_eal_wait_lcore() so that the code is
more straightforward:
- we start n readers with rte_eal_remote_launch(),
- we start N writers with rte_eal_remote_launch(),
- we wait for N writers to join with rte_eal_wait_lcore(),
- we wait for n readers to join with rte_eal_wait_lcore(),

Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
app/test/test_hash_readwrite_lf.c