summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Christensen <drc@linux.vnet.ibm.com>2019-10-15 14:16:14 -0700
committerDavid Marchand <david.marchand@redhat.com>2019-10-17 06:59:11 +0200
commit72e69d801b235f40b6c71a7d4f6087e2fa5b02dc (patch)
treeda0d0ac2fd6a020539b55f780eba18f02e4c7062
parentc3a90c381daa68a0ea65906ad15bc96c247ac5cd (diff)
downloaddpdk-next-eventdev-72e69d801b235f40b6c71a7d4f6087e2fa5b02dc.zip
dpdk-next-eventdev-72e69d801b235f40b6c71a7d4f6087e2fa5b02dc.tar.gz
dpdk-next-eventdev-72e69d801b235f40b6c71a7d4f6087e2fa5b02dc.tar.xz
eal/ppc: fix 64-bit atomic exchange operation
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: ff2863570fcc ("eal: introduce atomic exchange operation") Cc: stable@dpdk.org Signed-off-by: David Christensen <drc@linux.vnet.ibm.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
-rw-r--r--lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h2
1 files changed, 1 insertions, 1 deletions
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 b13a80d..7e3e131 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