patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 12:59   ` Aaron Conole
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 02/14] test/crypto: move tests to the driver specific list David Marchand
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index 83391ce..faf16ee 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -58,6 +58,7 @@ test_sources = files('commands.c',
 	'test_latencystats.c',
 	'test_link_bonding.c',
 	'test_link_bonding_mode4.c',
+	'test_link_bonding_rssconf.c',
 	'test_logs.c',
 	'test_lpm.c',
 	'test_lpm6.c',
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 02/14] test/crypto: move tests to the driver specific list
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 13:00   ` Aaron Conole
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 03/14] test/eventdev: " David Marchand
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

For consistency, put all specific crypto driver tests in the dedicated
list (in alphabetic order).

While at it:
- remove dead reference to cryptodev_sw_mrvl_autotest (renamed as
  cryptodev_sw_mvsam_autotest),
- call the crypto scheduler test only when built,

Fixes: 9eabcb682493 ("test: update autotest list")
Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/autotest_data.py |  4 ++--
 app/test/meson.build      | 28 +++++++++++++++-------------
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 0f2c9a7..6cf7eca 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -393,8 +393,8 @@
         "Report":  None,
     },
     {
-        "Name":    "Cryptodev sw mrvl autotest",
-        "Command": "cryptodev_sw_mrvl_autotest",
+        "Name":    "Cryptodev sw mvsam autotest",
+        "Command": "cryptodev_sw_mvsam_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
diff --git a/app/test/meson.build b/app/test/meson.build
index faf16ee..d428e02 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -196,10 +196,7 @@ fast_parallel_test_names = [
 # All test cases in fast_non_parallel_test_names list are non-parallel
 fast_non_parallel_test_names = [
         'bitratestats_autotest',
-        'cryptodev_sw_armv8_autotest',
         'crc_autotest',
-        'cryptodev_openssl_asym_autotest',
-        'cryptodev_sw_mvsam_autotest',
         'delay_us_sleep_autotest',
         'distributor_autotest',
         'eventdev_common_autotest',
@@ -255,21 +252,22 @@ perf_test_names = [
 
 # All test cases in driver_test_names list are non-parallel
 driver_test_names = [
-        'link_bonding_autotest',
-        'link_bonding_mode4_autotest',
-        'link_bonding_rssconf_autotest',
-        'cryptodev_sw_mrvl_autotest',
-        'cryptodev_dpaa2_sec_autotest',
-        'cryptodev_dpaa_sec_autotest',
-        'cryptodev_qat_autotest',
         'cryptodev_aesni_mb_autotest',
-        'cryptodev_openssl_autotest',
-        'cryptodev_scheduler_autotest',
         'cryptodev_aesni_gcm_autotest',
+        'cryptodev_dpaa_sec_autotest',
+        'cryptodev_dpaa2_sec_autotest',
         'cryptodev_null_autotest',
-        'cryptodev_sw_snow3g_autotest',
+        'cryptodev_openssl_autotest',
+        'cryptodev_openssl_asym_autotest',
+        'cryptodev_qat_autotest',
+        'cryptodev_sw_armv8_autotest',
         'cryptodev_sw_kasumi_autotest',
+        'cryptodev_sw_mvsam_autotest',
+        'cryptodev_sw_snow3g_autotest',
         'cryptodev_sw_zuc_autotest',
+        'link_bonding_autotest',
+        'link_bonding_mode4_autotest',
+        'link_bonding_rssconf_autotest',
 ]
 
 # All test cases in dump_test_names list are non-parallel
@@ -325,6 +323,10 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 	endif
 endif
 
+if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+	driver_test_names += 'cryptodev_scheduler_autotest'
+endif
+
 foreach d:test_deps
 	def_lib = get_option('default_library')
 	test_dep_objs += get_variable(def_lib + '_rte_' + d)
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 03/14] test/eventdev: move tests to the driver specific list
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS David Marchand
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 02/14] test/crypto: move tests to the driver specific list David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 13:04   ` Aaron Conole
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count David Marchand
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Same treatment than crypto tests, move the eventdev drivers tests in the
driver list.

While at it:
- eventdev_octeontx_autotest has been renamed as
  eventdev_selftest_octeontx,
- eventdev_sw_autotest has been renamed as
  eventdev_selftest_sw,

Fixes: 50fb749a3972 ("event/octeontx: move test to driver")
Fixes: 85fb515b7318 ("event/sw: move test to driver")
Fixes: 123d67c73b06 ("test/event: register selftests")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index d428e02..eb3df24 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -200,8 +200,6 @@ fast_non_parallel_test_names = [
         'delay_us_sleep_autotest',
         'distributor_autotest',
         'eventdev_common_autotest',
-        'eventdev_octeontx_autotest',
-        'eventdev_sw_autotest',
         'fbarray_autotest',
         'hash_readwrite_autotest',
         'hash_readwrite_lf_autotest',
@@ -237,7 +235,6 @@ perf_test_names = [
         'timer_racecond_autotest',
         'efd_autotest',
         'hash_functions_autotest',
-        'eventdev_selftest_sw',
         'member_perf_autotest',
         'efd_perf_autotest',
         'lpm6_perf_autotest',
@@ -265,6 +262,8 @@ driver_test_names = [
         'cryptodev_sw_mvsam_autotest',
         'cryptodev_sw_snow3g_autotest',
         'cryptodev_sw_zuc_autotest',
+        'eventdev_selftest_octeontx',
+        'eventdev_selftest_sw',
         'link_bonding_autotest',
         'link_bonding_mode4_autotest',
         'link_bonding_rssconf_autotest',
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
                   ` (2 preceding siblings ...)
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 03/14] test/eventdev: " David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 13:05   ` Aaron Conole
  2019-06-05 20:02   ` Wang, Yipeng1
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores David Marchand
                   ` (4 subsequent siblings)
  8 siblings, 2 replies; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev
  Cc: thomas, aconole, msantana, stable, Yipeng Wang, Sameh Gobriel,
	Bruce Richardson, Pablo de Lara

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 <david.marchand@redhat.com>
---
 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 343a338..f9f233a 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf.c
@@ -939,7 +939,7 @@ struct {
 		}
 		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]);
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
                   ` (3 preceding siblings ...)
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-05 20:02   ` Wang, Yipeng1
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest David Marchand
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev
  Cc: thomas, aconole, msantana, Dharmik Thakkar, stable, Yipeng Wang,
	Sameh Gobriel, Bruce Richardson, Pablo de Lara

From: Dharmik Thakkar <dharmik.thakkar@arm.com>

This patch rectifies slave_id to point to valid core indexes rather than
core ranks in read-write lock-free concurrency test.

