From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jianbo Liu Subject: Re: [PATCH v3 5/7] examples/l3fwd: add neon support for l3fwd Date: Fri, 12 May 2017 10:40:09 +0800 Message-ID: References: <1493709255-8887-1-git-send-email-jianbo.liu@linaro.org> <1494494708-20642-1-git-send-email-jianbo.liu@linaro.org> <1494494708-20642-6-git-send-email-jianbo.liu@linaro.org> <1494496145.4256.9.camel@caviumnetworks.com> <1494498476.4256.28.camel@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: "Jacob, Jerin" , "tomasz.kantecki@intel.com" , "dev@dpdk.org" To: "Sekhar, Ashwin" Return-path: Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.161.179]) by dpdk.org (Postfix) with ESMTP id 41A9E2952 for ; Fri, 12 May 2017 04:40:11 +0200 (CEST) Received: by mail-yw0-f179.google.com with SMTP id 203so5187312ywe.0 for ; Thu, 11 May 2017 19:40:10 -0700 (PDT) In-Reply-To: <1494498476.4256.28.camel@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" On 11 May 2017 at 18:27, Sekhar, Ashwin wrote: > On Thu, 2017-05-11 at 18:01 +0800, Jianbo Liu wrote: >> On 11 May 2017 at 17:49, Sekhar, Ashwin >> wrote: >> > >> > Hi Jianbo, >> > >> > Thanks for v3. Small compilation error. See inline comment. >> > Otherwise >> > it looks fine. >> > >> > On Thu, 2017-05-11 at 17:25 +0800, Jianbo Liu wrote: >> > > >> > > Use ARM NEON intrinsics to accelerate l3 fowarding. >> > > >> > > Signed-off-by: Jianbo Liu >> > > --- >> > [...] >> > >> > > >> > > +/** >> > > + * Process one packet: >> > > + * Update source and destination MAC addresses in the ethernet >> > > header. >> > > + * Perform RFC1812 checks and updates for IPV4 packets. >> > > + */ >> > > +static inline void >> > > +process_packet(struct rte_mbuf *pkt, uint16_t *dst_port) >> > > +{ >> > > + struct ether_hdr *eth_hdr; >> > > + uint32x4_t te, ve; >> > > + >> > > + eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *); >> > > + >> > > + te = vld1q_u32((uint32_t *)eth_hdr); >> > > + ve = vreinterpretq_u32_s32(val_eth[dst_port[0]]); >> > > + >> > > + >> > > + rfc1812_process((struct ipv4_hdr *)(eth_hdr + 1), dst_port, >> > > + pkt->packet_type); >> > > + >> > > + ve = vcopyq_lane_u32(ve, 3, te, 3); >> > Compilation error here. This should be vcopyq_laneq_u32 (Extra q >> > after >> > lane) >> No vcopyq_laneq_u32 in arm_neon.h of my environment. I thought it's a >> typo so I changed. >> >> my gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC). >> What about yours? >> > I am using GCC 7.1. No error with this version. > > Also to cross check I tried the following versions as well which all > gave compilation errors. > * gcc (Ubuntu/Linaro 4.9.2-10ubuntu13) 4.9.2 > * gcc 5.3 > * GCC 6.3 > > So looks like vcopyq_laneq_u32 is not supported in GCC versions < 7. > We can add a wrapper for the same in > ./lib/librte_eal/common/include/arch/arm/rte_vect.h for gcc versions < > 7. OK > > But I think we can defer this activity. Because I have some other > patches, which moves around the definition of GCC_VERSION, and adds > wrappers for some unsupported instrinsics. Please see below. > http://dpdk.org/dev/patchwork/patch/24161/ > http://dpdk.org/dev/patchwork/patch/24162/ > > I think we can add the vcopyq_laneq_u32 change and the wrapper for the > same after the above patches are merged. > I'll add that after your patches are ready. > And FYI - Documentation for the vcopyq_laneq_u32 can be found in below > document. > http://infocenter.arm.com/help/topic/com.arm.doc.ihi0073a/IHI0 > 073A_arm_neon_intrinsics_ref.pdf > Thanks! >> > >> > > >> > > + vst1q_u32((uint32_t *)eth_hdr, ve); >> > > +} >> > > + >> > [...]