From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 07FBF37AF for ; Mon, 6 May 2019 21:24:12 +0200 (CEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x46JNDiV059598 for ; Mon, 6 May 2019 15:24:12 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sar9jq21j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 May 2019 15:24:12 -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 x46DNFWR021708 for ; Mon, 6 May 2019 13:28:17 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma01dal.us.ibm.com with ESMTP id 2s92c3vfk3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 May 2019 13:28:17 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x46JO9EV1966470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 May 2019 19:24:09 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4E636E04E; Mon, 6 May 2019 19:24:09 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7392B6E04C; Mon, 6 May 2019 19:24:09 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 6 May 2019 19:24:09 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Mon, 6 May 2019 14:24:07 -0500 Message-Id: <1557170647-99966-1-git-send-email-drc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-06_11:, , 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=841 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905060160 Subject: [dpdk-dev] [PATCH v2 4/4] test: fix memory barrier test failure on power CPUs 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: , X-List-Received-Date: Mon, 06 May 2019 19:24:13 -0000 The memory barrier test fails on IBM Power 9 systems. Add additional barriers to accommodate the weakly ordered model used on Power CPUs. Signed-off-by: David Christensen --- v2: * Removed ifdef's for PPC since the rte_smp_*mb() macros are already customized for each CPU architecture app/test/test_barrier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index a022708..0bf82cf 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -92,12 +92,14 @@ struct lcore_plock_test { other = self ^ 1; l->flag[self] = 1; + rte_smp_wmb(); l->victim = self; store_load_barrier(l->utype); while (l->flag[other] == 1 && l->victim == self) rte_pause(); + rte_smp_rmb(); } static void -- 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 1E411A0096 for ; Mon, 6 May 2019 21:24:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DCE3337AF; Mon, 6 May 2019 21:24:14 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 07FBF37AF for ; Mon, 6 May 2019 21:24:12 +0200 (CEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x46JNDiV059598 for ; Mon, 6 May 2019 15:24:12 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sar9jq21j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 May 2019 15:24:12 -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 x46DNFWR021708 for ; Mon, 6 May 2019 13:28:17 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma01dal.us.ibm.com with ESMTP id 2s92c3vfk3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 06 May 2019 13:28:17 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x46JO9EV1966470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 May 2019 19:24:09 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4E636E04E; Mon, 6 May 2019 19:24:09 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7392B6E04C; Mon, 6 May 2019 19:24:09 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 6 May 2019 19:24:09 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Mon, 6 May 2019 14:24:07 -0500 Message-Id: <1557170647-99966-1-git-send-email-drc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-06_11:, , 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=841 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905060160 Subject: [dpdk-dev] [PATCH v2 4/4] test: fix memory barrier test failure on power CPUs 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190506192407.RWRqk5tIgtY4l-x7oABJp95ivu3DhpNK_S27AOlUo4E@z> The memory barrier test fails on IBM Power 9 systems. Add additional barriers to accommodate the weakly ordered model used on Power CPUs. Signed-off-by: David Christensen --- v2: * Removed ifdef's for PPC since the rte_smp_*mb() macros are already customized for each CPU architecture app/test/test_barrier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index a022708..0bf82cf 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -92,12 +92,14 @@ struct lcore_plock_test { other = self ^ 1; l->flag[self] = 1; + rte_smp_wmb(); l->victim = self; store_load_barrier(l->utype); while (l->flag[other] == 1 && l->victim == self) rte_pause(); + rte_smp_rmb(); } static void -- 1.8.3.1