It also replaces a 'for' loop with RTE_LCORE_FOREACH API.

Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_hash_readwrite_lf.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c
index f9f233a..5644361 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf.c
@@ -126,11 +126,9 @@ struct {
 	uint32_t i = 0;
 	uint16_t core_id;
 	uint32_t max_cores = rte_lcore_count();
-	for (core_id = 0; core_id < RTE_MAX_LCORE && i < max_cores; core_id++) {
-		if (rte_lcore_is_enabled(core_id)) {
-			enabled_core_ids[i] = core_id;
-			i++;
-		}
+	RTE_LCORE_FOREACH(core_id) {
+		enabled_core_ids[i] = core_id;
+		i++;
 	}
 
 	if (i != max_cores) {
@@ -738,7 +736,7 @@ struct {
 							enabled_core_ids[i]);
 
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -810,7 +808,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -886,7 +884,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -962,7 +960,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -1037,7 +1035,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -1132,12 +1130,12 @@ struct {
 				for (i = rwc_core_cnt[n] + 1;
 				     i <= rwc_core_cnt[m] + rwc_core_cnt[n];
 				     i++)
-					rte_eal_wait_lcore(i);
+					rte_eal_wait_lcore(enabled_core_ids[i]);
 
 				writer_done = 1;
 
 				for (i = 1; i <= rwc_core_cnt[n]; i++)
-					if (rte_eal_wait_lcore(i) < 0)
+					if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 						goto err;
 
 				unsigned long long cycles_per_lookup =
@@ -1221,7 +1219,7 @@ struct {
 			writer_done = 1;
 
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
                   ` (4 preceding siblings ...)
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 13:31   ` Aaron Conole
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 07/14] test/latencystats: fix stack smashing David Marchand
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Fixes: 3c518ca41ffa ("test/hash: remove hash scaling unit test")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index eb3df24..cd46289 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -203,7 +203,6 @@ fast_non_parallel_test_names = [
         'fbarray_autotest',
         'hash_readwrite_autotest',
         'hash_readwrite_lf_autotest',
-        'hash_scaling_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 07/14] test/latencystats: fix stack smashing
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
                   ` (5 preceding siblings ...)
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 13:38   ` Aaron Conole
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 08/14] test/stack: fix lock-free test name David Marchand
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable, Reshma Pattan

Caught in one Travis run:
 + ------------------------------------------------------- +
 + Test Suite : Latency Stats Unit Test Suite
 + ------------------------------------------------------- +
 + TestCase [ 0] : test_latency_init succeeded
 + TestCase [ 1] : test_latency_update succeeded
[snip]
 + TestCase [1601724781] : test_latencystats_get_names succeeded
[snip]
 + Tests Failed :      1601790830

htonl(1601724781) -> "m", "a", "x", "_"
htonl(1601790830) -> "n", "c", "y", "_"

Looks like someone went too far.

The test passes a bigger size than the array it passes along.

Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_latencystats.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c
index 039c508..8dd794b 100644
--- a/app/test/test_latencystats.c
+++ b/app/test/test_latencystats.c
@@ -69,13 +69,10 @@ static int test_latencystats_get_names(void)
 	int ret = 0, i = 0;
 	int size = 0;
 	struct rte_metric_name names[NUM_STATS];
-	struct rte_metric_name wrongnames[NUM_STATS - 2];
 
 	size_t m_size = sizeof(struct rte_metric_name);
 	for (i = 0; i < NUM_STATS; i++)
 		memset(&names[i], 0, m_size);
-	for (i = 0; i < NUM_STATS - 2; i++)
-		memset(&wrongnames[i], 0, m_size);
 
 	/* Success Test: Valid names and size */
 	size = NUM_STATS;
@@ -99,10 +96,6 @@ static int test_latencystats_get_names(void)
 	TEST_ASSERT((ret == NUM_STATS), "Test Failed to get the metrics count,"
 		    "Actual: %d Expected: %d", ret, NUM_STATS);
 
-	/* Failure Test: Invalid names (array size lesser than size) */
-	size = NUM_STATS + 1;
-	ret = rte_latencystats_get_names(wrongnames, size);
-	TEST_ASSERT((ret == NUM_STATS), "Test Failed to get metrics names");
 	return TEST_SUCCESS;
 }
 
@@ -112,13 +105,10 @@ static int test_latencystats_get(void)
 	int ret = 0, i = 0;
 	int size = 0;
 	struct rte_metric_value values[NUM_STATS];
-	struct rte_metric_value wrongvalues[NUM_STATS - 2];
 
 	size_t v_size = sizeof(struct rte_metric_value);
 	for (i = 0; i < NUM_STATS; i++)
 		memset(&values[i], 0, v_size);
-	for (i = 0; i < NUM_STATS - 2; i++)
-		memset(&wrongvalues[i], 0, v_size);
 
 	/* Success Test: Valid values and valid size */
 	size = NUM_STATS;
@@ -137,14 +127,6 @@ static int test_latencystats_get(void)
 	TEST_ASSERT((ret == NUM_STATS), "Test Failed to get the stats count,"
 		    "Actual: %d Expected: %d", ret, NUM_STATS);
 
-	/* Failure Test: Invalid values(array size lesser than size)
-	 * and invalid size
-	 */
-	size = NUM_STATS + 2;
-	ret = rte_latencystats_get(wrongvalues, size);
-	TEST_ASSERT(ret == NUM_STATS, "Test Failed to get latency metrics"
-			" values");
-
 	return TEST_SUCCESS;
 }
 
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 08/14] test/stack: fix lock-free test name
       [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
                   ` (6 preceding siblings ...)
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 07/14] test/latencystats: fix stack smashing David Marchand
@ 2019-06-04  8:59 ` David Marchand
  2019-06-04 13:06   ` Aaron Conole
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-04  8:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Fixes: 0420378bbfc4 ("test/stack: check lock-free implementation")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index cd46289..3c9706a 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -184,7 +184,7 @@ fast_parallel_test_names = [
         'sched_autotest',
         'spinlock_autotest',
         'stack_autotest',
-        'stack_nb_autotest',
+        'stack_lf_autotest',
         'string_autotest',
         'table_autotest',
         'tailq_autotest',
@@ -243,7 +243,7 @@ perf_test_names = [
         'ring_pmd_perf_autotest',
         'pmd_perf_autotest',
         'stack_perf_autotest',
-        'stack_nb_perf_autotest',
+        'stack_lf_perf_autotest',
 ]
 
 # All test cases in driver_test_names list are non-parallel
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS David Marchand
@ 2019-06-04 12:59   ` Aaron Conole
  0 siblings, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 12:59 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, aconole, msantana, stable

David Marchand <david.marchand@redhat.com> writes:

> Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 02/14] test/crypto: move tests to the driver specific list
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 02/14] test/crypto: move tests to the driver specific list David Marchand
@ 2019-06-04 13:00   ` Aaron Conole
  0 siblings, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 13:00 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, msantana, stable

David Marchand <david.marchand@redhat.com> writes:

> For consistency, put all specific crypto driver tests in the dedicated
> list (in alphabetic order).
>
> While at it:
> - remove dead reference to cryptodev_sw_mrvl_autotest (renamed as
>   cryptodev_sw_mvsam_autotest),
> - call the crypto scheduler test only when built,
>
> Fixes: 9eabcb682493 ("test: update autotest list")
> Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 03/14] test/eventdev: move tests to the driver specific list
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 03/14] test/eventdev: " David Marchand
@ 2019-06-04 13:04   ` Aaron Conole
  0 siblings, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 13:04 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, msantana, stable

David Marchand <david.marchand@redhat.com> writes:

> Same treatment than crypto tests, move the eventdev drivers tests in the
> driver list.
>
> While at it:
> - eventdev_octeontx_autotest has been renamed as
>   eventdev_selftest_octeontx,
> - eventdev_sw_autotest has been renamed as
>   eventdev_selftest_sw,
>
> Fixes: 50fb749a3972 ("event/octeontx: move test to driver")
> Fixes: 85fb515b7318 ("event/sw: move test to driver")
> Fixes: 123d67c73b06 ("test/event: register selftests")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count David Marchand
@ 2019-06-04 13:05   ` Aaron Conole
  2019-06-05 20:02   ` Wang, Yipeng1
  1 sibling, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 13:05 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, thomas, msantana, stable, Yipeng Wang, Sameh Gobriel,
	Bruce Richardson, Pablo de Lara

David Marchand <david.marchand@redhat.com> writes:

> 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 <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 08/14] test/stack: fix lock-free test name
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 08/14] test/stack: fix lock-free test name David Marchand
@ 2019-06-04 13:06   ` Aaron Conole
  0 siblings, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 13:06 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, msantana, stable

David Marchand <david.marchand@redhat.com> writes:

> Fixes: 0420378bbfc4 ("test/stack: check lock-free implementation")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest David Marchand
@ 2019-06-04 13:31   ` Aaron Conole
  0 siblings, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 13:31 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, msantana, stable

David Marchand <david.marchand@redhat.com> writes:

