[dpdk-dev] [PATCH 2/3] lpm: add support for NEON

Jerin Jacob jerin.jacob at caviumnetworks.com
Wed Dec 2 15:56:08 CET 2015


On Wed, Dec 02, 2015 at 02:43:40PM +0100, Jan Viktorin wrote:
> On Mon, 30 Nov 2015 22:54:12 +0530
> Jerin Jacob <jerin.jacob at caviumnetworks.com> wrote:
> 
> > enabled CONFIG_RTE_LIBRTE_LPM, CONFIG_RTE_LIBRTE_TABLE,
> > CONFIG_RTE_LIBRTE_PIPELINE libraries for arm64.
> > 
> > TABLE, PIPELINE libraries were disabled due to LPM library dependency.
> > 
> > Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
> > ---
> >  app/test/test_lpm.c                        |  10 +-
> >  config/defconfig_arm64-armv8a-linuxapp-gcc |   3 -
> >  lib/librte_lpm/Makefile                    |   3 +
> >  lib/librte_lpm/rte_lpm.h                   |   5 +
> >  lib/librte_lpm/rte_lpm_neon.h              | 172 +++++++++++++++++++++++++++++
> >  5 files changed, 185 insertions(+), 8 deletions(-)
> >  create mode 100644 lib/librte_lpm/rte_lpm_neon.h
> > 
> > [snip]
> >  
> >  # this lib needs eal
> >  DEPDIRS-$(CONFIG_RTE_LIBRTE_LPM) += lib/librte_eal
> > diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h
> > index c299ce2..12b75ce 100644
> > --- a/lib/librte_lpm/rte_lpm.h
> > +++ b/lib/librte_lpm/rte_lpm.h
> > @@ -361,6 +361,9 @@ rte_lpm_lookup_bulk_func(const struct rte_lpm *lpm, const uint32_t * ips,
> >  /* Mask four results. */
> >  #define	 RTE_LPM_MASKX4_RES	UINT64_C(0x00ff00ff00ff00ff)
> >  
> > +#if defined(RTE_ARCH_ARM64)
> > +#include "rte_lpm_neon.h"
> > +#else
> >  /**
> >   * Lookup four IP addresses in an LPM table.
> >   *
> > @@ -473,6 +476,8 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm, __m128i ip, uint16_t hop[4],
> >  	hop[3] = (tbl[3] & RTE_LPM_LOOKUP_SUCCESS) ? (uint8_t)tbl[3] : defv;
> >  }
> >  
> > +#endif
> > +
> 
> I would separate the SSE implementation into its own file as well.

make sense. planning to make it as  lib/librte_lpm/rte_lpm_sse.h
and lib/librte_lpm/rte_lpm_neon.h.  OK ?

I can fix it in next revision.

> 
> Otherwise, I like this patch. I hope to be able to test it soon.
> 
> >  [snip]
> 
> 
> -- 
>    Jan Viktorin                  E-mail: Viktorin at RehiveTech.com
>    System Architect              Web:    www.RehiveTech.com
>    RehiveTech
>    Brno, Czech Republic


More information about the dev mailing list