From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 88928A046B
	for <public@inbox.dpdk.org>; Fri, 28 Jun 2019 11:09:17 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 4E8474F98;
	Fri, 28 Jun 2019 11:09:17 +0200 (CEST)
Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com
 [209.85.217.65]) by dpdk.org (Postfix) with ESMTP id 159EA4C8E
 for <dev@dpdk.org>; Fri, 28 Jun 2019 11:09:16 +0200 (CEST)
Received: by mail-vs1-f65.google.com with SMTP id l125so3545748vsl.13
 for <dev@dpdk.org>; Fri, 28 Jun 2019 02:09:16 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=tEgvrxv62MeIdfXSvnUp4zv1N2XX7tRjdgCkBB/YTRs=;
 b=eSaLXPPbKYvOHdm5LYvI6ZfE7AZ58JfaM7fJMcy1npdB0s4mrrTPU7c8HHuLav4PxA
 HwvtkWjol1Pj7X1L3jb+MM1l0hFcCzu2xx5Xk7wsF1/WSmFtg/BI16p22FyS9peJfVJm
 eYDYhDxF8jxrgXeVuDtEr8xp6UAwv1DujJd+4DEbHzRLa9MWzRGscR7xXioo6PDQHcZJ
 tjg4iTAWA98QuF/jUndip4UKCbVz20g9tYMrB61zu2Li0FAUl7Yr23LmGRCfzWgq8Ka8
 LjqETMLWHnJJGZKc4jOrNRJGYUb9GqvkUpiKTfknFXtg85ehRAGLNbhoiYssb6tqs539
 4iOA==
X-Gm-Message-State: APjAAAWb91rqzJIcF4U+S8wCxKlj1zciVEyNdsfhpkRuP54xK71yoN5P
 od5gTwJxbSKLkAYyFSaBv6B5uKSvZcVsWQ4G4r7Gxw==
X-Google-Smtp-Source: APXvYqx5cMhveOCr3D995cZ8eTjwVCMZFzoYvUY3St8aDAqwCeag2ZUHq1SoXjxpKZksXb+Rjpc3h8fudsthyVB+RPg=
X-Received: by 2002:a67:2ec8:: with SMTP id u191mr5945384vsu.39.1561712955460; 
 Fri, 28 Jun 2019 02:09:15 -0700 (PDT)
MIME-Version: 1.0
References: <20190628034406.5399-1-honnappa.nagarahalli@arm.com>
In-Reply-To: <20190628034406.5399-1-honnappa.nagarahalli@arm.com>
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 28 Jun 2019 11:09:04 +0200
Message-ID: <CAJFAV8xPFkG25tS7dKXAU_1FZhG8Y8Xuic0fQkCDdaGZ2YSBag@mail.gmail.com>
To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: dev <dev@dpdk.org>, ruifeng.wang@arm.com, nd <nd@arm.com>, 
 dpdk stable <stable@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: Re: [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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Fri, Jun 28, 2019 at 5:44 AM Honnappa Nagarahalli <
honnappa.nagarahalli@arm.com> wrote:

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


Weird I did not see this error in travis.
Just tried again:
https://travis-ci.com/david-marchand/dpdk/jobs/211768426



> Fixes: e6a14121f4ae ("test/rcu: remove arbitrary limit on max core count")
> Cc: stable@dpdk.org
>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
>  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;
>

If we want to be closer to the eal API, those should be unsigned int.



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


-- 
David Marchand