> Fixes: 3c518ca41ffa ("test/hash: remove hash scaling unit test")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 07/14] test/latencystats: fix stack smashing
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 07/14] test/latencystats: fix stack smashing David Marchand
@ 2019-06-04 13:38   ` Aaron Conole
  0 siblings, 0 replies; 28+ messages in thread
From: Aaron Conole @ 2019-06-04 13:38 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, msantana, stable, Reshma Pattan

David Marchand <david.marchand@redhat.com> writes:

> Caught in one Travis run:
>  + ------------------------------------------------------- +
>  + Test Suite : Latency Stats Unit Test Suite
>  + ------------------------------------------------------- +
>  + TestCase [ 0] : test_latency_init succeeded
>  + TestCase [ 1] : test_latency_update succeeded
> [snip]
>  + TestCase [1601724781] : test_latencystats_get_names succeeded
> [snip]
>  + Tests Failed :      1601790830
>
> htonl(1601724781) -> "m", "a", "x", "_"
> htonl(1601790830) -> "n", "c", "y", "_"
>
> Looks like someone went too far.
>
> The test passes a bigger size than the array it passes along.
>
> Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>

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

* Re: [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count David Marchand
  2019-06-04 13:05   ` Aaron Conole
@ 2019-06-05 20:02   ` Wang, Yipeng1
  1 sibling, 0 replies; 28+ messages in thread
From: Wang, Yipeng1 @ 2019-06-05 20:02 UTC (permalink / raw)
  To: David Marchand, dev, Dharmik Thakkar
  Cc: thomas, aconole, msantana, stable, Gobriel, Sameh, Richardson,
	Bruce, De Lara Guarch, Pablo

>-----Original Message-----
>From: David Marchand [mailto:david.marchand@redhat.com]
>Sent: Tuesday, June 4, 2019 2:00 AM
>To: dev@dpdk.org
>Cc: thomas@monjalon.net; aconole@redhat.com; msantana@redhat.com; stable@dpdk.org; Wang, Yipeng1
><yipeng1.wang@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>; De Lara
>Guarch, Pablo <pablo.de.lara.guarch@intel.com>
>Subject: [PATCH 04/14] 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.
>
[Wang, Yipeng] May add a sentence to make the commit message more explicit:
The code does not consider the master core in the core
count calculation. This commit fixes this issue.


>Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
>Cc: stable@dpdk.org
>
>Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Yipeng Wang <yipeng1.wang@intel.com>

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

* Re: [dpdk-stable] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores
  2019-06-04  8:59 ` [dpdk-stable] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores David Marchand
