From patchwork Wed May 8 21:02:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Christensen X-Patchwork-Id: 53329 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A869234F0; Wed, 8 May 2019 23:02:21 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 437E0DE3 for ; Wed, 8 May 2019 23:02:20 +0200 (CEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x48KxEfF020009 for ; Wed, 8 May 2019 17:02:19 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0b-001b2d01.pphosted.com with ESMTP id 2sc6mqg7q5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 May 2019 17:02:18 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 May 2019 22:02:12 +0100 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 8 May 2019 22:02:11 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x48L2ALf14746038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2019 21:02:10 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82015C605A; Wed, 8 May 2019 21:02:10 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AE43C6061; Wed, 8 May 2019 21:02:10 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 8 May 2019 21:02:10 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Wed, 8 May 2019 16:02:08 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19050821-0012-0000-0000-00001733D131 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011072; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01200514; UDB=6.00629910; IPR=6.00981400; MB=3.00026797; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-08 21:02:12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050821-0013-0000-0000-000057300F91 Message-Id: <1557349328-25783-1-git-send-email-drc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-08_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=563 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080127 Subject: [dpdk-dev] [PATCH v3 1/4] test: fix typo in print statement 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" Change "much" to "match" in a printf. Signed-off-by: David Christensen --- v2: * None v3: * None app/test/test_barrier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index 82b572c..c219d56 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -252,7 +252,7 @@ struct lcore_plock_test { /* race condition occurred, lock doesn't work properly */ if (sum[i] != pt[i].val || 2 * iter != pt[i].iter) { - printf("error: local and shared sums don't much\n"); + printf("error: local and shared sums don't match\n"); rc = -1; } } From patchwork Wed May 8 21:02:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Christensen X-Patchwork-Id: 53330 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AAFB493D; Wed, 8 May 2019 23:02:27 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 1DD283977 for ; Wed, 8 May 2019 23:02:26 +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 x48Kr76N016674 for ; Wed, 8 May 2019 17:02:25 -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 2sc6289ssc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 May 2019 17:02:24 -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 x48EwEbH012142 for ; Wed, 8 May 2019 15:06:32 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma01dal.us.ibm.com with ESMTP id 2s92c40f0a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 May 2019 15:06:32 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x48L2Lxi31654078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2019 21:02:21 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B912A28059; Wed, 8 May 2019 21:02:21 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7EE2428065; Wed, 8 May 2019 21:02:21 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 May 2019 21:02:21 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Wed, 8 May 2019 16:02:19 -0500 Message-Id: <1557349339-25926-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-08_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=784 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080127 Subject: [dpdk-dev] [PATCH v3 2/4] test: verify calloc succeeded for sum variable 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" Code tested calloc failures for pt & lpt variables but not for the sum variable. Add a test for calloc failure of sum. Signed-off-by: David Christensen --- v3: * No changes v2: * Removed change to ITER_MAX --- app/test/test_barrier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index c219d56..ae37b1e 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -202,7 +202,7 @@ struct lcore_plock_test { printf("%s(iter=%u, utype=%u) started on %u lcores\n", __func__, iter, utype, n); - if (pt == NULL || lpt == NULL) { + if (pt == NULL || lpt == NULL || sum == NULL) { printf("%s: failed to allocate memory for %u lcores\n", __func__, n); free(pt); From patchwork Wed May 8 21:02:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Christensen X-Patchwork-Id: 53331 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C1C284C90; Wed, 8 May 2019 23:02:41 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 6CFB64C8F for ; Wed, 8 May 2019 23:02:40 +0200 (CEST) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x48Kr5ve033862 for ; Wed, 8 May 2019 17:02:39 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sc5j7u1xt-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 May 2019 17:02:38 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 May 2019 22:02:37 +0100 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 8 May 2019 22:02:35 +0100 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x48L2YER37879914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2019 21:02:34 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 94481124053; Wed, 8 May 2019 21:02:34 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66772124052; Wed, 8 May 2019 21:02:34 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 May 2019 21:02:34 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Wed, 8 May 2019 16:02:32 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19050821-0064-0000-0000-000003DBB949 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011072; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01200514; UDB=6.00629910; IPR=6.00981401; MB=3.00026797; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-08 21:02:36 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050821-0065-0000-0000-00003D651C98 Message-Id: <1557349352-26070-1-git-send-email-drc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-08_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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080127 Subject: [dpdk-dev] [PATCH v3 3/4] test: change memory barrier variables to uint64_t 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" Memory barrier failures can be intermittent. Increase the size of the sum/val/iteration variables to allow tests that can run for days so that sporadic errors can be identified. Signed-off-by: David Christensen Acked-by: Konstantin Ananyev --- v2: * Removed change to ITER_MAX v3: * None --- app/test/test_barrier.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index ae37b1e..a0b4704 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -55,8 +55,8 @@ struct plock { */ struct plock_test { struct plock lock; - uint32_t val; - uint32_t iter; + uint64_t val; + uint64_t iter; }; /* @@ -65,8 +65,8 @@ struct plock_test { */ struct lcore_plock_test { struct plock_test *pt[2]; /* shared, lock-protected data */ - uint32_t sum[2]; /* local copy of the shared data */ - uint32_t iter; /* number of iterations to perfom */ + uint64_t sum[2]; /* local copy of the shared data */ + uint64_t iter; /* number of iterations to perfom */ uint32_t lc; /* given lcore id */ }; @@ -130,7 +130,8 @@ struct lcore_plock_test { plock_test1_lcore(void *data) { uint64_t tm; - uint32_t i, lc, ln, n; + uint32_t lc, ln; + uint64_t i, n; struct lcore_plock_test *lpt; lpt = data; @@ -166,9 +167,9 @@ struct lcore_plock_test { tm = rte_get_timer_cycles() - tm; - printf("%s(%u): %u iterations finished, in %" PRIu64 + printf("%s(%u): %" PRIu64 " iterations finished, in %" PRIu64 " cycles, %#Lf cycles/iteration, " - "local sum={%u, %u}\n", + "local sum={%" PRIu64 ", %" PRIu64 "}\n", __func__, lc, i, tm, (long double)tm / i, lpt->sum[0], lpt->sum[1]); return 0; @@ -184,11 +185,11 @@ struct lcore_plock_test { * and local data are the same. */ static int -plock_test(uint32_t iter, enum plock_use_type utype) +plock_test(uint64_t iter, enum plock_use_type utype) { int32_t rc; uint32_t i, lc, n; - uint32_t *sum; + uint64_t *sum; struct plock_test *pt; struct lcore_plock_test *lpt; @@ -199,7 +200,7 @@ struct lcore_plock_test { lpt = calloc(n, sizeof(*lpt)); sum = calloc(n + 1, sizeof(*sum)); - printf("%s(iter=%u, utype=%u) started on %u lcores\n", + printf("%s(iter=%" PRIu64 ", utype=%u) started on %u lcores\n", __func__, iter, utype, n); if (pt == NULL || lpt == NULL || sum == NULL) { @@ -247,7 +248,7 @@ struct lcore_plock_test { rc = 0; for (i = 0; i != n; i++) { - printf("%s: sum[%u]=%u, pt[%u].val=%u, pt[%u].iter=%u;\n", + printf("%s: sum[%u]=%" PRIu64 ", pt[%u].val=%" PRIu64 ", pt[%u].iter=%" PRIu64 ";\n", __func__, i, sum[i], i, pt[i].val, i, pt[i].iter); /* race condition occurred, lock doesn't work properly */ From patchwork Wed May 8 21:02:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Christensen X-Patchwork-Id: 53332 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6897E4CC3; Wed, 8 May 2019 23:02:51 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 502F34C8F for ; Wed, 8 May 2019 23:02:50 +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 x48Kr6p5016580 for ; Wed, 8 May 2019 17:02:49 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sc6289u4x-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 May 2019 17:02:49 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 May 2019 22:02:48 +0100 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 8 May 2019 22:02:46 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x48L2jSI27984006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 May 2019 21:02:45 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B3A7DB2065; Wed, 8 May 2019 21:02:45 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B5FFB2064; Wed, 8 May 2019 21:02:45 +0000 (GMT) Received: from oprom9.localdomain (unknown [9.40.204.34]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 May 2019 21:02:45 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: David Christensen Date: Wed, 8 May 2019 16:02:43 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 19050821-0064-0000-0000-000003DBB94C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011072; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01200514; UDB=6.00629910; IPR=6.00981401; MB=3.00026797; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-08 21:02:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050821-0065-0000-0000-00003D651CC6 Message-Id: <1557349363-26213-1-git-send-email-drc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-08_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=773 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905080127 Subject: [dpdk-dev] [PATCH v3 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" 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 v3: * None --- 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 a0b4704..43b5f62 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