From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: Christian Ehrhardt <christian.ehrhardt@canonical.com>, stable@dpdk.org
Cc: dev <dev@dpdk.org>
Subject: Re: [PATCH] eal: fix bug in x86 cmpset
Date: Thu, 29 Sep 2016 18:46:15 +0530 [thread overview]
Message-ID: <57ED141F.8020302@intel.com> (raw)
In-Reply-To: <CAATJJ0+nzVxgxygDRhvjw=7CX2FCxbadoNO-hw8Yk6XALtL1Eg@mail.gmail.com>
On 9/29/2016 6:35 PM, Christian Ehrhardt wrote:
> The patch misses a fixed: line which it should get I think.
The bug has existed from the day the DPDK was open-sourced, i.e, there wasn't a specific
commit that introduced this feature/bug, hence wasn't sure if it needed the fixes tag.
>
> But in general If applied -> stable for this one?
>
Yes.
>
> On Thu, Sep 29, 2016 at 11:24 PM, Nikhil Rao <nikhil.rao@intel.com <mailto:nikhil.rao@intel.com>> wrote:
>
> The original code used movl instead of xchgl, this caused
> rte_atomic64_cmpset to use ebx as the lower dword of the source
> to cmpxchg8b instead of the lower dword of function argument "src".
>
> Reported-by: Job Abraham <job.abraham@intel.com <mailto:job.abraham@intel.com>>
> Tested-by: Job Abraham <job.abraham@intel.com <mailto:job.abraham@intel.com>>
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com <mailto:nikhil.rao@intel.com>>
> ---
> lib/librte_eal/common/include/arch/x86/rte_atomic_32.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
> index 2e04c75..fb3abf1 100644
> --- a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
> +++ b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h
> @@ -81,7 +81,7 @@ rte_atomic64_cmpset(volatile uint64_t *dst, uint64_t exp, uint64_t src)
> : "memory" ); /* no-clobber list */
> #else
> asm volatile (
> - "mov %%ebx, %%edi\n"
> + "xchgl %%ebx, %%edi;\n"
> MPLOCKED
> "cmpxchg8b (%[dst]);"
> "setz %[res];"
> --
> 2.7.4
>
>
>
>
> --
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
next prev parent reply other threads:[~2016-09-29 13:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-29 21:24 [PATCH] eal: fix bug in x86 cmpset Nikhil Rao
2016-09-29 13:05 ` Christian Ehrhardt
2016-09-29 13:16 ` Rao, Nikhil [this message]
2016-09-29 14:21 ` Thomas Monjalon
2016-09-29 16:34 ` Thomas Monjalon
2016-11-06 21:09 ` Thomas Monjalon
2017-02-09 16:53 ` Thomas Monjalon
2017-02-10 10:39 ` Hunt, David
2017-02-10 10:53 ` Thomas Monjalon
2017-02-10 11:56 ` Hunt, David
2017-02-10 16:46 ` Stephen Hemminger
2017-03-09 15:39 ` Thomas Monjalon
2017-09-04 13:02 ` Bruce Richardson
2017-09-04 13:06 ` Bruce Richardson
2017-10-26 22:03 ` Thomas Monjalon
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=57ED141F.8020302@intel.com \
--to=nikhil.rao@intel.com \
--cc=christian.ehrhardt@canonical.com \
--cc=dev@dpdk.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.