@ 2019-06-05 20:02   ` Wang, Yipeng1
  0 siblings, 0 replies; 28+ messages in thread
From: Wang, Yipeng1 @ 2019-06-05 20:02 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: thomas, aconole, msantana, Dharmik Thakkar, stable, Gobriel,
	Sameh, Richardson, Bruce, De Lara Guarch, Pablo

>-----Original Message-----
>From: David Marchand [mailto:david.marchand@redhat.com]
>Sent: Tuesday, June 4, 2019 2:00 AM
>To: dev@dpdk.org
>Cc: thomas@monjalon.net; aconole@redhat.com; msantana@redhat.com; Dharmik Thakkar <dharmik.thakkar@arm.com>;
>stable@dpdk.org; Wang, Yipeng1 <yipeng1.wang@intel.com>; Gobriel, Sameh <sameh.gobriel@intel.com>; Richardson, Bruce
><bruce.richardson@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
>Subject: [PATCH 05/14] test/hash: rectify slaveid to point to valid cores
>
>From: Dharmik Thakkar <dharmik.thakkar@arm.com>
>
>This patch rectifies slave_id to point to valid core indexes rather than
>core ranks in read-write lock-free concurrency test.
>
>It also replaces a 'for' loop with RTE_LCORE_FOREACH API.
>
>Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
>Cc: stable@dpdk.org
>
>Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
>Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
>Signed-off-by: David Marchand <david.marchand@redhat.com>
 
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>

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

* [dpdk-stable] [PATCH v2 01/15] test/bonding: add missing sources for link bonding RSS
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 02/15] test/crypto: move tests to the driver specific list David Marchand
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index 4de856f..a51b50a 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -62,6 +62,7 @@ test_sources = files('commands.c',
 	'test_latencystats.c',
 	'test_link_bonding.c',
 	'test_link_bonding_mode4.c',
+	'test_link_bonding_rssconf.c',
 	'test_logs.c',
 	'test_lpm.c',
 	'test_lpm6.c',
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 02/15] test/crypto: move tests to the driver specific list
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 01/15] test/bonding: add missing sources for link bonding RSS David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 03/15] test/eventdev: " David Marchand
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

For consistency, put all specific crypto driver tests in the dedicated
list (in alphabetic order).

While at it:
- remove dead reference to cryptodev_sw_mrvl_autotest (renamed as
  cryptodev_sw_mvsam_autotest),
- call the crypto scheduler test only when built,

Fixes: 9eabcb682493 ("test: update autotest list")
Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/autotest_data.py |  4 ++--
 app/test/meson.build      | 28 +++++++++++++++-------------
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 0f2c9a7..6cf7eca 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -393,8 +393,8 @@
         "Report":  None,
     },
     {
-        "Name":    "Cryptodev sw mrvl autotest",
-        "Command": "cryptodev_sw_mrvl_autotest",
+        "Name":    "Cryptodev sw mvsam autotest",
+        "Command": "cryptodev_sw_mvsam_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
diff --git a/app/test/meson.build b/app/test/meson.build
index a51b50a..cb3de71 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -200,10 +200,7 @@ fast_parallel_test_names = [
 # All test cases in fast_non_parallel_test_names list are non-parallel
 fast_non_parallel_test_names = [
         'bitratestats_autotest',
-        'cryptodev_sw_armv8_autotest',
         'crc_autotest',
-        'cryptodev_openssl_asym_autotest',
-        'cryptodev_sw_mvsam_autotest',
         'delay_us_sleep_autotest',
         'distributor_autotest',
         'eventdev_common_autotest',
@@ -259,21 +256,22 @@ perf_test_names = [
 
 # All test cases in driver_test_names list are non-parallel
 driver_test_names = [
-        'link_bonding_autotest',
-        'link_bonding_mode4_autotest',
-        'link_bonding_rssconf_autotest',
-        'cryptodev_sw_mrvl_autotest',
-        'cryptodev_dpaa2_sec_autotest',
-        'cryptodev_dpaa_sec_autotest',
-        'cryptodev_qat_autotest',
         'cryptodev_aesni_mb_autotest',
-        'cryptodev_openssl_autotest',
-        'cryptodev_scheduler_autotest',
         'cryptodev_aesni_gcm_autotest',
+        'cryptodev_dpaa_sec_autotest',
+        'cryptodev_dpaa2_sec_autotest',
         'cryptodev_null_autotest',
-        'cryptodev_sw_snow3g_autotest',
+        'cryptodev_openssl_autotest',
+        'cryptodev_openssl_asym_autotest',
+        'cryptodev_qat_autotest',
+        'cryptodev_sw_armv8_autotest',
         'cryptodev_sw_kasumi_autotest',
+        'cryptodev_sw_mvsam_autotest',
+        'cryptodev_sw_snow3g_autotest',
         'cryptodev_sw_zuc_autotest',
+        'link_bonding_autotest',
+        'link_bonding_mode4_autotest',
+        'link_bonding_rssconf_autotest',
 ]
 
 # All test cases in dump_test_names list are non-parallel
@@ -329,6 +327,10 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 	endif
 endif
 
+if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+	driver_test_names += 'cryptodev_scheduler_autotest'
+endif
+
 foreach d:test_deps
 	def_lib = get_option('default_library')
 	test_dep_objs += get_variable(def_lib + '_rte_' + d)
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 03/15] test/eventdev: move tests to the driver specific list
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 01/15] test/bonding: add missing sources for link bonding RSS David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 02/15] test/crypto: move tests to the driver specific list David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 04/15] test/hash: fix off-by-one check on core count David Marchand
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Same treatment than crypto tests, move the eventdev drivers tests in the
driver list.

While at it:
- eventdev_octeontx_autotest has been renamed as
  eventdev_selftest_octeontx,
- eventdev_sw_autotest has been renamed as
  eventdev_selftest_sw,

Fixes: 50fb749a3972 ("event/octeontx: move test to driver")
Fixes: 85fb515b7318 ("event/sw: move test to driver")
Fixes: 123d67c73b06 ("test/event: register selftests")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/meson.build | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index cb3de71..ad46515 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -204,8 +204,6 @@ fast_non_parallel_test_names = [
         'delay_us_sleep_autotest',
         'distributor_autotest',
         'eventdev_common_autotest',
-        'eventdev_octeontx_autotest',
-        'eventdev_sw_autotest',
         'fbarray_autotest',
         'hash_readwrite_autotest',
         'hash_readwrite_lf_autotest',
@@ -241,7 +239,6 @@ perf_test_names = [
         'timer_racecond_autotest',
         'efd_autotest',
         'hash_functions_autotest',
-        'eventdev_selftest_sw',
         'member_perf_autotest',
         'efd_perf_autotest',
         'lpm6_perf_autotest',
@@ -269,6 +266,8 @@ driver_test_names = [
         'cryptodev_sw_mvsam_autotest',
         'cryptodev_sw_snow3g_autotest',
         'cryptodev_sw_zuc_autotest',
+        'eventdev_selftest_octeontx',
+        'eventdev_selftest_sw',
         'link_bonding_autotest',
         'link_bonding_mode4_autotest',
         'link_bonding_rssconf_autotest',
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 04/15] test/hash: fix off-by-one check on core count
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
                     ` (2 preceding siblings ...)
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 03/15] test/eventdev: " David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 05/15] test/hash: rectify slaveid to point to valid cores David Marchand
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev
  Cc: thomas, aconole, msantana, stable, Yipeng Wang, Sameh Gobriel,
	Bruce Richardson, Pablo de Lara

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 <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 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 343a338..f9f233a 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf.c
@@ -939,7 +939,7 @@ struct {
 		}
 		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]);
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 05/15] test/hash: rectify slaveid to point to valid cores
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
                     ` (3 preceding siblings ...)
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 04/15] test/hash: fix off-by-one check on core count David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 06/15] test/hash: clean remaining trace of scaling autotest David Marchand
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev
  Cc: thomas, aconole, msantana, Dharmik Thakkar, stable, Yipeng Wang,
	Sameh Gobriel, Bruce Richardson, Pablo de Lara

From: Dharmik Thakkar <dharmik.thakkar@arm.com>

This patch rectifies slave_id to point to valid core indexes rather than
core ranks in read-write lock-free concurrency test.

It also replaces a 'for' loop with RTE_LCORE_FOREACH API.

Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 app/test/test_hash_readwrite_lf.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c
index f9f233a..5644361 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf.c
@@ -126,11 +126,9 @@ struct {
 	uint32_t i = 0;
 	uint16_t core_id;
 	uint32_t max_cores = rte_lcore_count();
-	for (core_id = 0; core_id < RTE_MAX_LCORE && i < max_cores; core_id++) {
-		if (rte_lcore_is_enabled(core_id)) {
-			enabled_core_ids[i] = core_id;
-			i++;
-		}
+	RTE_LCORE_FOREACH(core_id) {
+		enabled_core_ids[i] = core_id;
+		i++;
 	}
 
 	if (i != max_cores) {
@@ -738,7 +736,7 @@ struct {
 							enabled_core_ids[i]);
 
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -810,7 +808,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -886,7 +884,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -962,7 +960,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -1037,7 +1035,7 @@ struct {
 			if (ret < 0)
 				goto err;
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
@@ -1132,12 +1130,12 @@ struct {
 				for (i = rwc_core_cnt[n] + 1;
 				     i <= rwc_core_cnt[m] + rwc_core_cnt[n];
 				     i++)
-					rte_eal_wait_lcore(i);
+					rte_eal_wait_lcore(enabled_core_ids[i]);
 
 				writer_done = 1;
 
 				for (i = 1; i <= rwc_core_cnt[n]; i++)
-					if (rte_eal_wait_lcore(i) < 0)
+					if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 						goto err;
 
 				unsigned long long cycles_per_lookup =
@@ -1221,7 +1219,7 @@ struct {
 			writer_done = 1;
 
 			for (i = 1; i <= rwc_core_cnt[n]; i++)
-				if (rte_eal_wait_lcore(i) < 0)
+				if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 					goto err;
 
 			unsigned long long cycles_per_lookup =
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 06/15] test/hash: clean remaining trace of scaling autotest
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
                     ` (4 preceding siblings ...)
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 05/15] test/hash: rectify slaveid to point to valid cores David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 07/15] test/latencystats: fix stack smashing David Marchand
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Fixes: 3c518ca41ffa ("test/hash: remove hash scaling unit test")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index ad46515..44cf561 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -207,7 +207,6 @@ fast_non_parallel_test_names = [
         'fbarray_autotest',
         'hash_readwrite_autotest',
         'hash_readwrite_lf_autotest',
-        'hash_scaling_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 07/15] test/latencystats: fix stack smashing
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
                     ` (5 preceding siblings ...)
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 06/15] test/hash: clean remaining trace of scaling autotest David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count David Marchand
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 09/15] test/stack: fix lock-free test name David Marchand
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable, Reshma Pattan

Caught in one Travis run:
 + ------------------------------------------------------- +
 + Test Suite : Latency Stats Unit Test Suite
 + ------------------------------------------------------- +
 + TestCase [ 0] : test_latency_init succeeded
 + TestCase [ 1] : test_latency_update succeeded
[snip]
 + TestCase [1601724781] : test_latencystats_get_names succeeded
[snip]
 + Tests Failed :      1601790830

htonl(1601724781) -> "m", "a", "x", "_"
htonl(1601790830) -> "n", "c", "y", "_"

Looks like someone went too far.

The test passes a bigger size than the array it passes along.

Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/test_latencystats.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c
index 039c508..8dd794b 100644
--- a/app/test/test_latencystats.c
+++ b/app/test/test_latencystats.c
@@ -69,13 +69,10 @@ static int test_latencystats_get_names(void)
 	int ret = 0, i = 0;
 	int size = 0;
 	struct rte_metric_name names[NUM_STATS];
-	struct rte_metric_name wrongnames[NUM_STATS - 2];
 
 	size_t m_size = sizeof(struct rte_metric_name);
 	for (i = 0; i < NUM_STATS; i++)
 		memset(&names[i], 0, m_size);
-	for (i = 0; i < NUM_STATS - 2; i++)
-		memset(&wrongnames[i], 0, m_size);
 
 	/* Success Test: Valid names and size */
 	size = NUM_STATS;
@@ -99,10 +96,6 @@ static int test_latencystats_get_names(void)
 	TEST_ASSERT((ret == NUM_STATS), "Test Failed to get the metrics count,"
 		    "Actual: %d Expected: %d", ret, NUM_STATS);
 
-	/* Failure Test: Invalid names (array size lesser than size) */
-	size = NUM_STATS + 1;
-	ret = rte_latencystats_get_names(wrongnames, size);
-	TEST_ASSERT((ret == NUM_STATS), "Test Failed to get metrics names");
 	return TEST_SUCCESS;
 }
 
@@ -112,13 +105,10 @@ static int test_latencystats_get(void)
 	int ret = 0, i = 0;
 	int size = 0;
 	struct rte_metric_value values[NUM_STATS];
-	struct rte_metric_value wrongvalues[NUM_STATS - 2];
 
 	size_t v_size = sizeof(struct rte_metric_value);
 	for (i = 0; i < NUM_STATS; i++)
 		memset(&values[i], 0, v_size);
-	for (i = 0; i < NUM_STATS - 2; i++)
-		memset(&wrongvalues[i], 0, v_size);
 
 	/* Success Test: Valid values and valid size */
 	size = NUM_STATS;
@@ -137,14 +127,6 @@ static int test_latencystats_get(void)
 	TEST_ASSERT((ret == NUM_STATS), "Test Failed to get the stats count,"
 		    "Actual: %d Expected: %d", ret, NUM_STATS);
 
-	/* Failure Test: Invalid values(array size lesser than size)
-	 * and invalid size
-	 */
-	size = NUM_STATS + 2;
-	ret = rte_latencystats_get(wrongvalues, size);
-	TEST_ASSERT(ret == NUM_STATS, "Test Failed to get latency metrics"
-			" values");
-
 	return TEST_SUCCESS;
 }
 
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
                     ` (6 preceding siblings ...)
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 07/15] test/latencystats: fix stack smashing David Marchand
@ 2019-06-15  6:42   ` David Marchand
  2019-06-28 12:56     ` Ferruh Yigit
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 09/15] test/stack: fix lock-free test name David Marchand
  8 siblings, 1 reply; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable, Honnappa Nagarahalli

