Hi Jerin, Please see inline.
Thanks, Anoob > -----Original Message----- > From: Jerin Jacob <[email protected]> > Sent: Monday, December 9, 2019 1:32 PM > To: Anoob Joseph <[email protected]> > Cc: Akhil Goyal <[email protected]>; Declan Doherty > <[email protected]>; Thomas Monjalon <[email protected]>; > Archana Muniganti <[email protected]>; Jerin Jacob Kollanukkaran > <[email protected]>; Narayana Prasad Raju Athreya > <[email protected]>; Kiran Kumar Kokkilagadda > <[email protected]>; Nithin Kumar Dabilpuram > <[email protected]>; Pavan Nikhilesh Bhagavatula > <[email protected]>; Ankur Dwivedi <[email protected]>; > Tejasree Kondoj <[email protected]>; Vamsi Krishna Attunuru > <[email protected]>; Lukas Bartosik <[email protected]>; dpdk- > dev <[email protected]> > 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 <[email protected]> wrote: > > > > From: Archana Muniganti <[email protected]> > > > > 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 <[email protected]> > > Signed-off-by: Anoob Joseph <[email protected]> > > Signed-off-by: Archana Muniganti <[email protected]> > > Signed-off-by: Tejasree Kondoj <[email protected]> > > Signed-off-by: Vamsi Attunuru <[email protected]> > > --- > > 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.

