From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guduri Prathyusha Subject: Re: [PATCH] examples/l3fwd: fix NEON instructions Date: Sun, 29 Oct 2017 13:54:17 +0530 Message-ID: <20171029082416.GA31178@cavium.com> References: <20171029074807.30785-1-gprathyusha@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, jianbo.liu@arm.com To: tomasz.kantecki@intel.com Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0071.outbound.protection.outlook.com [104.47.37.71]) by dpdk.org (Postfix) with ESMTP id A92201B5F4 for ; Sun, 29 Oct 2017 09:24:48 +0100 (CET) Content-Disposition: inline In-Reply-To: <20171029074807.30785-1-gprathyusha@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" + jianbo.liu@arm.com On Sun, Oct 29, 2017 at 01:18:07PM +0530, Guduri Prathyusha wrote: > To group consecutive packets with same destination port in bursts of 4 > neon intrinsic data types dp1 and dp2 are calculated such that if > dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: and > dp2 should contain: in the first iteration. dp1 should > be and dp2 should be in the next iteration. dp2 in > the last iteration should be . > > Whereas the existing code incorrectly calculates dp1 as from > second iteration and thus incorrect calculation of dp2 as > in the last iteration. > > This patch fixes the incorrect ARM NEON instructions on dp1 and dp2. > > Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation") > > Signed-off-by: Guduri Prathyusha > --- > examples/l3fwd/l3fwd_neon.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h > index 42d50d3c2..1eace4e03 100644 > --- a/examples/l3fwd/l3fwd_neon.h > +++ b/examples/l3fwd/l3fwd_neon.h > @@ -192,13 +192,13 @@ send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst, > * dp1: > * > */ > - dp1 = vextq_u16(dp1, dp1, FWDSTEP - 1); > + dp1 = vextq_u16(dp2, vdupq_n_u16(0), FWDSTEP - 1); > } > > /* > * dp2: > */ > - dp2 = vextq_u16(dp1, dp1, 1); > + dp2 = vextq_u16(dp1, vdupq_n_u16(0), 1); > dp2 = vsetq_lane_u16(vgetq_lane_u16(dp2, 2), dp2, 3); > lp = port_groupx4(&pnum[j - FWDSTEP], lp, dp1, dp2); > > -- > 2.14.1 >