[dpdk-dev] [PATCH 10/15] crypto/octeontx2: add lookup mem changes to hold sa indices
Jerin Jacob
jerinjacobk at gmail.com
Mon Dec 9 09:02:00 CET 2019
On Sun, Dec 8, 2019 at 5:27 PM Anoob Joseph <anoobj at marvell.com> wrote:
>
> From: Archana Muniganti <marchana at 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 <adwivedi at marvell.com>
> Signed-off-by: Anoob Joseph <anoobj at marvell.com>
> Signed-off-by: Archana Muniganti <marchana at marvell.com>
> Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
> Signed-off-by: Vamsi Attunuru <vattunuru at 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)
More information about the dev
mailing list