patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	dev <dev@dpdk.org>,
	 "Ruifeng Wang (Arm Technology China)" <ruifeng.wang@arm.com>,
	dpdk stable <stable@dpdk.org>, nd <nd@arm.com>
Subject: Re: [dpdk-stable] [PATCH v2 4/7] test/rcu: use size_t instead of int
Date: Mon, 21 Oct 2019 21:19:47 +0200	[thread overview]
Message-ID: <CAJFAV8xY0WA-HSoXiqdRac0NhHdmDkHskfTToux=AMea1_129w@mail.gmail.com> (raw)
In-Reply-To: <20191008211220.31586-5-honnappa.nagarahalli@arm.com>

On Tue, Oct 8, 2019 at 11:12 PM Honnappa Nagarahalli
<honnappa.nagarahalli@arm.com> 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 <honnappa.nagarahalli@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> ---
>  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 = 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 = 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


  reply	other threads:[~2019-10-21 19:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 21:12 [dpdk-stable] [PATCH 0/7] typo, doc, simple fixes and some optimizations Honnappa Nagarahalli
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 1/7] doc/rcu: fix typos Honnappa Nagarahalli
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 2/7] doc/rcu: correct the limitation on number of threads Honnappa Nagarahalli
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 3/7] doc/rcu: add information about storing token and resource Honnappa Nagarahalli
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 4/7] test/rcu: use size_t instead of int Honnappa Nagarahalli
2019-10-21 19:19   ` David Marchand [this message]
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 5/7] test/rcu: use correct nomenclature while printing results Honnappa Nagarahalli
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 6/7] lib/rcu: add least acknowledged token optimization Honnappa Nagarahalli
2019-10-08 21:12 ` [dpdk-stable] [PATCH v2 7/7] lib/rcu: update QS only when there are updates from writer Honnappa Nagarahalli
2019-10-18  9:57 ` [dpdk-stable] [PATCH] rcu: fix reference to offline function David Marchand
2019-10-18 13:58   ` Honnappa Nagarahalli
2019-10-21 19:25     ` David Marchand
2019-10-21 19:19 ` [dpdk-stable] [PATCH 0/7] typo, doc, simple fixes and some optimizations David Marchand
2019-10-21 19:39   ` Honnappa Nagarahalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8xY0WA-HSoXiqdRac0NhHdmDkHskfTToux=AMea1_129w@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).