From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2] examples/l3fwd: fix aliasing in port grouping Date: Tue, 7 Nov 2017 00:12:45 -0800 Message-ID: <06ae364f-9b4f-1b69-8dff-4f1ba23d521b@intel.com> References: <20171103104351.30181-1-gprathyusha@caviumnetworks.com> <20171106042945.GA4073@jerin> <20171106081805.GA15773@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Guduri Prathyusha , tomasz.kantecki@intel.com, guduriprathyusha@gmail.com, konstantin.ananyev@intel.com, dev@dpdk.org To: Jianbo Liu , Jerin Jacob Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 278301B3D6 for ; Tue, 7 Nov 2017 09:12:47 +0100 (CET) In-Reply-To: <20171106081805.GA15773@arm.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/6/2017 12:18 AM, Jianbo Liu wrote: > 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 grouping >>> 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 Applied to dpdk/master, thanks.