mbox series

[0/4] lpm lookupx4 fixes

Message ID 20210108082127.1061538-1-ruifeng.wang@arm.com (mailing list archive)
Headers
Series lpm lookupx4 fixes |

Message

Ruifeng Wang Jan. 8, 2021, 8:21 a.m. UTC
  This series fixed bug in lpm4 vector lookup implementations.
When more than 256 tbl8 groups are created, lookupx4 could
retrieve next hop data from wrong group.
The bug is there since next_hop field was expanded from
8-bit to 24-bit, and inherited by other implementations.

Also updated test case to improve coverage to detect such
failure.

Ruifeng Wang (4):
  lpm: fix vector lookup for Arm
  lpm: fix vector lookup for x86
  lpm: fix vector lookup for ppc64
  test/lpm: improve coverage on tbl8

 app/test/test_lpm.c              | 22 ++++++++++++++--------
 lib/librte_lpm/rte_lpm_altivec.h |  8 ++++----
 lib/librte_lpm/rte_lpm_neon.h    |  8 ++++----
 lib/librte_lpm/rte_lpm_sse.h     |  8 ++++----
 4 files changed, 26 insertions(+), 20 deletions(-)
  

Comments

David Marchand Jan. 13, 2021, 2:52 p.m. UTC | #1
On Fri, Jan 8, 2021 at 9:22 AM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> This series fixed bug in lpm4 vector lookup implementations.
> When more than 256 tbl8 groups are created, lookupx4 could
> retrieve next hop data from wrong group.
> The bug is there since next_hop field was expanded from
> 8-bit to 24-bit, and inherited by other implementations.

This is a single issue: I would squash those 3 patches as a single
patch (with 3 Fixes: tags).

>
> Also updated test case to improve coverage to detect such
> failure.
>
> Ruifeng Wang (4):
>   lpm: fix vector lookup for Arm
>   lpm: fix vector lookup for x86
>   lpm: fix vector lookup for ppc64
>   test/lpm: improve coverage on tbl8

Reviews please?
  
Vladimir Medvedkin Jan. 13, 2021, 6:46 p.m. UTC | #2
Hi Ruifeng,

LGTM, Thanks!

On 08/01/2021 08:21, Ruifeng Wang wrote:
> This series fixed bug in lpm4 vector lookup implementations.
> When more than 256 tbl8 groups are created, lookupx4 could
> retrieve next hop data from wrong group.
> The bug is there since next_hop field was expanded from
> 8-bit to 24-bit, and inherited by other implementations.
> 
> Also updated test case to improve coverage to detect such
> failure.
> 
> Ruifeng Wang (4):
>    lpm: fix vector lookup for Arm
>    lpm: fix vector lookup for x86
>    lpm: fix vector lookup for ppc64
>    test/lpm: improve coverage on tbl8
> 
>   app/test/test_lpm.c              | 22 ++++++++++++++--------
>   lib/librte_lpm/rte_lpm_altivec.h |  8 ++++----
>   lib/librte_lpm/rte_lpm_neon.h    |  8 ++++----
>   lib/librte_lpm/rte_lpm_sse.h     |  8 ++++----
>   4 files changed, 26 insertions(+), 20 deletions(-)
> 

Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
  
Ruifeng Wang Jan. 14, 2021, 6:54 a.m. UTC | #3
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Wednesday, January 13, 2021 10:53 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; Vladimir Medvedkin
> <vladimir.medvedkin@intel.com>; Bruce Richardson
> <bruce.richardson@intel.com>
> Cc: dev <dev@dpdk.org>; nd <nd@arm.com>; jerinj@marvell.com; David
> Christensen <drc@linux.vnet.ibm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>
> Subject: Re: [dpdk-dev] [PATCH 0/4] lpm lookupx4 fixes
> 
> On Fri, Jan 8, 2021 at 9:22 AM Ruifeng Wang <ruifeng.wang@arm.com>
> wrote:
> >
> > This series fixed bug in lpm4 vector lookup implementations.
> > When more than 256 tbl8 groups are created, lookupx4 could retrieve
> > next hop data from wrong group.
> > The bug is there since next_hop field was expanded from 8-bit to
> > 24-bit, and inherited by other implementations.
> 
> This is a single issue: I would squash those 3 patches as a single patch (with 3
> Fixes: tags).

I split the patch for review purpose.
It is OK to squash them into a single one on merge.
Thank you.

> 
> >
> > Also updated test case to improve coverage to detect such failure.
> >
> > Ruifeng Wang (4):
> >   lpm: fix vector lookup for Arm
> >   lpm: fix vector lookup for x86
> >   lpm: fix vector lookup for ppc64
> >   test/lpm: improve coverage on tbl8
> 
> Reviews please?
> 
> 
> --
> David Marchand