From patchwork Fri Jun 28 03:44:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 55530 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0CBB634F0; Fri, 28 Jun 2019 05:44:31 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 59F28F04; Fri, 28 Jun 2019 05:44:29 +0200 (CEST) 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 86008C0A; Thu, 27 Jun 2019 20:44:28 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7DB113F706; Thu, 27 Jun 2019 20:44:28 -0700 (PDT) From: Honnappa Nagarahalli To: honnappa.nagarahalli@arm.com Cc: dev@dpdk.org, david.marchand@redhat.com, ruifeng.wang@arm.com, nd@arm.com, stable@dpdk.org Date: Thu, 27 Jun 2019 22:44:05 -0500 Message-Id: <20190628034406.5399-1-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH 1/2] test/rcu: increase the size of num cores variable 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" num_cores is of type uint8_t. This results in the following compilation error. 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) { ^~ RTE_MAX_LCORE is set to 256 for armv8 config. Fixes: e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang --- app/test/test_rcu_qsbr.c | 4 ++-- app/test/test_rcu_qsbr_perf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index 943a1e370..0c6267ee9 100644 --- a/app/test/test_rcu_qsbr.c +++ b/app/test/test_rcu_qsbr.c @@ -27,7 +27,7 @@ #define TEST_RCU_QSBR_CNT_INIT 1 uint16_t enabled_core_ids[RTE_MAX_LCORE]; -uint8_t num_cores; +uint16_t num_cores; static uint32_t *keys; #define TOTAL_ENTRY (1024 * 8) @@ -891,7 +891,7 @@ static int test_rcu_qsbr_mw_mv_mqs(void) { int i, j; - uint8_t test_cores; + uint16_t test_cores; writer_done = 0; test_cores = num_cores / 4; diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c index 363365f46..b1a910423 100644 --- a/app/test/test_rcu_qsbr_perf.c +++ b/app/test/test_rcu_qsbr_perf.c @@ -17,7 +17,7 @@ /* Check condition and return an error if true. */ static uint16_t enabled_core_ids[RTE_MAX_LCORE]; -static uint8_t num_cores; +static uint16_t num_cores; static uint32_t *keys; #define TOTAL_ENTRY (1024 * 8) From patchwork Fri Jun 28 03:44:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 55531 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E58DC5B34; Fri, 28 Jun 2019 05:44:34 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 04CF94C99; Fri, 28 Jun 2019 05:44:31 +0200 (CEST) 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 480332B; Thu, 27 Jun 2019 20:44:31 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 372563F706; Thu, 27 Jun 2019 20:44:31 -0700 (PDT) From: Honnappa Nagarahalli To: honnappa.nagarahalli@arm.com Cc: dev@dpdk.org, david.marchand@redhat.com, ruifeng.wang@arm.com, nd@arm.com, stable@dpdk.org Date: Thu, 27 Jun 2019 22:44:06 -0500 Message-Id: <20190628034406.5399-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190628034406.5399-1-honnappa.nagarahalli@arm.com> References: <20190628034406.5399-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 2/2] test/rcu: address test case failure 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" Test case for rte_rcu_qsbr_get_memsize is written specifically for 128 threads. Do not use RTE_MAX_LCORE as it changes for different configurations. Fixes: e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Reviewed-by: David Marchand Reviewed-by: David Marchand > --- app/test/test_rcu_qsbr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index 0c6267ee9..5d92fbee8 100644 --- a/app/test/test_rcu_qsbr.c +++ b/app/test/test_rcu_qsbr.c @@ -89,13 +89,13 @@ test_rcu_qsbr_get_memsize(void) 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(RTE_MAX_LCORE); + sz = rte_rcu_qsbr_get_memsize(128); /* For 128 threads, * for machines with cache line size of 64B - 8384 * for machines with cache line size of 128 - 16768 */ TEST_RCU_QSBR_RETURN_IF_ERROR((sz != 8384 && sz != 16768), - "Get Memsize"); + "Get Memsize for 128 threads"); return 0; }