From patchwork Thu Oct 29 15:36:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharmik Thakkar X-Patchwork-Id: 82829 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 011B3A04B5; Thu, 29 Oct 2020 16:37:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A050BD041; Thu, 29 Oct 2020 16:37:13 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 7C63ECFA3; Thu, 29 Oct 2020 16:37:09 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E55D71435; Thu, 29 Oct 2020 08:37:08 -0700 (PDT) Received: from localhost.localdomain (2p2660v4-1.austin.arm.com [10.118.13.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DEB283F66E; Thu, 29 Oct 2020 08:37:08 -0700 (PDT) From: Dharmik Thakkar To: Bruce Richardson , Vladimir Medvedkin , Gavin Hu , Ruifeng Wang , Honnappa Nagarahalli Cc: dev@dpdk.org, nd@arm.com, Dharmik Thakkar , stable@dpdk.org Date: Thu, 29 Oct 2020 10:36:33 -0500 Message-Id: <20201029153634.10647-3-dharmik.thakkar@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201029153634.10647-1-dharmik.thakkar@arm.com> References: <20201029153634.10647-1-dharmik.thakkar@arm.com> Subject: [dpdk-dev] [PATCH 3/4] test/lpm: remove error checking in rcu qsbr perf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove redundant error checking for reader threads since they never return error. Fixes: eff30b59cc2e ("test/lpm: add RCU performance tests") Cc: honnappa.nagarahalli@arm.com Cc: stable@dpdk.org Signed-off-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang --- app/test/test_lpm_perf.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index 251ea12345ae..4f15db4f85ee 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -554,11 +554,10 @@ test_lpm_rcu_perf_multi_writer(void) __atomic_load_n(&gwrite_cycles, __ATOMIC_RELAXED) / TOTAL_WRITES ); - /* Wait and check return value from reader threads */ writer_done = 1; + /* Wait until all readers have exited */ for (i = 2; i < num_cores; i++) - if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) - goto error; + rte_eal_wait_lcore(enabled_core_ids[i]); rte_lpm_free(lpm); rte_free(rv); @@ -603,10 +602,9 @@ test_lpm_rcu_perf_multi_writer(void) / TOTAL_WRITES); writer_done = 1; - /* Wait and check return value from reader threads */ + /* Wait until all readers have exited */ for (i = 2; i < num_cores; i++) - if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) - goto error; + rte_eal_wait_lcore(enabled_core_ids[i]); rte_lpm_free(lpm); @@ -710,10 +708,9 @@ test_lpm_rcu_perf(void) (double)total_cycles / TOTAL_WRITES); writer_done = 1; - /* Wait and check return value from reader threads */ + /* Wait until all readers have exited */ for (i = 0; i < num_cores; i++) - if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) - goto error; + if (rte_eal_wait_lcore(enabled_core_ids[i]); rte_lpm_free(lpm); rte_free(rv); @@ -769,11 +766,9 @@ test_lpm_rcu_perf(void) (double)total_cycles / TOTAL_WRITES); writer_done = 1; - /* Wait and check return value from reader threads */ + /* Wait until all readers have exited */ for (i = 0; i < num_cores; i++) - if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) - printf("Warning: lcore %u not finished.\n", - enabled_core_ids[i]); + rte_eal_wait_lcore(enabled_core_ids[i]); rte_lpm_free(lpm);