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 0E143A046B for ; Mon, 24 Jun 2019 17:09:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 370881BD4A; Mon, 24 Jun 2019 17:09:58 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2DD971BCDA for ; Mon, 24 Jun 2019 17:09:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 08:09:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,412,1557212400"; d="scan'208";a="163347137" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 24 Jun 2019 08:09:53 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 08:09:53 -0700 Received: from fmsmsx108.amr.corp.intel.com ([169.254.9.149]) by FMSMSX152.amr.corp.intel.com ([169.254.6.192]) with mapi id 14.03.0439.000; Mon, 24 Jun 2019 08:09:53 -0700 From: "Eads, Gage" To: Phil Yang , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "Honnappa.Nagarahalli@arm.com" , "gavin.hu@arm.com" , "nd@arm.com" Thread-Topic: [PATCH v2 2/3] test/atomic: add 128b compare and swap test Thread-Index: AQHVKXIG/2nRcztZ9UeNgfkP+y4YR6aq5WVg Date: Mon, 24 Jun 2019 15:09:53 +0000 Message-ID: <9184057F7FC11744A2107296B6B8EB1E68D00EA3@FMSMSX108.amr.corp.intel.com> References: <1561257671-10316-1-git-send-email-phil.yang@arm.com> <1561259746-12611-1-git-send-email-phil.yang@arm.com> <1561259746-12611-2-git-send-email-phil.yang@arm.com> In-Reply-To: <1561259746-12611-2-git-send-email-phil.yang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTZkYWY3NjMtODNjYi00MmY4LWI1ZTYtM2E5M2FjNDBkODllIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieTBcLzE5emx2Snh3OTNxQkJHMjhcL1FEYmNNYmFIaGhxcEJRa0JsNlM0VzZGR1RWWVVpWXdYcUpiUCtBdTJjSHZ2In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/3] test/atomic: add 128b compare and swap test 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" Hi Phil, Looks good overall, just a few documentation issues. > + * > + * - Test "128b compare and swap" (aarch64 and x86_64 only) > + * > + * - Initialize 128-bit atomic variables to zero. > + * > + * - Invoke ``test_atomici128_cmp_exchange()`` on each lcore. Before > doing > + * anything else, the cores are waiting a synchro. Each lcore does > + * these compare and swap (CAS) operations several times:: > + * > + * Relaxed CAS update counter.val[0] + 2; counter.val[0] + 1; > + * Acquired CAS update counter.val[0] + 2; counter.val[0] + 1; > + * Released CAS update counter.val[0] + 2; counter.val[0] + 1; > + * Acquired_Released CAS update counter.val[0] + 2; counter.val[0]= + 1; The array index in "counter.val[0] + 1", is incorrect, I believe. Just a nitpick, but "Relaxed CAS update" can go last to match the order in = the code. > +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_ARM64) > +/* > + * rte_atomic128_cmp_exchange() should update a 128 bits counter's > +first 64 > + * bits by 2 and the second 64 bits by 1 in this test. It should return > +true > + * if the compare exchange operation successful. "operation successful" -> "operation is successful" > + * This test repeat 128 bits compare and swap operations 10K rounds. In > +each "repeat" -> "repeats" Thanks, Gage