From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: David Marchand <david.marchand@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
nd <nd@arm.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] test/rcu: use existing lcore API
Date: Wed, 15 May 2019 20:04:46 +0000 [thread overview]
Message-ID: <VE1PR08MB51492E300730DBB88A5AE76898090@VE1PR08MB5149.eurprd08.prod.outlook.com> (raw)
Message-ID: <20190515200446.ILZrmjfb1JBv7InT5J3ot4jM998CdWI5BHviKuKYD0M@z> (raw)
In-Reply-To: <1557907020-1548-2-git-send-email-david.marchand@redhat.com>
>
> Prefer the existing apis rather than direct access lcore_config that is going to
> disappear.
>
> Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> app/test/test_rcu_qsbr.c | 22 ++++++++++------------
> app/test/test_rcu_qsbr_perf.c | 12 ++++--------
> 2 files changed, 14 insertions(+), 20 deletions(-)
>
> diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index
> ed6934a..92ab0c2 100644
> --- a/app/test/test_rcu_qsbr.c
> +++ b/app/test/test_rcu_qsbr.c
> @@ -853,11 +853,10 @@
> hash_data[0][6] = NULL;
>
> writer_done = 1;
> - /* Wait until all readers have exited */
> - rte_eal_mp_wait_lcore();
> - /* Check return value from threads */
> +
> + /* Wait and check return value from reader threads */
> for (i = 0; i < 4; i++)
> - if (lcore_config[enabled_core_ids[i]].ret < 0)
> + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> goto error;
> rte_hash_free(h[0]);
> rte_free(keys);
> @@ -913,17 +912,16 @@
> rte_eal_remote_launch(test_rcu_qsbr_writer,
> (void *)(uintptr_t)(i - (test_cores / 2)),
> enabled_core_ids[i]);
> - /* Wait for writers to complete */
> + /* Wait and check return value from writer threads */
> for (i = test_cores / 2; i < test_cores; i++)
> - rte_eal_wait_lcore(enabled_core_ids[i]);
> + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> + goto error;
>
> writer_done = 1;
> - /* Wait for readers to complete */
> - rte_eal_mp_wait_lcore();
>
> - /* Check return value from threads */
> - for (i = 0; i < test_cores; i++)
> - if (lcore_config[enabled_core_ids[i]].ret < 0)
> + /* Wait and check return value from reader threads */
> + for (i = 0; i < test_cores / 2; i++)
> + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> goto error;
>
> for (i = 0; i < num_cores / 4; i++)
> @@ -935,7 +933,7 @@
>
> error:
> writer_done = 1;
> - /* Wait until all readers have exited */
> + /* Wait until all readers and writers have exited */
> rte_eal_mp_wait_lcore();
>
> for (i = 0; i < num_cores / 4; i++)
> diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c
> index 16a43f8..6b1912c 100644
> --- a/app/test/test_rcu_qsbr_perf.c
> +++ b/app/test/test_rcu_qsbr_perf.c
> @@ -473,11 +473,9 @@
>
> writer_done = 1;
>
> - /* Wait until all readers have exited */
> - rte_eal_mp_wait_lcore();
> - /* Check return value from threads */
> + /* Wait and check return value from reader threads */
> for (i = 0; i < num_cores; i++)
> - if (lcore_config[enabled_core_ids[i]].ret < 0)
> + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> goto error;
> rte_hash_free(h[0]);
> rte_free(keys);
> @@ -587,11 +585,9 @@
> rte_atomic64_add(&checks, i);
>
> writer_done = 1;
> - /* Wait until all readers have exited */
> - rte_eal_mp_wait_lcore();
> - /* Check return value from threads */
> + /* Wait and check return value from reader threads */
> for (i = 0; i < num_cores; i++)
> - if (lcore_config[enabled_core_ids[i]].ret < 0)
> + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
> goto error;
> rte_hash_free(h[0]);
> rte_free(keys);
> --
> 1.8.3.1
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
next prev parent reply other threads:[~2019-05-15 20:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 7:56 [dpdk-dev] [PATCH 1/2] test/hash: " David Marchand
2019-05-15 7:56 ` David Marchand
2019-05-15 7:57 ` [dpdk-dev] [PATCH 2/2] test/rcu: " David Marchand
2019-05-15 7:57 ` David Marchand
2019-05-15 12:19 ` Maxime Coquelin
2019-05-15 12:19 ` Maxime Coquelin
2019-05-15 20:04 ` Honnappa Nagarahalli [this message]
2019-05-15 20:04 ` Honnappa Nagarahalli
2019-05-15 12:14 ` [dpdk-dev] [PATCH 1/2] test/hash: " Maxime Coquelin
2019-05-15 12:14 ` Maxime Coquelin
2019-05-22 0:16 ` Wang, Yipeng1
2019-05-22 12:40 ` David Marchand
2019-05-22 15:06 ` [dpdk-dev] [PATCH v2 " David Marchand
2019-05-22 15:06 ` [dpdk-dev] [PATCH v2 2/2] test/rcu: " David Marchand
2019-05-23 14:20 ` Maxime Coquelin
2019-05-29 22:41 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-05-22 16:26 ` [dpdk-dev] [PATCH v2 1/2] test/hash: " Dharmik Thakkar
2019-05-22 17:17 ` David Marchand
2019-05-22 19:37 ` Dharmik Thakkar
2019-05-27 10:15 ` David Marchand
2019-05-28 14:15 ` Dharmik Thakkar
2019-05-23 12:48 ` Maxime Coquelin
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=VE1PR08MB51492E300730DBB88A5AE76898090@VE1PR08MB5149.eurprd08.prod.outlook.com \
--to=honnappa.nagarahalli@arm.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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).