We can have up to RTE_MAX_LCORE in a dpdk application.
Remove the limit on 128 cores and tests that are now always false.

Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changelog since v1:
- new patch added to remove the local TEST_RCU_MAX_LCORE limit
- changed some integer types to accomodate with the change

---
 app/test/test_rcu_qsbr.c      | 133 ++++++++++++++++++------------------------
 app/test/test_rcu_qsbr_perf.c |  63 +++++++-------------
 2 files changed, 79 insertions(+), 117 deletions(-)

diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c
index 5f0b138..97af087 100644
--- a/app/test/test_rcu_qsbr.c
+++ b/app/test/test_rcu_qsbr.c
@@ -26,19 +26,18 @@
 /* Make sure that this has the same value as __RTE_QSBR_CNT_INIT */
 #define TEST_RCU_QSBR_CNT_INIT 1
 
-#define TEST_RCU_MAX_LCORE 128
-uint16_t enabled_core_ids[TEST_RCU_MAX_LCORE];
+uint16_t enabled_core_ids[RTE_MAX_LCORE];
 uint8_t num_cores;
 
 static uint32_t *keys;
 #define TOTAL_ENTRY (1024 * 8)
 #define COUNTER_VALUE 4096
-static uint32_t *hash_data[TEST_RCU_MAX_LCORE][TOTAL_ENTRY];
+static uint32_t *hash_data[RTE_MAX_LCORE][TOTAL_ENTRY];
 static uint8_t writer_done;
 
-static struct rte_rcu_qsbr *t[TEST_RCU_MAX_LCORE];
-struct rte_hash *h[TEST_RCU_MAX_LCORE];
-char hash_name[TEST_RCU_MAX_LCORE][8];
+static struct rte_rcu_qsbr *t[RTE_MAX_LCORE];
+struct rte_hash *h[RTE_MAX_LCORE];
+char hash_name[RTE_MAX_LCORE][8];
 
 struct test_rcu_thread_info {
 	/* Index in RCU array */
@@ -48,28 +47,7 @@ struct test_rcu_thread_info {
 	/* lcore IDs registered on the RCU variable */
 	uint16_t r_core_ids[2];
 };
-struct test_rcu_thread_info thread_info[TEST_RCU_MAX_LCORE/4];
-
-static inline int
-get_enabled_cores_mask(void)
-{
-	uint16_t core_id;
-	uint32_t max_cores = rte_lcore_count();
-
-	if (max_cores > TEST_RCU_MAX_LCORE) {
-		printf("Number of cores exceed %d\n", TEST_RCU_MAX_LCORE);
-		return -1;
-	}
-
-	core_id = 0;
-	num_cores = 0;
-	RTE_LCORE_FOREACH_SLAVE(core_id) {
-		enabled_core_ids[num_cores] = core_id;
-		num_cores++;
-	}
-
-	return 0;
-}
+struct test_rcu_thread_info thread_info[RTE_MAX_LCORE/4];
 
 static int
 alloc_rcu(void)
@@ -77,9 +55,9 @@ struct test_rcu_thread_info {
 	int i;
 	uint32_t sz;
 
-	sz = rte_rcu_qsbr_get_memsize(TEST_RCU_MAX_LCORE);
+	sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
 
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		t[i] = (struct rte_rcu_qsbr *)rte_zmalloc(NULL, sz,
 						RTE_CACHE_LINE_SIZE);
 
@@ -91,7 +69,7 @@ struct test_rcu_thread_info {
 {
 	int i;
 
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_free(t[i]);
 
 	return 0;
@@ -111,7 +89,7 @@ struct test_rcu_thread_info {
 	sz = rte_rcu_qsbr_get_memsize(0);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 1), "Get Memsize for 0 threads");
 
-	sz = rte_rcu_qsbr_get_memsize(TEST_RCU_MAX_LCORE);
+	sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
 	/* For 128 threads,
 	 * for machines with cache line size of 64B - 8384
 	 * for machines with cache line size of 128 - 16768
@@ -132,7 +110,7 @@ struct test_rcu_thread_info {
 
 	printf("\nTest rte_rcu_qsbr_init()\n");
 
-	r = rte_rcu_qsbr_init(NULL, TEST_RCU_MAX_LCORE);
+	r = rte_rcu_qsbr_init(NULL, RTE_MAX_LCORE);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((r != 1), "NULL variable");
 
 	return 0;
@@ -156,7 +134,7 @@ struct test_rcu_thread_info {
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0),
 		"NULL variable, invalid thread id");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	/* Register valid thread id */
 	ret = rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[0]);
@@ -168,7 +146,7 @@ struct test_rcu_thread_info {
 		"Already registered thread id");
 
 	/* Register valid thread id - max allowed thread id */
-	ret = rte_rcu_qsbr_thread_register(t[0], TEST_RCU_MAX_LCORE - 1);
+	ret = rte_rcu_qsbr_thread_register(t[0], RTE_MAX_LCORE - 1);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 1), "Max thread id");
 
 	ret = rte_rcu_qsbr_thread_register(t[0], 100000);
@@ -185,9 +163,10 @@ struct test_rcu_thread_info {
 static int
 test_rcu_qsbr_thread_unregister(void)
 {
-	int i, j, ret;
+	unsigned int num_threads[3] = {1, RTE_MAX_LCORE, 1};
+	unsigned int i, j;
 	uint64_t token;
-	uint8_t num_threads[3] = {1, TEST_RCU_MAX_LCORE, 1};
+	int ret;
 
 	printf("\nTest rte_rcu_qsbr_thread_unregister()\n");
 
@@ -198,7 +177,7 @@ struct test_rcu_thread_info {
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0),
 		"NULL variable, invalid thread id");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[0]);
 
@@ -207,7 +186,7 @@ struct test_rcu_thread_info {
 		"NULL variable, invalid thread id");
 
 	/* Find first disabled core */
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++) {
+	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		if (enabled_core_ids[i] == 0)
 			break;
 	}
