Hi Jerin, Please see inline.
Thanks, Anoob > -----Original Message----- > From: Jerin Jacob <jerinjac...@gmail.com> > Sent: Monday, December 9, 2019 1:32 PM > To: Anoob Joseph <ano...@marvell.com> > Cc: Akhil Goyal <akhil.go...@nxp.com>; Declan Doherty > <declan.dohe...@intel.com>; Thomas Monjalon <tho...@monjalon.net>; > Archana Muniganti <march...@marvell.com>; Jerin Jacob Kollanukkaran > <jer...@marvell.com>; Narayana Prasad Raju Athreya > <pathr...@marvell.com>; Kiran Kumar Kokkilagadda > <kirankum...@marvell.com>; Nithin Kumar Dabilpuram > <ndabilpu...@marvell.com>; Pavan Nikhilesh Bhagavatula > <pbhagavat...@marvell.com>; Ankur Dwivedi <adwiv...@marvell.com>; > Tejasree Kondoj <ktejas...@marvell.com>; Vamsi Krishna Attunuru > <vattun...@marvell.com>; Lukas Bartosik <lbarto...@marvell.com>; dpdk- > dev <dev@dpdk.org> > Subject: [EXT] Re: [dpdk-dev] [PATCH 10/15] crypto/octeontx2: add lookup > mem changes to hold sa indices > > External Email > > ---------------------------------------------------------------------- > On Sun, Dec 8, 2019 at 5:27 PM Anoob Joseph <ano...@marvell.com> wrote: > > > > From: Archana Muniganti <march...@marvell.com> > > > > lookup_mem provides fast accessing of data path fields. > > Storing sa indices in lookup_mem which are required in inline rx data > > path. > > > > Signed-off-by: Ankur Dwivedi <adwiv...@marvell.com> > > Signed-off-by: Anoob Joseph <ano...@marvell.com> > > Signed-off-by: Archana Muniganti <march...@marvell.com> > > Signed-off-by: Tejasree Kondoj <ktejas...@marvell.com> > > Signed-off-by: Vamsi Attunuru <vattun...@marvell.com> > > --- > > drivers/common/octeontx2/otx2_common.h | 20 +++++++++++ > > drivers/crypto/octeontx2/otx2_security.c | 59 > +++++++++++++++++++++++++++++++- > > drivers/net/octeontx2/otx2_lookup.c | 9 +---- > > drivers/net/octeontx2/otx2_rx.h | 10 ++---- > > 4 files changed, 81 insertions(+), 17 deletions(-) > > > > diff --git a/drivers/common/octeontx2/otx2_common.h > > b/drivers/common/octeontx2/otx2_common.h > > index 9705a8d..6456c4b 100644 > > --- a/drivers/common/octeontx2/otx2_common.h > > +++ b/drivers/common/octeontx2/otx2_common.h > > @@ -170,4 +170,24 @@ extern int otx2_logtype_dpi; #include > > "otx2_io_generic.h" > > #endif > > > > +/* Fastpath lookup */ > > +#define OTX2_NIX_FASTPATH_LOOKUP_MEM > "otx2_nix_fastpath_lookup_mem" > > +#define PTYPE_NON_TUNNEL_WIDTH 16 > > +#define PTYPE_TUNNEL_WIDTH 12 > > +#define PTYPE_NON_TUNNEL_ARRAY_SZ > BIT(PTYPE_NON_TUNNEL_WIDTH) > > +#define PTYPE_TUNNEL_ARRAY_SZ BIT(PTYPE_TUNNEL_WIDTH) > > +#define PTYPE_ARRAY_SZ ((PTYPE_NON_TUNNEL_ARRAY_SZ +\ > > + PTYPE_TUNNEL_ARRAY_SZ) *\ > > + sizeof(uint16_t)) > > + > > +/* NIX_RX_PARSE_S's ERRCODE + ERRLEV (12 bits) */ > > +#define ERRCODE_ERRLEN_WIDTH 12 > > +#define ERR_ARRAY_SZ ((BIT(ERRCODE_ERRLEN_WIDTH)) *\ > > + sizeof(uint32_t)) > > + > > +#define PORT_ARRAY_SZ (RTE_MAX_ETHPORTS * > sizeof(uint64_t)) > > + > > +#define LOOKUP_ARRAY_SZ (PTYPE_ARRAY_SZ + > ERR_ARRAY_SZ +\ > > + PORT_ARRAY_SZ) > > + > > All these defines are not relevant to common code, But I understand the > security code needs PORT_ARRAY_START > > Please rector the logic to the following or similar way to keep the lookup > constants internal. > > #define OTX2_PORT_ARRAY_START value > > in otx2_nix_fastpath_lookup_mem_get() > > RTE_BUILD_BUG_ON(OTX2_PORT_ARRAY_START != PTYPE_ARRAY_SZ + > ERR_ARRAY_SZ) [Anoob] Will make this change in v2.