From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0049.outbound.protection.outlook.com [104.47.34.49]) by dpdk.org (Postfix) with ESMTP id 3BFEB3777 for ; Wed, 4 Jan 2017 11:09:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZrRAoRiVvJ3WtBonRRczidJAppiRv/oX9USF1r/EIOo=; b=CGAw+QJKryjlH68Jua5558djtCtP8hpfxaiKhBuren8geEgfcvo12bO61NdZ9G1nN06MGQb3xZFdVXBBtgQsqJR0/Qi69//8ruT6oUMmJ/9xYA8vFurKimQr0sUeuc1Pt3uK8RLPklJ2t/ljgkqLg1HdJPeEyREFRFYuNF7E+2s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.172.178.75) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Wed, 4 Jan 2017 10:09:32 +0000 Date: Wed, 4 Jan 2017 15:39:14 +0530 From: Jerin Jacob To: Jianbo Liu CC: , "Ananyev, Konstantin" , Thomas Monjalon , Bruce Richardson , Jan Viktorin , Santosh Shukla Message-ID: <20170104100912.GB6578@localhost.localdomain> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-15-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.172.178.75] X-ClientProxiedBy: PN1PR01CA0045.INDPRD01.PROD.OUTLOOK.COM (10.164.136.145) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: 496372a7-0970-4e21-95c7-08d43489c95b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:HG5j0lhNLUY4IYDFsaBzPDMJjh+Wxbg/Z7T7tbNY6+gOXxcJs8fXOwyGcWSVB5tjP1n87Ml2Fh2I+gW8Bto9SuSGmd6GvSPruS9HLW5rDCwU9FUnolowmdzs6iXrP2VdVCI+Huj4+wQqLyFXzWrF6Abxaf6CblE13Q2qxyPxdatA+pDCF6HJMvx/FHICKMDO+mdG9Ee9fIzDPeAVx2AfLmGFWq/MxjU4liHagc+0alQ9HvIOr6Blwwg6iL9zJTl+0EEn40rWJlqjNAz53xazjg==; 25:VLpGTA+UzsxC2I59ilCYcPIaWYUDLHmsEC6s4eywuVQ6n1n2Cils3jZc000CVqF4ZicFydEsHa2Hh/mAtTStc3KmmBExvVUj6IOGFFZMr7+tCHaKo6j1R4XtkSfJn+Td/UuwJA2RWaPv8q5SM2USR2qMiuS4f0jO2TKWDkTp4oCiTJAue7pb1+t61tQIi1U6YHvg6QXq7v82FRjY75YxYP6P1GemH+PnxieNdEGtSnh2nX45V5xkKi09mLET6xggqPWzuQ8eOqYDO0skb/NQp/BOcwwlpu8sgoFomUufDXP8NHQ3Fz7U537iBDqql5QxWnq5gj6E27SpuhKc8g6V5hpSU6YfJPZyelE5yg2SOPl4yfVWemO/eFMc1rCwqBPe3wnhFcvLQgQVNj4rOIvfze8TIq7CA2W3dmPuKKPxIJRewzMetBLZ1yaMrmfAveYjnvrwn7vHnOvRtLYesuJlfA== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:LHG1qAn2M8tJzHw3NJu84wRI64YODEDSGtqx8A+xx18gun9v5dSjoKFuFtIEE2QsdioYa1v4L7dBXbNQT6M63Wm/Am0696w/DjklJ33nb3VZeu6gqlX1h2A9vMxQVr4gbY9ta5Lja1t2NFuBmQyBqzuWkxsnJ/MNZ9lkxawhSMWZNq4GoYRGrkAdkCgqX4hIO1n3e3thKy50xuQFFwx2TtosTVTL6ySMu46q5H9WQr7LxOwDt+HLJTZtIGvgnND1; 20:xGzJvbGh67SPNUapyleUvyvsByPOVN9588HEAgPrg3z7fQA5v0RKmYu7hKPN992uukWoAWpm4Bw4EDKViWibCh1uy53n0AY0b+ZTvva85Mjg0o3W2xyG1iUQM0Sn+E0hHUgf3QfWP2nHrpZc7KR08Of3vnqZdkNCTBnBnNW1MkO+vCd8064bbrzEnKb8RIQcicY1ngbZGShG/HQSDC/kb8oOnV27Kua5CrLmgpRpoXquA4gZ3Wo6IspPsMrbC+z6pRp76mE+cS87S9Kl067AlTli6mUpOG16EcQQz1ZJxMa43ebTZZHGAdtIkuWCZo5xYWcKPSmNHLgrWe+p7NP+7uk8CocqTRxmMAcycHtOuOsCSHe0fG1pYr2yaVLn6a5bDycxRmk7cZXlCl2Cb7YcEHNTOCpDjETvYlFfabCx17qQQDJm3z2M3AnRIBr2S0X3Jw9QgkqsyJ/B9HEWIF8pddpRutdb5Y94k0qcwhHZND8Mp3yuk44VPKpSXs7ZeHYA6LHRFmMQcikxbGczREen1X2Nq8Wn91HQ8Gc28GP2ZlDsqkxIjdt8T5pmc8iEKSslI5NZ49MO//9NVEe8xH42HOD9PwwE0nYnEOT/HEYzJqc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:HQO7+LQT2y17GZ7bCDEuPxUjzEu6yR6gJ/LtOqz4nY3EItTLskJk/cb/ZIt3Wm3PqrTi68zmIB7C35eClfc4KiS2R8Sptn9K/nprdprk2f3tIZMfRNImdc5ioRxvINNwAjumTxptl0zWLHdAQP+kXRjzCrZKWTwg7+HtNb/RZ6drCNcSmluxoJY4ZTkHkRXQhvy2e3eXgTAYgmaVUH3LEBqmfomQf24HeQ1c0RJhUye3hTH80i3zn122R5y/ROmsmcf0p73RdJ8qP4cMOhIfTuSC7J4vFbVQ0wIHK2HAb3Ol+z//aHAIL4m33lzbVQjZMm2fPfz0kV7XgHRaNSob3szcRXtKHPvBeW9/qGcxJZ2mvEPZHME3VScIyjMZR6q1mZkRFB8WOBUFIkEBzRle0uTVtt/8yLmTemmiON883gTTaKcc8nIu7SLZO/4wWnhNbZI5Ir7A2XTZsOaoEA4BqcLe58URyMYvCIkpUcN276Gm9JB4YGajRtuYnjO3vdX9LfpgIb8/9AkbiDm3/h95wWV5AEZP5Gxdn6fftFOX3ks8UcckdfLMQMefqXK7rV05bvu5iaaeipFMnzo53p8SeA== X-Forefront-PRVS: 0177904E6B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(189002)(24454002)(199003)(105586002)(7736002)(93886004)(107886002)(106356001)(4326007)(54906002)(305945005)(4001350100001)(2906002)(4001430100002)(33656002)(42186005)(83506001)(1076002)(61506002)(66066001)(575784001)(97736004)(81156014)(229853002)(81166006)(46406003)(6506006)(47776003)(9686002)(5660300001)(189998001)(8676002)(23726003)(68736007)(97756001)(55016002)(6916009)(92566002)(76176999)(50986999)(50466002)(3846002)(6116002)(42882006)(6666003)(54356999)(110136003)(2950100002)(38730400001)(25786008)(101416001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:WRke/CvdSGHbBbr4FcL78uD0lNRcap6Xrfq2Eva?= =?us-ascii?Q?kKDT6ku1ftceHeEF5iKTgV2dY9tnEJJHRGAiZ4joLm7VRzXuiflVvtqxtsaU?= =?us-ascii?Q?fB5SPQKRHdM9QMG9O0LVbufPMy8RpPKnBOKvb0sc/1cw7qmfYincqh9SrsJK?= =?us-ascii?Q?3JuCzsbUTcKL63DeJouzh52UM9jNS7TsX/1ADtgpTk7ixaX0SMG90ghaVK7U?= =?us-ascii?Q?pblQKJt0ezjWrWDA5A39DEMY09bWoBcv044OwuuErexmJtPOwJVls1tr3YXF?= =?us-ascii?Q?lEP2J01fCj/782HDZrjKN+D7MaZoaICIBybJR3q9seEaZj4LbI0Fhdqy4Dsx?= =?us-ascii?Q?hAXoGd6gW8dzwxU81XD+UQT7QWNf7I+U3Bs1updpvtfy7csve4mGEB7SRQkd?= =?us-ascii?Q?5MRfZRwBjMybXvAUeq4w3fEkEHhPRmPlYwdc9SBE6/3dyUWqH89Z0GocMFRW?= =?us-ascii?Q?ZRP1g56NydJVJFT2OqxEns9XN+y+Zxo3fvVGZY8FjxMlJarSV1LtN0ryWXns?= =?us-ascii?Q?eG3BueEtMSSJoB51umt7aNCMm7PlW/LDdqYAhVU9zSjP75arlrL67xk5KnbD?= =?us-ascii?Q?93TVuXcuLV5hbMt7q9iSWwTa86wXqiSpvnCgaszmrIYxR8wdUJoK2AufnrPA?= =?us-ascii?Q?CYHrDYtp1yADrCSva4m0vxYY6818XTUmJt+m9rKcMEzS9+R2hJ4owvp3kO7u?= =?us-ascii?Q?od4U3W39FYfdHG/xmwU99cKnTq8OXRuMuwOlk1fOVkUy4qnbql7uoHCPnLyh?= =?us-ascii?Q?L8+4LEe6/gx9zgCxp9BSMDn6agpC6ktlaz6ER0aikK94yPxD57rPLOr9DZ/f?= =?us-ascii?Q?LVM+r1se6ba1UQ0zpe3qQ7VTiOz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sciJDMBwwtRjqmTFJXoIc/EYKEGMAUMFA0kMCPnLZiXM4fnhmiBilo=; 5:rkGCrkdlf3vUMOJXH83qQC+DZHqNmBq3LtZ3aJm1V0TUXtqHwb0yGRycBe8hJ0mMdI5H8Y0M6M1LIOQ0Yi57tQR5/qhEIrEJMXTlNpi0qy5rHHWMh9RJZlxN1pv/Syi+yZEqdYZx8lx6KX5wLfaql4Yc8VMrUy2+rKY4NA16LY8=; 24:NpvEsYZropVz9DVO/ZvcO6r72U1zs0Q75/hww0AWenJzgg3yOwiSjV4bNR3MQ9HftUxzHERTQb+XLt2AfwGPVj5R97R90OqUX3kmiHnGZ0U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:Ve2b9+CSK1UOwwwKoZrXr10+6s/G5gwh0hGkygJ8Jwl5RLRYrgF0ZhXD9dKWR7TPyuudB5TPymUcLZevKfH66ov/8bZ5I2A3V+8V+Qk1A8PrhKteIdHGzA2YZdyF6TS+UNbQFxG0Cbn4NmSULmcqaQD8OitLIUhgStqvPzO9qDI/tPM6j0lWMjmd7DIA4fvWpNC4eFdyPKiAm2HPV4bwXRFwBjx+tCVnKGOOqmRHSHN6zDDEu8DDvQyX6KCq45vkyuZ6OUGeQRxxIUgTNpPlYJIzGEuABKxHVKIm07yUc1HUtLdT+CpqdMykUglyR1GRvTDEhcVOicuNzKLQ/zW7fNHBswSMH6ga6gK+NrRscDgIkQwBlvd1s05CDFN5NsBKLtq7FF875mjL1de3eIWm8fub4GxizNKh/8bo/+l3KuEbCAeqNGiWsSGRQq/AsKOXYAM4LGqZhT8tYVqJW4KU3g== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2017 10:09:32.1868 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: Re: [dpdk-dev] [PATCH v2 14/29] eal/arm64: change barrier definitions to macros 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: Wed, 04 Jan 2017 10:09:39 -0000 On Tue, Jan 03, 2017 at 03:55:45PM +0800, Jianbo Liu wrote: > On 27 December 2016 at 17:49, Jerin Jacob > wrote: > > Change rte_?wb definitions to macros in order to > > use rte_*mb? IMHO, regex ? is appropriate here. https://en.wikipedia.org/wiki/Regular_expression > > > keep consistent with other barrier definitions in > > the file. > > > > Suggested-by: Jianbo Liu > > Signed-off-by: Jerin Jacob > > --- > > .../common/include/arch/arm/rte_atomic_64.h | 36 ++-------------------- > > 1 file changed, 3 insertions(+), 33 deletions(-) > > > > diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h > > index ef0efc7..dc3a0f3 100644 > > --- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h > > +++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h > > @@ -46,41 +46,11 @@ extern "C" { > > #define dsb(opt) { asm volatile("dsb " #opt : : : "memory"); } > > #define dmb(opt) { asm volatile("dmb " #opt : : : "memory"); } > > > > -/** > > - * General memory barrier. > > - * > > - * Guarantees that the LOAD and STORE operations generated before the > > - * barrier occur before the LOAD and STORE operations generated after. > > - * This function is architecture dependent. > > - */ > > -static inline void rte_mb(void) > > -{ > > - dsb(sy); > > -} > > +#define rte_mb() dsb(sy) > > > > -/** > > - * Write memory barrier. > > - * > > - * Guarantees that the STORE operations generated before the barrier > > - * occur before the STORE operations generated after. > > - * This function is architecture dependent. > > - */ > > -static inline void rte_wmb(void) > > -{ > > - dsb(st); > > -} > > +#define rte_wmb() dsb(st) > > > > -/** > > - * Read memory barrier. > > - * > > - * Guarantees that the LOAD operations generated before the barrier > > - * occur before the LOAD operations generated after. > > - * This function is architecture dependent. > > - */ > > How about keep the comments for all these macros? lib/librte_eal/common/include/generic/rte_atomic.h file has description for all the barriers.All other arch are doing in the same-way. > > > -static inline void rte_rmb(void) > > -{ > > - dsb(ld); > > -} > > +#define rte_rmb() dsb(ld) > > > > #define rte_smp_mb() dmb(ish) > > > > -- > > 2.5.5 > >