From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0060.outbound.protection.outlook.com [104.47.42.60]) by dpdk.org (Postfix) with ESMTP id F35CE1B640 for ; Fri, 3 Nov 2017 11:44:26 +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=GAaCyGNc6kB+DVD1ELbtdMUoU6PcE1uVbMRPhjQRP1s=; b=fOnXKPHEO87HECBvci2ZRMsnxnPdh2DvH5++ZTaRr8/zphd3mgncYzF19tiTAqaCDg9qUDJUR85VlmzCyU+zAS6G0LA5ibRrocasCuoIwp53lhXW2sItLkch9VJ6YPly6pJNQuVIF9RpIUtYEUOvdEzEhta8e0JXUGhhA0C3110= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Guduri.Prathyusha@cavium.com; Received: from prathyusha-Precision-Tower-5810.caveonetworks.com (111.93.218.67) by BY2PR07MB1506.namprd07.prod.outlook.com (10.162.77.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Fri, 3 Nov 2017 10:44:22 +0000 From: Guduri Prathyusha To: tomasz.kantecki@intel.com Cc: Jianbo.Liu@arm.com, guduriprathyusha@gmail.com, konstantin.ananyev@intel.com, dev@dpdk.org, Guduri Prathyusha Date: Fri, 3 Nov 2017 16:13:51 +0530 Message-Id: <20171103104351.30181-1-gprathyusha@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0116.INDPRD01.PROD.OUTLOOK.COM (10.174.208.32) To BY2PR07MB1506.namprd07.prod.outlook.com (10.162.77.139) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 60c4e119-fddd-4e9c-dbac-08d522a7d9e5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:BY2PR07MB1506; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB1506; 3:L6Rhej47GBwlqs/wWjzyWZ01KxwquvFFQzObDK/lxN+WPLsLuef/Nd7xcl3sllsrqtBn5qu93/N9784C/JGThduzy3+wYl5gU9YOWzG+Ia8GnrzgoEifA3ixzlqB07LkczlYFzRDFYXDx6VWr1GCUKsoP1nEey1vtKpaFmCP5KIWtVs6iPDe9Bc2ctr8zsvSs9ctGYsHUW8ydxCllesR4lFVaD0z9ymu3skS3Mj/xpXdpJI/oi8qXqZBZdEbTYvI; 25:xgHsr1EUtpAA4HJe+R4CI5+HnTDMIoAnmpatmYQjr7t+Yc8rJlq2M3Pr4mA6frbE6EDtY1Jbrsc8HGgqGpiusRpV4T296aVeXL/mun6efKSgDwFBHjAq0Joliqfh29z5USeFqQIqP7Wcdbip9+s8U/AeIxrgdZoQ/iAXojAgiAhqlB25K9zjlJIUHIxA642AzplMEuO6btM8sn2+dFadIvjmyQFMqd6+Ofl5zoA8zNJ0FWcpRognIVrSJmN7toEcofH3gQnh72jWzOVEnadxYZGYcjuV7L3lLyfhMAetmOgw5gCD4KMz3C6rEgzIXzvI2KQtgziiHhl93jjae/GusQ==; 31:UZ1z9BF0psyTbLGJusS+b0BydX3IpIUMWSbpm1u2oH5/1GsVIiLwvNdIGb9g9UloDPHqnaaDxi82m7MWmcyr2hCAL0vqu0ho2jZ6TpcugrL4JeuC0KR4/bmUIFCy4Jv+5q5n7TOZQbcz6501korVy22N3BIk72lS5G2wuUMiW9F/Upz0zDGQh7pSkyp8fti5OgfbVc/Gr0Gg256vOOZ7TqF9ZwEBrVa6Gm6Rxx+431M= X-MS-TrafficTypeDiagnostic: BY2PR07MB1506: X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB1506; 20:Ir86Sl46As/Obv/+k1JTz8/4MUGmSFa3IfyRug9WBQcg7a32WriDVigbXmzEEs7oXfH3AKyyQVrv4RB+XnuA12gNhaYCHPD+dtGT5VG+7ElYLXKIUQgC/oX23WnaJJGNxIGGN6fxIdCSbzHc3s1jAOwGvpCpQ//I0t7HVlC1iHjbcnOZCYu1WO+R1AM0Po1s288r42I2eIpc1U8vFikmPlxt5j8ec1sVabV0bfFI3aRc6saWk2PhrJl22733288wZMZbA1Mo8/gIgiyUys1AqzzDO3c/w+DjQ1BV7vSvUC/VMEvcDzIupO0wz+z+Nq5/C/9mS9NgaY3GTJUIukcGAh7AdJSQ2z9o6OCPv4fqqEnFqWgrHfjyH8sf0Rs127BVcvMqxgFqlb2Nw/D03TmCE6iqrjcGxhV8yvNIa2yhdUatXtVwi2Ftua88I4fRTpqAfpenGPnIgciMeyXDNgh2rUME3eB05Tc5eXeXGi3PH/DqEkY9KB9dh3cC1uz++n/mUPfRMO+QhtpR6WJeGLLPvAGj0n2C7xMWTRIjkyqj6K5ZFkWfe4HR1pvpoaS9nK+qgC4lkPKLIoqtd8BXozJyeaA0M/4q233Behm6wqn/DnY=; 4:rU3kJTUr4LtwYeLpoyZhiYgpdQ/JwRKQpg5ulPPwmjYDqn6gAjU9hTWuuP6LzxuctFcEGp1Usn4xAHZDT0UuAmHOYpQNgs/5jZedQSb+bnNmLHTJU6RxLrPnrryZcwkbdGliZ6RRoAvg7DisQqYkQvQqtVwequH3/YPTJoRIWCIjIKVwFnFtkWDKADdCxNOQR8erzlRmEVpTmjifKD1MVKPbAMqvwKAacvhxTawAukHuunXcT4kmOG590Ii/NoKBwwHGcft+E/NPfHzv7LdoOw== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231021)(100000703101)(100105400095)(93006095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR07MB1506; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR07MB1506; X-Forefront-PRVS: 0480A51D4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(199003)(189002)(39060400002)(68736007)(4326008)(53416004)(107886003)(5660300001)(6512007)(106356001)(25786009)(478600001)(2361001)(72206003)(42882006)(6916009)(2351001)(6666003)(305945005)(33646002)(101416001)(50986999)(16586007)(189998001)(53936002)(105586002)(316002)(6506006)(50226002)(6486002)(50466002)(3846002)(6116002)(69596002)(5003940100001)(36756003)(8936002)(66066001)(7736002)(8676002)(81156014)(81166006)(97736004)(1076002)(2906002)(47776003)(48376002)(5009440100003)(16526018); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB1506; H:prathyusha-Precision-Tower-5810.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; BY2PR07MB1506; 23:zT9CnjaabhBR72033AZYid9/cywe/dBaDSxlgQmAg?= =?us-ascii?Q?E8Ueo8FP95Ut+h3SdypvDA8isPACFteeUxWEB6lGaojZ1nmVjwosKejZVQK2?= =?us-ascii?Q?AMjwd/YcSHdodMDIxB7wmzM7evltmXY6AfT6oLIiOhdaXHKlna9LFSSgBcLS?= =?us-ascii?Q?Ca4la+y+pP1zBW25Mn9RTD/zxN15htt+owkAryVe8SIT3XYnX8rKFD3/DX8P?= =?us-ascii?Q?6Nw0NUTroLsLk4R6vLvWuosUustk/ikoDZTiO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MVRmmLUesVWqNLul2YTaJQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2017 10:44:22.7146 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60c4e119-fddd-4e9c-dbac-08d522a7d9e5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB1506 Subject: [dpdk-dev] [PATCH v2] examples/l3fwd: fix aliasing in port grouping 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: Fri, 03 Nov 2017 10:44:27 -0000 With -f-strict-aliasing enabled by default from -O2, gcc > 5.x gives undefined behavior in port_groupx4 in ARM. 'pn' and 'pnum' are two different pointers pointing to same chunk of memory and with -f-strict-aliasing the pointers are assumed to be pointing to different memory and compiler reorders instructions that depend on pnum and pn. This breaks port grouping algorithm. This patch eliminates the above problem by introducing a compiler barrier between the instructions that depend on pnum, pn and lp. Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation") Signed-off-by: Guduri Prathyusha --- examples/l3fwd/l3fwd_neon.h | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h index 4bc161394..b319b5a92 100644 --- a/examples/l3fwd/l3fwd_neon.h +++ b/examples/l3fwd/l3fwd_neon.h @@ -114,6 +114,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1, /* update last port counter. */ lp[0] += gptbl[v].lpv; + rte_compiler_barrier(); /* if dest port value has changed. */ if (v != GRPMSK) { -- 2.14.1