[dpdk-stable] patch 'test/hash: fix perf result' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 7 14:25:17 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Kevin Traynor

---
>From 31d86c501d08d78ebc020b62d26e5fa5efa3d074 Mon Sep 17 00:00:00 2001
From: Dharmik Thakkar <dharmik.thakkar at arm.com>
Date: Mon, 14 Jan 2019 03:23:04 -0600
Subject: [PATCH] test/hash: fix perf result

[ upstream commit 7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd ]

Reset 'iter' and 'tbl_rw_test_param.found' on each iteration
to give correct result for lost and duplicated keys.

This patch also changes the default return value of the test to -1
when not enough resources are provided.

Fixes: 0eb3726ebcf14 ("test/hash: add test for read/write concurrency")

Signed-off-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
Reviewed-by: Yipeng Wang <yipeng1.wang at intel.com>
---
 test/test/test_hash_readwrite.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/test/test/test_hash_readwrite.c b/test/test/test_hash_readwrite.c
index 6b695ce6e..480ae97d8 100644
--- a/test/test/test_hash_readwrite.c
+++ b/test/test/test_hash_readwrite.c
@@ -40,5 +40,5 @@ static struct perf htm_results, non_htm_results;
 struct {
 	uint32_t *keys;
-	uint32_t *found;
+	uint8_t *found;
 	uint32_t num_insert;
 	uint32_t rounded_tot_insert;
@@ -127,5 +127,5 @@ init_params(int use_ext, int use_htm, int use_jhash)
 
 	uint32_t *keys = NULL;
-	uint32_t *found = NULL;
+	uint8_t *found = NULL;
 	struct rte_hash *handle;
 
@@ -174,5 +174,5 @@ init_params(int use_ext, int use_htm, int use_jhash)
 	}
 
-	found = rte_zmalloc(NULL, sizeof(uint32_t) * TOTAL_ENTRY, 0);
+	found = rte_zmalloc(NULL, sizeof(uint8_t) * TOTAL_ENTRY, 0);
 	if (found == NULL) {
 		printf("RTE_ZMALLOC failed\n");
@@ -362,5 +362,5 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 	const void *next_key;
 	void *next_data;
-	uint32_t iter = 0;
+	uint32_t iter;
 	int use_jhash = 0;
 
@@ -537,4 +537,6 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm,
 		rte_eal_mp_wait_lcore();
 
+		iter = 0;
+		memset(tbl_rw_test_param.found, 0, TOTAL_ENTRY);
 		while (rte_hash_iterate(tbl_rw_test_param.h,
 				&next_key, &next_data, &iter) >= 0) {
@@ -620,5 +622,5 @@ test_hash_readwrite_main(void)
 		printf("More than two lcores are required "
 			"to do read write test\n");
-		return 0;
+		return -1;
 	}
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-02-07 13:19:55.778307558 +0000
+++ 0011-test-hash-fix-perf-result.patch	2019-02-07 13:19:55.000000000 +0000
@@ -1,8 +1,10 @@
-From 7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd Mon Sep 17 00:00:00 2001
+From 31d86c501d08d78ebc020b62d26e5fa5efa3d074 Mon Sep 17 00:00:00 2001
 From: Dharmik Thakkar <dharmik.thakkar at arm.com>
 Date: Mon, 14 Jan 2019 03:23:04 -0600
 Subject: [PATCH] test/hash: fix perf result
 
+[ upstream commit 7dbbdd3efa6777ac2a3b7cb30d1e8ebec9e5e2fd ]
+
 Reset 'iter' and 'tbl_rw_test_param.found' on each iteration
 to give correct result for lost and duplicated keys.
 
@@ -10,7 +12,6 @@
 when not enough resources are provided.
 
 Fixes: 0eb3726ebcf14 ("test/hash: add test for read/write concurrency")
-Cc: stable at dpdk.org
 
 Signed-off-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>


More information about the stable mailing list