DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Aaron Conole <aconole@redhat.com>
Cc: dev <dev@dpdk.org>, Phil Yang <phil.yang@arm.com>,
	Gavin Hu <gavin.hu@arm.com>,
	 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Subject: Re: [dpdk-dev] [PATCH] test/mcslock: wait for lcore completion
Date: Thu, 8 Aug 2019 08:58:06 +0200	[thread overview]
Message-ID: <CAJFAV8wmMaH1NjWV9q9zn_r=tt98pqDPX42HxbF_+bmdzm+Atw@mail.gmail.com> (raw)
In-Reply-To: <20190807145844.23670-1-aconole@redhat.com>

On Wed, Aug 7, 2019 at 4:58 PM Aaron Conole <aconole@redhat.com> wrote:
>
> 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
>

Reviewed-by: David Marchand <david.marchand@redhat.com>
Thanks.

-- 
David Marchand

      parent reply	other threads:[~2019-08-08  6:58 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)
2019-08-08 10:22   ` Thomas Monjalon
2019-08-08  6:58 ` David Marchand [this message]

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='CAJFAV8wmMaH1NjWV9q9zn_r=tt98pqDPX42HxbF_+bmdzm+Atw@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=phil.yang@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).