@@ -232,15 +211,15 @@ struct test_rcu_thread_info {
 	/*
 	 * Test with different thread_ids:
 	 * 1 - thread_id = 0
-	 * 2 - All possible thread_ids, from 0 to TEST_RCU_MAX_LCORE
-	 * 3 - thread_id = TEST_RCU_MAX_LCORE - 1
+	 * 2 - All possible thread_ids, from 0 to RTE_MAX_LCORE
+	 * 3 - thread_id = RTE_MAX_LCORE - 1
 	 */
 	for (j = 0; j < 3; j++) {
-		rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+		rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 		for (i = 0; i < num_threads[j]; i++)
 			rte_rcu_qsbr_thread_register(t[0],
-				(j == 2) ? (TEST_RCU_MAX_LCORE - 1) : i);
+				(j == 2) ? (RTE_MAX_LCORE - 1) : i);
 
 		token = rte_rcu_qsbr_start(t[0]);
 		TEST_RCU_QSBR_RETURN_IF_ERROR(
@@ -248,10 +227,10 @@ struct test_rcu_thread_info {
 		/* Update quiescent state counter */
 		for (i = 0; i < num_threads[j]; i++) {
 			/* Skip one update */
-			if (i == (TEST_RCU_MAX_LCORE - 10))
+			if (i == (RTE_MAX_LCORE - 10))
 				continue;
 			rte_rcu_qsbr_quiescent(t[0],
-				(j == 2) ? (TEST_RCU_MAX_LCORE - 1) : i);
+				(j == 2) ? (RTE_MAX_LCORE - 1) : i);
 		}
 
 		if (j == 1) {
@@ -260,7 +239,7 @@ struct test_rcu_thread_info {
 			TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0),
 						"Non-blocking QSBR check");
 			/* Update the previously skipped thread */
-			rte_rcu_qsbr_quiescent(t[0], TEST_RCU_MAX_LCORE - 10);
+			rte_rcu_qsbr_quiescent(t[0], RTE_MAX_LCORE - 10);
 		}
 
 		/* Validate the updates */
@@ -270,7 +249,7 @@ struct test_rcu_thread_info {
 
 		for (i = 0; i < num_threads[j]; i++)
 			rte_rcu_qsbr_thread_unregister(t[0],
-				(j == 2) ? (TEST_RCU_MAX_LCORE - 1) : i);
+				(j == 2) ? (RTE_MAX_LCORE - 1) : i);
 
 		/* Check with no thread registered */
 		ret = rte_rcu_qsbr_check(t[0], token, true);
@@ -292,7 +271,7 @@ struct test_rcu_thread_info {
 
 	printf("\nTest rte_rcu_qsbr_start()\n");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	for (i = 0; i < 3; i++)
 		rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]);
@@ -331,7 +310,7 @@ struct test_rcu_thread_info {
 
 	printf("\nTest rte_rcu_qsbr_check()\n");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	token = rte_rcu_qsbr_start(t[0]);
 	TEST_RCU_QSBR_RETURN_IF_ERROR(
@@ -365,7 +344,7 @@ struct test_rcu_thread_info {
 	ret = rte_rcu_qsbr_check(t[0], token, true);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "Blocking QSBR check");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	for (i = 0; i < 4; i++)
 		rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]);
