From: "Phil Yang (Arm Technology China)" <Phil.Yang@arm.com>
To: Aaron Conole <aconole@redhat.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
nd <nd@arm.com>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH] test/mcslock: wait for lcore completion
Date: Thu, 8 Aug 2019 03:44:41 +0000 [thread overview]
Message-ID: <VE1PR08MB464056655B5D6B9E40E1FC31E9D70@VE1PR08MB4640.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20190807145844.23670-1-aconole@redhat.com>
> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Wednesday, August 7, 2019 10:59 PM
> To: dev@dpdk.org
> Cc: Phil Yang (Arm Technology China) <Phil.Yang@arm.com>; Gavin Hu (Arm
> Technology China) <Gavin.Hu@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>
> Subject: [PATCH] test/mcslock: wait for lcore completion
>
> It's possible that the mcsunlock occurs before the test_mcslock_try has
> a chance to execute, which will result in the trylock being successful,
> making the test case fail. Fix this by waiting until all lcores have
> completed their test before unlocking the master lock.
>
> Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")
> Cc: Phil Yang <phil.yang@arm.com>
> Cc: Gavin Hu <gavin.hu@arm.com>
> Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
> app/test/test_mcslock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
> index ed384b81d..e9359df2e 100644
> --- a/app/test/test_mcslock.c
> +++ b/app/test/test_mcslock.c
> @@ -225,8 +225,8 @@ test_mcslock(void)
> RTE_LCORE_FOREACH_SLAVE(i) {
> rte_eal_remote_launch(test_mcslock_try, NULL, i);
> }
> - rte_mcslock_unlock(&p_ml_try, &ml_try_me);
> rte_eal_mp_wait_lcore();
> + rte_mcslock_unlock(&p_ml_try, &ml_try_me);
>
> /* Test is_locked API */
> if (rte_mcslock_is_locked(p_ml)) {
> --
> 2.21.0
Thanks for the patch.
Acked-by: Phil Yang <phil.yang@arm.com>
next prev parent reply other threads:[~2019-08-08 3:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 14:58 Aaron Conole
2019-08-08 3:44 ` Phil Yang (Arm Technology China) [this message]
2019-08-08 10:22 ` Thomas Monjalon
2019-08-08 6:58 ` David Marchand
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=VE1PR08MB464056655B5D6B9E40E1FC31E9D70@VE1PR08MB4640.eurprd08.prod.outlook.com \
--to=phil.yang@arm.com \
--cc=Gavin.Hu@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=aconole@redhat.com \
--cc=dev@dpdk.org \
--cc=nd@arm.com \
/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).