From: David Christensen <drc@linux.vnet.ibm.com>
To: dev@dpdk.org
Cc: sthemmin@microsoft.com, stable@dpdk.org,
David Christensen <drc@linux.vnet.ibm.com>
Subject: [dpdk-dev] [PATCH v2] eal/ppc: fix 64 bit atomic exchange operation
Date: Tue, 15 Oct 2019 14:16:14 -0700 [thread overview]
Message-ID: <20191015211614.123379-1-drc@linux.vnet.ibm.com> (raw)
In-Reply-To: <20191014230745.70489-1-drc@linux.vnet.ibm.com>
The rte_atomic64_exchange operation for ppc_64 incorrectly linked
back to a 32 bit generic operation (__atomic_exchange_4) rather than
the 64 bit generic operation (__atomic_exchange_8). As a result,
applications that used rte_eth_link_get_nowait() would only receive
the link speed, they would not receive the link state, link duplex,
or link autoneg properties.
Fixes: ff2863570f ("eal: introduce atomic exchange operation")
Cc: sthemmin@microsoft.com"
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
v2:
* Modified the subject line to better describe the change
lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
index b13a80de4..7e3e13118 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
@@ -401,7 +401,7 @@ static inline void rte_atomic64_clear(rte_atomic64_t *v)
static inline uint64_t
rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
{
- return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST);
+ return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST);
}
#endif
--
2.18.1
next prev parent reply other threads:[~2019-10-15 21:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 23:07 [dpdk-dev] [PATCH] eal: fix link status issue on ppc_64 David Christensen
2019-10-15 7:33 ` David Marchand
2019-10-15 20:50 ` David Christensen
2019-10-15 21:16 ` David Christensen [this message]
2019-10-16 15:10 ` [dpdk-dev] [dpdk-stable] [PATCH v2] eal/ppc: fix 64 bit atomic exchange operation David Marchand
2019-10-17 5:01 ` 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=20191015211614.123379-1-drc@linux.vnet.ibm.com \
--to=drc@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=sthemmin@microsoft.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).