@@ -414,7 +393,7 @@ struct test_rcu_thread_info {
 
 	printf("\nTest rte_rcu_qsbr_synchronize()\n");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	/* Test if the API returns when there are no threads reporting
 	 * QS on the variable.
@@ -424,7 +403,7 @@ struct test_rcu_thread_info {
 	/* Test if the API returns when there are threads registered
 	 * but not online.
 	 */
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_thread_register(t[0], i);
 	rte_rcu_qsbr_synchronize(t[0], RTE_QSBR_THRID_INVALID);
 
@@ -436,12 +415,12 @@ struct test_rcu_thread_info {
 	rte_rcu_qsbr_thread_offline(t[0], 0);
 
 	/* Check the other boundary */
-	rte_rcu_qsbr_thread_online(t[0], TEST_RCU_MAX_LCORE - 1);
-	rte_rcu_qsbr_synchronize(t[0], TEST_RCU_MAX_LCORE - 1);
-	rte_rcu_qsbr_thread_offline(t[0], TEST_RCU_MAX_LCORE - 1);
+	rte_rcu_qsbr_thread_online(t[0], RTE_MAX_LCORE - 1);
+	rte_rcu_qsbr_synchronize(t[0], RTE_MAX_LCORE - 1);
+	rte_rcu_qsbr_thread_offline(t[0], RTE_MAX_LCORE - 1);
 
 	/* Test if the API returns after unregisterng all the threads */
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_thread_unregister(t[0], i);
 	rte_rcu_qsbr_synchronize(t[0], RTE_QSBR_THRID_INVALID);
 
@@ -474,7 +453,7 @@ struct test_rcu_thread_info {
 
 	printf("Test rte_rcu_qsbr_thread_online()\n");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	/* Register 2 threads to validate that only the
 	 * online thread is waited upon.
@@ -501,9 +480,9 @@ struct test_rcu_thread_info {
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "thread update");
 
 	/* Make all the threads online */
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 	token = rte_rcu_qsbr_start(t[0]);
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++) {
+	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		rte_rcu_qsbr_thread_register(t[0], i);
 		rte_rcu_qsbr_thread_online(t[0], i);
 	}
@@ -512,7 +491,7 @@ struct test_rcu_thread_info {
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "thread online");
 	/* Check if all the online threads can report QS */
 	token = rte_rcu_qsbr_start(t[0]);
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_quiescent(t[0], i);
 	ret = rte_rcu_qsbr_check(t[0], token, true);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "thread update");
@@ -532,7 +511,7 @@ struct test_rcu_thread_info {
 
 	printf("\nTest rte_rcu_qsbr_thread_offline()\n");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[0]);
 
@@ -560,10 +539,10 @@ struct test_rcu_thread_info {
 	/*
 	 * Check a sequence of online/status/offline/status/online/status
 	 */
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 	token = rte_rcu_qsbr_start(t[0]);
 	/* Make the threads online */
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++) {
+	for (i = 0; i < RTE_MAX_LCORE; i++) {
 		rte_rcu_qsbr_thread_register(t[0], i);
 		rte_rcu_qsbr_thread_online(t[0], i);
 	}
@@ -574,13 +553,13 @@ struct test_rcu_thread_info {
 
 	/* Check if all the online threads can report QS */
 	token = rte_rcu_qsbr_start(t[0]);
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_quiescent(t[0], i);
 	ret = rte_rcu_qsbr_check(t[0], token, true);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "report QS");
 
 	/* Make all the threads offline */
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_thread_offline(t[0], i);
 	/* Make sure these threads are not being waited on */
 	token = rte_rcu_qsbr_start(t[0]);
@@ -588,11 +567,11 @@ struct test_rcu_thread_info {
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "offline QS");
 
 	/* Make the threads online */
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_thread_online(t[0], i);
 	/* Check if all the online threads can report QS */
 	token = rte_rcu_qsbr_start(t[0]);
-	for (i = 0; i < TEST_RCU_MAX_LCORE; i++)
+	for (i = 0; i < RTE_MAX_LCORE; i++)
 		rte_rcu_qsbr_quiescent(t[0], i);
 	ret = rte_rcu_qsbr_check(t[0], token, true);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "online again");
@@ -615,8 +594,8 @@ struct test_rcu_thread_info {
 	rte_rcu_qsbr_dump(stdout, NULL);
 	rte_rcu_qsbr_dump(NULL, NULL);
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
-	rte_rcu_qsbr_init(t[1], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
+	rte_rcu_qsbr_init(t[1], RTE_MAX_LCORE);
 
 	/* QS variable with 0 core mask */
 	rte_rcu_qsbr_dump(stdout, t[0]);
@@ -738,8 +717,7 @@ struct test_rcu_thread_info {
 
 	for (i = 0; i < TOTAL_ENTRY; i++) {
 		hash_data[hash_id][i] =
-			rte_zmalloc(NULL,
-				sizeof(uint32_t) * TEST_RCU_MAX_LCORE, 0);
+			rte_zmalloc(NULL, sizeof(uint32_t) * RTE_MAX_LCORE, 0);
 		if (hash_data[hash_id][i] == NULL) {
 			printf("No memory\n");
 			return NULL;
@@ -781,7 +759,7 @@ struct test_rcu_thread_info {
 
 	printf("Test: 1 writer, 1 QSBR variable, simultaneous QSBR queries\n");
 
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	/* Shared data structure created */
 	h[0] = init_hash(0);
@@ -924,7 +902,7 @@ struct test_rcu_thread_info {
 
 	for (i = 0; i < test_cores / 4; i++) {
 		j = i * 4;
-		rte_rcu_qsbr_init(t[i], TEST_RCU_MAX_LCORE);
+		rte_rcu_qsbr_init(t[i], RTE_MAX_LCORE);
 		h[i] = init_hash(i);
 		if (h[i] == NULL) {
 			printf("Hash init failed\n");
@@ -998,8 +976,13 @@ struct test_rcu_thread_info {
 static int
 test_rcu_qsbr_main(void)
 {
-	if (get_enabled_cores_mask() != 0)
-		return -1;
+	uint16_t core_id;
+
+	num_cores = 0;
+	RTE_LCORE_FOREACH_SLAVE(core_id) {
+		enabled_core_ids[num_cores] = core_id;
+		num_cores++;
+	}
 
 	if (num_cores < 4) {
 		printf("Test failed! Need 4 or more cores\n");
diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c
index 33ca36c..c918a94 100644
--- a/app/test/test_rcu_qsbr_perf.c
+++ b/app/test/test_rcu_qsbr_perf.c
@@ -16,8 +16,7 @@
 #include "test.h"
 
 /* Check condition and return an error if true. */
-#define TEST_RCU_MAX_LCORE 128
-static uint16_t enabled_core_ids[TEST_RCU_MAX_LCORE];
+static uint16_t enabled_core_ids[RTE_MAX_LCORE];
 static uint8_t num_cores;
 
 static uint32_t *keys;
@@ -28,7 +27,7 @@
 static volatile uint8_t all_registered;
 static volatile uint32_t thr_id;
 
-static struct rte_rcu_qsbr *t[TEST_RCU_MAX_LCORE];
+static struct rte_rcu_qsbr *t[RTE_MAX_LCORE];
 static struct rte_hash *h;
 static char hash_name[8];
 static rte_atomic64_t updates, checks;
@@ -39,40 +38,19 @@
  */
 #define RCU_SCALE_DOWN 1000
 
-/* Simple way to allocate thread ids in 0 to TEST_RCU_MAX_LCORE space */
+/* Simple way to allocate thread ids in 0 to RTE_MAX_LCORE space */
 static inline uint32_t
 alloc_thread_id(void)
 {
 	uint32_t tmp_thr_id;
 
 	tmp_thr_id = __atomic_fetch_add(&thr_id, 1, __ATOMIC_RELAXED);
-	if (tmp_thr_id >= TEST_RCU_MAX_LCORE)
+	if (tmp_thr_id >= RTE_MAX_LCORE)
 		printf("Invalid thread id %u\n", tmp_thr_id);
 
 	return tmp_thr_id;
 }
 
-static inline int
-get_enabled_cores_mask(void)
-{
-	uint16_t core_id;
-	uint32_t max_cores = rte_lcore_count();
-
-	if (max_cores > TEST_RCU_MAX_LCORE) {
-		printf("Number of cores exceed %d\n", TEST_RCU_MAX_LCORE);
-		return -1;
-	}
-
-	core_id = 0;
-	num_cores = 0;
-	RTE_LCORE_FOREACH_SLAVE(core_id) {
-		enabled_core_ids[num_cores] = core_id;
-		num_cores++;
-	}
-
-	return 0;
-}
-
 static int
 test_rcu_qsbr_reader_perf(void *arg)
 {
@@ -165,7 +143,7 @@
 	if (all_registered == 1)
 		tmp_num_cores = num_cores - 1;
 	else
-		tmp_num_cores = TEST_RCU_MAX_LCORE;
+		tmp_num_cores = RTE_MAX_LCORE;
 
 	sz = rte_rcu_qsbr_get_memsize(tmp_num_cores);
 	t[0] = (struct rte_rcu_qsbr *)rte_zmalloc("rcu0", sz,
@@ -223,7 +201,7 @@
 	if (all_registered == 1)
 		tmp_num_cores = num_cores;
 	else
-		tmp_num_cores = TEST_RCU_MAX_LCORE;
+		tmp_num_cores = RTE_MAX_LCORE;
 
 	sz = rte_rcu_qsbr_get_memsize(tmp_num_cores);
 	t[0] = (struct rte_rcu_qsbr *)rte_zmalloc("rcu0", sz,
@@ -269,11 +247,11 @@
 	/* Number of readers does not matter for QS variable in this test
 	 * case as no reader will be registered.
 	 */
-	sz = rte_rcu_qsbr_get_memsize(TEST_RCU_MAX_LCORE);
+	sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
 	t[0] = (struct rte_rcu_qsbr *)rte_zmalloc("rcu0", sz,
 						RTE_CACHE_LINE_SIZE);
 	/* QS variable is initialized */
-	rte_rcu_qsbr_init(t[0], TEST_RCU_MAX_LCORE);
+	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
 	/* Writer threads are launched */
 	for (i = 0; i < num_cores; i++)
@@ -367,7 +345,7 @@ static struct rte_hash *init_hash(void)
 
 	for (i = 0; i < TOTAL_ENTRY; i++) {
 		hash_data[i] = rte_zmalloc(NULL,
-				sizeof(uint32_t) * TEST_RCU_MAX_LCORE, 0);
+				sizeof(uint32_t) * RTE_MAX_LCORE, 0);
 		if (hash_data[i] == NULL) {
 			printf("No memory\n");
 			return NULL;
@@ -417,7 +395,7 @@ static struct rte_hash *init_hash(void)
 	if (all_registered == 1)
 		tmp_num_cores = num_cores;
 	else
-		tmp_num_cores = TEST_RCU_MAX_LCORE;
+		tmp_num_cores = RTE_MAX_LCORE;
 
 	sz = rte_rcu_qsbr_get_memsize(tmp_num_cores);
 	t[0] = (struct rte_rcu_qsbr *)rte_zmalloc("rcu0", sz,
@@ -530,7 +508,7 @@ static struct rte_hash *init_hash(void)
 	if (all_registered == 1)
 		tmp_num_cores = num_cores;
 	else
-		tmp_num_cores = TEST_RCU_MAX_LCORE;
+		tmp_num_cores = RTE_MAX_LCORE;
 
 	sz = rte_rcu_qsbr_get_memsize(tmp_num_cores);
 	t[0] = (struct rte_rcu_qsbr *)rte_zmalloc("rcu0", sz,
@@ -626,23 +604,24 @@ static struct rte_hash *init_hash(void)
 static int
 test_rcu_qsbr_main(void)
 {
+	uint16_t core_id;
+
 	rte_atomic64_init(&updates);
 	rte_atomic64_init(&update_cycles);
 	rte_atomic64_init(&checks);
 	rte_atomic64_init(&check_cycles);
 
-	if (get_enabled_cores_mask() != 0)
-		return -1;
+	num_cores = 0;
+	RTE_LCORE_FOREACH_SLAVE(core_id) {
+		enabled_core_ids[num_cores] = core_id;
+		num_cores++;
+	}
 
 	printf("Number of cores provided = %d\n", num_cores);
 	if (num_cores < 2) {
 		printf("Test failed! Need 2 or more cores\n");
 		goto test_fail;
 	}
-	if (num_cores > TEST_RCU_MAX_LCORE) {
-		printf("Test failed! %d cores supported\n", TEST_RCU_MAX_LCORE);
-		goto test_fail;
-	}
 
 	printf("Perf test with all reader threads registered\n");
 	printf("--------------------------------------------\n");
@@ -664,12 +643,12 @@ static struct rte_hash *init_hash(void)
 		goto test_fail;
 
 	/* Make sure the actual number of cores provided is less than
-	 * TEST_RCU_MAX_LCORE. This will allow for some threads not
+	 * RTE_MAX_LCORE. This will allow for some threads not
 	 * to be registered on the QS variable.
 	 */
-	if (num_cores >= TEST_RCU_MAX_LCORE) {
+	if (num_cores >= RTE_MAX_LCORE) {
 		printf("Test failed! number of cores provided should be less than %d\n",
-			TEST_RCU_MAX_LCORE);
+			RTE_MAX_LCORE);
 		goto test_fail;
 	}
 
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH v2 09/15] test/stack: fix lock-free test name
       [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
                     ` (7 preceding siblings ...)
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count David Marchand
@ 2019-06-15  6:42   ` David Marchand
  8 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-15  6:42 UTC (permalink / raw)
  To: dev; +Cc: thomas, aconole, msantana, stable

Fixes: 0420378bbfc4 ("test/stack: check lock-free implementation")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 44cf561..7628ed9 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -188,7 +188,7 @@ fast_parallel_test_names = [
         'sched_autotest',
         'spinlock_autotest',
         'stack_autotest',
-        'stack_nb_autotest',
+        'stack_lf_autotest',
         'string_autotest',
         'table_autotest',
         'tailq_autotest',
@@ -247,7 +247,7 @@ perf_test_names = [
         'ring_pmd_perf_autotest',
         'pmd_perf_autotest',
         'stack_perf_autotest',
-        'stack_nb_perf_autotest',
+        'stack_lf_perf_autotest',
 ]
 
 # All test cases in driver_test_names list are non-parallel
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count
  2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count David Marchand
@ 2019-06-28 12:56     ` Ferruh Yigit
  2019-06-28 13:32       ` David Marchand
  0 siblings, 1 reply; 28+ messages in thread
From: Ferruh Yigit @ 2019-06-28 12:56 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: thomas, aconole, msantana, stable, Honnappa Nagarahalli, Jerin Jacob

On 6/15/2019 7:42 AM, David Marchand wrote:
> We can have up to RTE_MAX_LCORE in a dpdk application.
> Remove the limit on 128 cores and tests that are now always false.
> 
> Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

<...>

> @@ -664,12 +643,12 @@ static struct rte_hash *init_hash(void)
>  		goto test_fail;
>  
>  	/* Make sure the actual number of cores provided is less than
> -	 * TEST_RCU_MAX_LCORE. This will allow for some threads not
> +	 * RTE_MAX_LCORE. This will allow for some threads not
>  	 * to be registered on the QS variable.
>  	 */
> -	if (num_cores >= TEST_RCU_MAX_LCORE) {
> +	if (num_cores >= RTE_MAX_LCORE) {
>  		printf("Test failed! number of cores provided should be less than %d\n",
> -			TEST_RCU_MAX_LCORE);
> +			RTE_MAX_LCORE);
>  		goto test_fail;
>  	}
>  
> 

Hi David,

This is causing build error for arm [1] since in config they have
"CONFIG_RTE_MAX_LCORE=256"
Can we make 'num_cores' 'uint16_t'?

[1]
.../dpdk/app/test/test_rcu_qsbr_perf.c:649:16: error: comparison is always false
due to limited range of data type [-Werror=type-limits]
  if (num_cores >= RTE_MAX_LCORE) {
                ^~

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

* Re: [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count
  2019-06-28 12:56     ` Ferruh Yigit
@ 2019-06-28 13:32       ` David Marchand
  0 siblings, 0 replies; 28+ messages in thread
From: David Marchand @ 2019-06-28 13:32 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Thomas Monjalon, Aaron Conole, Michael Santana, dpdk stable,
	Honnappa Nagarahalli, Jerin Jacob

On Fri, Jun 28, 2019 at 2:57 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 6/15/2019 7:42 AM, David Marchand wrote:
> > We can have up to RTE_MAX_LCORE in a dpdk application.
> > Remove the limit on 128 cores and tests that are now always false.
> >
> > Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> <...>
>
> > @@ -664,12 +643,12 @@ static struct rte_hash *init_hash(void)
> >               goto test_fail;
> >
> >       /* Make sure the actual number of cores provided is less than
> > -      * TEST_RCU_MAX_LCORE. This will allow for some threads not
> > +      * RTE_MAX_LCORE. This will allow for some threads not
> >        * to be registered on the QS variable.
> >        */
> > -     if (num_cores >= TEST_RCU_MAX_LCORE) {
> > +     if (num_cores >= RTE_MAX_LCORE) {
> >               printf("Test failed! number of cores provided should be
> less than %d\n",
> > -                     TEST_RCU_MAX_LCORE);
> > +                     RTE_MAX_LCORE);
> >               goto test_fail;
> >       }
> >
> >
>
> Hi David,
>
> This is causing build error for arm [1] since in config they have
> "CONFIG_RTE_MAX_LCORE=256"
> Can we make 'num_cores' 'uint16_t'?
>
> [1]
> .../dpdk/app/test/test_rcu_qsbr_perf.c:649:16: error: comparison is always
> false
> due to limited range of data type [-Werror=type-limits]
>   if (num_cores >= RTE_MAX_LCORE) {
>                 ^~
>

I checked and I am not reproducing it in travis arm64 compilation, but did
not investigate why.
Indeed there is an issue, I can send a patch to fix, but Honnappa also
reported it and sent a patch [1].


1: http://patchwork.dpdk.org/patch/55530/

-- 
David Marchand

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

end of thread, other threads:[~2019-06-28 13:32 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1559638792-8608-1-git-send-email-david.marchand@redhat.com>
2019-06-04  8:59 ` [dpdk-stable] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS David Marchand
2019-06-04 12:59   ` Aaron Conole
2019-06-04  8:59 ` [dpdk-stable] [PATCH 02/14] test/crypto: move tests to the driver specific list David Marchand
2019-06-04 13:00   ` Aaron Conole
2019-06-04  8:59 ` [dpdk-stable] [PATCH 03/14] test/eventdev: " David Marchand
2019-06-04 13:04   ` Aaron Conole
2019-06-04  8:59 ` [dpdk-stable] [PATCH 04/14] test/hash: fix off-by-one check on core count David Marchand
2019-06-04 13:05   ` Aaron Conole
2019-06-05 20:02   ` Wang, Yipeng1
2019-06-04  8:59 ` [dpdk-stable] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores David Marchand
2019-06-05 20:02   ` Wang, Yipeng1
2019-06-04  8:59 ` [dpdk-stable] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest David Marchand
2019-06-04 13:31   ` Aaron Conole
2019-06-04  8:59 ` [dpdk-stable] [PATCH 07/14] test/latencystats: fix stack smashing David Marchand
2019-06-04 13:38   ` Aaron Conole
2019-06-04  8:59 ` [dpdk-stable] [PATCH 08/14] test/stack: fix lock-free test name David Marchand
2019-06-04 13:06   ` Aaron Conole
     [not found] ` <1560580950-16754-1-git-send-email-david.marchand@redhat.com>
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 01/15] test/bonding: add missing sources for link bonding RSS David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 02/15] test/crypto: move tests to the driver specific list David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 03/15] test/eventdev: " David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 04/15] test/hash: fix off-by-one check on core count David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 05/15] test/hash: rectify slaveid to point to valid cores David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 06/15] test/hash: clean remaining trace of scaling autotest David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 07/15] test/latencystats: fix stack smashing David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 08/15] test/rcu: remove arbitrary limit on max core count David Marchand
2019-06-28 12:56     ` Ferruh Yigit
2019-06-28 13:32       ` David Marchand
2019-06-15  6:42   ` [dpdk-stable] [PATCH v2 09/15] test/stack: fix lock-free test name David Marchand

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).