From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BE68F1B520 for ; Thu, 7 Feb 2019 14:27:19 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 207FD3D956; Thu, 7 Feb 2019 13:27:19 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id B330F690E8; Thu, 7 Feb 2019 13:27:17 +0000 (UTC) From: Kevin Traynor To: Dharmik Thakkar Cc: Ferruh Yigit , Yipeng Wang , dpdk stable Date: Thu, 7 Feb 2019 13:25:17 +0000 Message-Id: <20190207132614.20538-11-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 07 Feb 2019 13:27:19 +0000 (UTC) Subject: [dpdk-stable] patch 'test/hash: fix perf result' has been queued to LTS release 18.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 13:27:20 -0000 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 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 Reviewed-by: Ferruh Yigit Reviewed-by: Yipeng Wang --- 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 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@dpdk.org Signed-off-by: Dharmik Thakkar Reviewed-by: Ferruh Yigit