From bf7a24b997dc1f7516f38a38a8ce3c364d64aff4 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Sat, 15 Jun 2019 08:42:19 +0200 Subject: [PATCH] test/hash: fix off-by-one check on core count This subtest wants to start rwc_core_cnt[n] reader threads, while the master core is waiting for them to report. Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole Acked-by: Yipeng Wang --- app/test/test_hash_readwrite_lf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index 343a338b4e..f9f233a730 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf.c @@ -939,7 +939,7 @@ test_hash_add_ks_lookup_hit_sp(struct rwc_perf *rwc_perf_results, int rwc_lf, } for (n = 0; n < NUM_TEST; n++) { unsigned int tot_lcore = rte_lcore_count(); - if (tot_lcore < rwc_core_cnt[n]) + if (tot_lcore < rwc_core_cnt[n] + 1) goto finish; printf("\nNumber of readers: %u\n", rwc_core_cnt[n]); -- 2.20.1