patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] test/hash: use existing lcore API
@ 2019-05-15  7:56 David Marchand
  2019-05-15 12:14 ` [dpdk-stable] [dpdk-dev] " Maxime Coquelin
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: David Marchand @ 2019-05-15  7:56 UTC (permalink / raw)
  To: dev
  Cc: thomas, stephen, stable, Yipeng Wang, Sameh Gobriel,
	Bruce Richardson, Pablo de Lara

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

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>
---
 app/test/test_hash_readwrite_lf.c | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c
index 4ab4c8e..cd0e7ae 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf.c
@@ -738,10 +738,9 @@ struct {
 				rte_eal_remote_launch(test_rwc_reader,
 						(void *)(uintptr_t)read_type,
 							enabled_core_ids[i]);
-			rte_eal_mp_wait_lcore();
 
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (lcore_config[i].ret < 0)
+				if (rte_eal_wait_lcore(i) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -758,6 +757,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
@@ -808,12 +808,11 @@ struct {
 							enabled_core_ids[i]);
 			ret = write_keys(write_type);
 			writer_done = 1;
-			rte_eal_mp_wait_lcore();
 
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (lcore_config[i].ret < 0)
+				if (rte_eal_wait_lcore(i) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -830,6 +829,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
@@ -884,12 +884,11 @@ struct {
 			write_type = WRITE_KEY_SHIFT;
 			ret = write_keys(write_type);
 			writer_done = 1;
-			rte_eal_mp_wait_lcore();
 
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (lcore_config[i].ret < 0)
+				if (rte_eal_wait_lcore(i) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -906,6 +905,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
@@ -960,12 +960,11 @@ struct {
 			write_type = WRITE_KEY_SHIFT;
 			ret = write_keys(write_type);
 			writer_done = 1;
-			rte_eal_mp_wait_lcore();
 
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (lcore_config[i].ret < 0)
+				if (rte_eal_wait_lcore(i) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -982,6 +981,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
@@ -1035,12 +1035,11 @@ struct {
 			write_type = WRITE_KEY_SHIFT;
 			ret = write_keys(write_type);
 			writer_done = 1;
-			rte_eal_mp_wait_lcore();
 
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (lcore_config[i].ret < 0)
+				if (rte_eal_wait_lcore(i) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -1056,6 +1055,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
@@ -1138,10 +1138,8 @@ struct {
 						(multi_writer_done[i] == 0);
 				writer_done = 1;
 
-				rte_eal_mp_wait_lcore();
-
 				for (i = 1; i <= rwc_core_cnt[n]; i++)
-					if (lcore_config[i].ret < 0)
+					if (rte_eal_wait_lcore(i) < 0)
 						goto err;
 
 				unsigned long long cycles_per_lookup =
@@ -1160,6 +1158,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
@@ -1222,10 +1221,9 @@ struct {
 				}
 			}
 			writer_done = 1;
-			rte_eal_mp_wait_lcore();
 
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (lcore_config[i].ret < 0)
+				if (rte_eal_wait_lcore(i) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -1242,6 +1240,7 @@ struct {
 	return 0;
 
 err:
+	rte_eal_mp_wait_lcore();
 	rte_hash_free(tbl_rwc_test_param.h);
 	return -1;
 }
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-05-29 22:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15  7:56 [dpdk-stable] [PATCH 1/2] test/hash: use existing lcore API David Marchand
2019-05-15 12:14 ` [dpdk-stable] [dpdk-dev] " Maxime Coquelin
2019-05-22  0:16 ` [dpdk-stable] " Wang, Yipeng1
2019-05-22 12:40   ` David Marchand
2019-05-22 15:06 ` [dpdk-stable] [PATCH v2 " David Marchand
2019-05-22 15:06   ` [dpdk-stable] [PATCH v2 2/2] test/rcu: " David Marchand
2019-05-23 14:20     ` Maxime Coquelin
2019-05-29 22:41       ` Thomas Monjalon
2019-05-22 16:26   ` [dpdk-stable] [PATCH v2 1/2] test/hash: " Dharmik Thakkar
2019-05-22 17:17     ` David Marchand
2019-05-22 19:37       ` Dharmik Thakkar
2019-05-27 10:15         ` David Marchand
2019-05-28 14:15           ` Dharmik Thakkar
2019-05-23 12:48   ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).