From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id E29EF58EC for ; Wed, 1 May 2019 00:33:30 +0200 (CEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3UMQsZ9034951 for ; Tue, 30 Apr 2019 18:33:30 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s6xh59p8x-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 30 Apr 2019 18:33:29 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Apr 2019 23:33:28 +0100 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 30 Apr 2019 23:33:27 +0100 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3UMXQ4k35848314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2019 22:33:26 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B47DAC05F; Tue, 30 Apr 2019 22:33:26 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CACEAC059; Tue, 30 Apr 2019 22:33:26 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 30 Apr 2019 22:33:25 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Tue, 30 Apr 2019 17:33:23 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19043022-2213-0000-0000-00000384890F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011025; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01196744; UDB=6.00627628; IPR=6.00977594; MB=3.00026674; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-30 22:33:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19043022-2214-0000-0000-00005E3D5C6D Message-Id: <1556663603-39934-1-git-send-email-drc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-30_12:, , 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=789 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904300132 Subject: [dpdk-dev] [PATCH 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: Tue, 30 Apr 2019 22:33:31 -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 --- app/test/test_barrier.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index 58a3280..6136ee1 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -36,7 +36,7 @@ #include "test.h" #define ADD_MAX 8 -#define ITER_MAX 0x100000000 +#define ITER_MAX 0x1000000 enum plock_use_type { USE_MB, @@ -92,12 +92,19 @@ struct lcore_plock_test { other = self ^ 1; l->flag[self] = 1; +#ifdef RTE_ARCH_PPC_64 + rte_smp_wmb(); +#endif l->victim = self; store_load_barrier(l->utype); while (l->flag[other] == 1 && l->victim == self) rte_pause(); + +#ifdef RTE_ARCH_PPC_64 + rte_smp_rmb(); +#endif } 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 EB64BA0679 for ; Wed, 1 May 2019 00:33:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C482758F6; Wed, 1 May 2019 00:33:31 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id E29EF58EC for ; Wed, 1 May 2019 00:33:30 +0200 (CEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3UMQsZ9034951 for ; Tue, 30 Apr 2019 18:33:30 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s6xh59p8x-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 30 Apr 2019 18:33:29 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Apr 2019 23:33:28 +0100 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 30 Apr 2019 23:33:27 +0100 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3UMXQ4k35848314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2019 22:33:26 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B47DAC05F; Tue, 30 Apr 2019 22:33:26 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CACEAC059; Tue, 30 Apr 2019 22:33:26 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 30 Apr 2019 22:33:25 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Tue, 30 Apr 2019 17:33:23 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19043022-2213-0000-0000-00000384890F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011025; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01196744; UDB=6.00627628; IPR=6.00977594; MB=3.00026674; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-30 22:33:28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19043022-2214-0000-0000-00005E3D5C6D Message-Id: <1556663603-39934-1-git-send-email-drc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-30_12:, , 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=789 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904300132 Subject: [dpdk-dev] [PATCH 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: <20190430223323.9iYX2QRpk-rB3boRVuzs-ec0wah8-SyYgKgiTEzZ_QM@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 --- app/test/test_barrier.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index 58a3280..6136ee1 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -36,7 +36,7 @@ #include "test.h" #define ADD_MAX 8 -#define ITER_MAX 0x100000000 +#define ITER_MAX 0x1000000 enum plock_use_type { USE_MB, @@ -92,12 +92,19 @@ struct lcore_plock_test { other = self ^ 1; l->flag[self] = 1; +#ifdef RTE_ARCH_PPC_64 + rte_smp_wmb(); +#endif l->victim = self; store_load_barrier(l->utype); while (l->flag[other] == 1 && l->victim == self) rte_pause(); + +#ifdef RTE_ARCH_PPC_64 + rte_smp_rmb(); +#endif } static void -- 1.8.3.1