From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1EF9AA327F for ; Mon, 21 Oct 2019 21:20:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D54481BF00; Mon, 21 Oct 2019 21:20:03 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id DD4EF1BEB0 for ; Mon, 21 Oct 2019 21:20:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571685601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oL+58XO224OlAprUlDhivVVenrGDkAcKoTbG8Qcpdkg=; b=MXvT/ugdzX4HWTlptejgl/dqhv4SxiGJ38ox5esJysAIntUMQAUCcRVQSLmOZ0WRRnVIWE HqhvvFfSvKqrFVBrNCBX8/RqGxlAtWzE4924uQoakzho5CP1L2WeTAxyQPX7atozERKqTP XVI/BV5t+8cGs49nEOV87xpv25r3FZ8= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-295-XPcsYHHFPEWKJ2xUjXGWwA-1; Mon, 21 Oct 2019 15:20:00 -0400 Received: by mail-vk1-f198.google.com with SMTP id q70so1147330vke.3 for ; Mon, 21 Oct 2019 12:20:00 -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=cHP4E86g4KRqqDyIO12P17R0cSCZcPIl/MQmdwGoXGc=; b=dMbCC441N5dryVStjOrHNxe4aGiwclJifhuw8hDKN1ZGkLHcCmB9SY78hYUAzZBWXv gp2mbI2VigfHPd3BUYS/wndlx4SKMFRBSq4G6TtzzF0CNeW9elCTOAvOoRiEBGCm9Zpr oK2R/ih4urA3t4mcKhj5O23yYvuxZ880e2qM2PvApmvh8QMXFVGs1bJJfxOuTeFwKXSS WjkpbcDSUE4RHpIQc4BjwL37jk7GFeK6Rzs+A++NB+6MbpQtF8PvxfTd5Aw06Ar2NMm6 0NsyqqIWXtp29V11BDD2k90oi0ssLqVnQXUMVlhvmw61XB+xWqLvc7lnxbcx/ADeC3bJ 8nxw== X-Gm-Message-State: APjAAAXlN9BMJGp9gaWFz5tSYlE4tu+XN2s2aBGzEQZbYWHulW3vG7Gv lMqOOVrOyl7cIYAituxghNEsPCoWmGINHAGhTprQ7+DR3V/BudIZ1s3az6qb70gIVM1LVQgfKoX axTMYQrca+Yafng3lL8o= X-Received: by 2002:ab0:628f:: with SMTP id z15mr13742482uao.126.1571685599308; Mon, 21 Oct 2019 12:19:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLLN2BYEXuV3VyLEMeZ+mNskYugt0613yYG7Nq9yaIm/cSFN8d/IUkoeq3uvWWKg8mXU4n/xrHrUhFVIL2FcI= X-Received: by 2002:ab0:628f:: with SMTP id z15mr13742460uao.126.1571685598978; Mon, 21 Oct 2019 12:19:58 -0700 (PDT) MIME-Version: 1.0 References: <20191008211220.31586-1-honnappa.nagarahalli@arm.com> <20191008211220.31586-5-honnappa.nagarahalli@arm.com> In-Reply-To: <20191008211220.31586-5-honnappa.nagarahalli@arm.com> From: David Marchand Date: Mon, 21 Oct 2019 21:19:47 +0200 Message-ID: To: Honnappa Nagarahalli Cc: "Ananyev, Konstantin" , dev , "Ruifeng Wang (Arm Technology China)" , dpdk stable , nd X-MC-Unique: XPcsYHHFPEWKJ2xUjXGWwA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 4/7] test/rcu: use size_t instead of int 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" On Tue, Oct 8, 2019 at 11:12 PM Honnappa Nagarahalli wrote: > > Variables used to store the return value of rte_rcu_qsbr_get_memsize > in variables of type 'int'. The variables are of type 'size_t' now. Added a comment on the two cases we have here: the uint32_t storage are fine while the int ones were an issue. > > Fixes: b87089b0bb19 ("test/rcu: add API and functional tests") > Cc: stable@dpdk.org > > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Gavin Hu > --- > app/test/test_rcu_qsbr.c | 4 ++-- > app/test/test_rcu_qsbr_perf.c | 11 ++++++----- > 2 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c > index d1b9e46a2..2f71ec6ad 100644 > --- a/app/test/test_rcu_qsbr.c > +++ b/app/test/test_rcu_qsbr.c > @@ -52,7 +52,7 @@ static int > alloc_rcu(void) > { > int i; > - uint32_t sz; > + size_t sz; > > sz =3D rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE); > > @@ -81,7 +81,7 @@ free_rcu(void) > static int > test_rcu_qsbr_get_memsize(void) > { > - uint32_t sz; > + size_t sz; > > printf("\nTest rte_rcu_qsbr_thread_register()\n"); > > diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.= c > index cb2d177b7..280f1811f 100644 > --- a/app/test/test_rcu_qsbr_perf.c > +++ b/app/test/test_rcu_qsbr_perf.c > @@ -125,7 +125,7 @@ test_rcu_qsbr_writer_perf(void *arg) > static int > test_rcu_qsbr_perf(void) > { > - int sz; > + size_t sz; > unsigned int i, tmp_num_cores; > > writer_done =3D 0; > @@ -188,7 +188,7 @@ test_rcu_qsbr_perf(void) > static int > test_rcu_qsbr_rperf(void) > { > - int sz; > + size_t sz; > unsigned int i, tmp_num_cores; > > rte_atomic64_clear(&updates); > @@ -234,7 +234,7 @@ test_rcu_qsbr_rperf(void) > static int > test_rcu_qsbr_wperf(void) > { > - int sz; > + size_t sz; > unsigned int i; > > rte_atomic64_clear(&checks); > @@ -379,7 +379,7 @@ static int > test_rcu_qsbr_sw_sv_1qs(void) > { > uint64_t token, begin, cycles; > - int sz; > + size_t sz; > unsigned int i, j, tmp_num_cores; > int32_t pos; > > @@ -498,7 +498,8 @@ static int > test_rcu_qsbr_sw_sv_1qs_non_blocking(void) > { > uint64_t token, begin, cycles; > - int ret, sz; > + int ret; > + size_t sz; > unsigned int i, j, tmp_num_cores; > int32_t pos; > > -- > 2.17.1 > -- David Marchand