[dpdk-dev] [PATCH v1] app/testpmd: optimized MAC swap by using neon intrinsics

Ruifeng Wang (Arm Technology China) Ruifeng.Wang at arm.com
Tue Mar 12 02:37:03 CET 2019



Regards,
/Ruifeng

> -----Original Message-----
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>
> Sent: 2019年3月11日 23:33
> To: Ruifeng Wang (Arm Technology China) <Ruifeng.Wang at arm.com>;
> wenzhuo.lu at intel.com; jingjing.wu at intel.com;
> bernard.iremonger at intel.com
> Cc: dev at dpdk.org; jerinj at marvell.com; hemant.agrawal at nxp.com; nd
> <nd at arm.com>; Ruifeng Wang (Arm Technology China)
> <Ruifeng.Wang at arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; nd <nd at arm.com>
> Subject: RE: [PATCH v1] app/testpmd: optimized MAC swap by using neon
> intrinsics
> 
> > Improved MAC swap performance for ARM platform.
> > The improvement was achieved by using neon intrinsics to save CPU
> > cycles and doing swap for four packets at a time.
> > The optimization had 15% - 20% throughput boost in testpmd MAC swap
> mode.
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> > Reviewed-by: Phil Yang <phil.yang at arm.com>
> > ---
> >  app/test-pmd/macswap.c      |  4 +-
> >  app/test-pmd/macswap_neon.h | 93
> > +++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 96 insertions(+), 1 deletion(-)  create mode 100644
> > app/test- pmd/macswap_neon.h
> >
> > diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c index
> > cbb41b7..71af916 100644
> > --- a/app/test-pmd/macswap.c
> > +++ b/app/test-pmd/macswap.c
> > @@ -66,8 +66,10 @@
> >  #include <rte_flow.h>
> >
> >  #include "testpmd.h"
> > -#ifdef RTE_ARCH_X86
> > +#if defined(RTE_ARCH_X86)
> >  #include "macswap_sse.h"
> > +#elif defined(RTE_MACHINE_CPUFLAG_NEON) #include
> "macswap_neon.h"
> >  #else
> >  #include "macswap.h"
> >  #endif
> > diff --git a/app/test-pmd/macswap_neon.h b/app/test-
> pmd/macswap_neon.h
> > new file mode 100644 index 0000000..bad1b9b
> > --- /dev/null
> > +++ b/app/test-pmd/macswap_neon.h
> > @@ -0,0 +1,93 @@
> > +/* SPDX-License-Identifier: BSD-3-Clause
> > + * Copyright(c) 2019 Arm Limited
> This change is derived from Intel's work in macswap_sse.h. Can you please
> add a header similar to lib/librte_lpm/rte_lpm_neon.h?
> 
Sure. Will update file header in v2.
Thanks for your suggestion.

> > + */
> > +
> > +#ifndef _MACSWAP_NEON_H_
> > +#define _MACSWAP_NEON_H_
> > +
> 
> <snip>



More information about the dev mailing list