From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jianbo Liu Subject: Re: [PATCH v2] examples/l3fwd: fix aliasing in port grouping Date: Mon, 6 Nov 2017 16:18:06 +0800 Message-ID: <20171106081805.GA15773@arm.com> References: <20171103104351.30181-1-gprathyusha@caviumnetworks.com> <20171106042945.GA4073@jerin> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Guduri Prathyusha , tomasz.kantecki@intel.com, guduriprathyusha@gmail.com, konstantin.ananyev@intel.com, dev@dpdk.org To: Jerin Jacob Return-path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0084.outbound.protection.outlook.com [104.47.2.84]) by dpdk.org (Postfix) with ESMTP id 9EAAD1B228 for ; Mon, 6 Nov 2017 09:19:16 +0100 (CET) Content-Disposition: inline In-Reply-To: <20171106042945.GA4073@jerin> 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 11/06/2017 09:59, Jerin Jacob wrote: > -----Original Message----- > > Date: Fri, 3 Nov 2017 16:13:51 +0530 > > 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 > > > > Subject: [dpdk-dev] [PATCH v2] examples/l3fwd: fix aliasing in port gro= uping > > X-Mailer: git-send-email 2.14.1 > > > > 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 > > Acked-by: Jerin Jacob > Acked-by: Jianbo Liu IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.