From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEDE1A3166 for ; Tue, 15 Oct 2019 23:16:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1722A1EBCD; Tue, 15 Oct 2019 23:16:22 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 155B11EBCB; Tue, 15 Oct 2019 23:16:19 +0200 (CEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9FL6olh009453; Tue, 15 Oct 2019 17:16:18 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vnkcacwhw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Oct 2019 17:16:18 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x9FLD06c020103; Tue, 15 Oct 2019 21:16:18 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma01dal.us.ibm.com with ESMTP id 2vk6f7ec9g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Oct 2019 21:16:17 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9FLGH0Q53936636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Oct 2019 21:16:17 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1435F124058; Tue, 15 Oct 2019 21:16:17 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F0D2912405B; Tue, 15 Oct 2019 21:16:16 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.224.51]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 15 Oct 2019 21:16:16 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: sthemmin@microsoft.com, stable@dpdk.org, David Christensen Date: Tue, 15 Oct 2019 14:16:14 -0700 Message-Id: <20191015211614.123379-1-drc@linux.vnet.ibm.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20191014230745.70489-1-drc@linux.vnet.ibm.com> References: <20191014230745.70489-1-drc@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-10-15_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=868 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910150182 Subject: [dpdk-dev] [PATCH v2] eal/ppc: fix 64 bit atomic exchange operation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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