-----Original Message-----
> Date: Fri,  8 Jun 2018 22:15:15 +0530
> From: Anoob Joseph <anoob.jos...@caviumnetworks.com>
> To: Akhil Goyal <akhil.go...@nxp.com>, Pablo de Lara
>  <pablo.de.lara.gua...@intel.com>, Thomas Monjalon <tho...@monjalon.net>
> Cc: Ankur Dwivedi <ankur.dwiv...@cavium.com>, Jerin Jacob
>  <jerin.ja...@caviumnetworks.com>, Murthy NSSR
>  <nidadavolu.mur...@cavium.com>, Narayana Prasad
>  <narayanaprasad.athr...@caviumnetworks.com>, Nithin Dabilpuram
>  <nithin.dabilpu...@cavium.com>, Ragothaman Jayaraman
>  <ragothaman.jayara...@cavium.com>, Srisivasubramanian Srinivasan
>  <srisivasubramanian.sriniva...@cavium.com>, dev@dpdk.org
> Subject: [PATCH 06/16] crypto/cpt/base: add sym crypto request prepare for
>  CPT
> X-Mailer: git-send-email 2.7.4
> 
> From: Ankur Dwivedi <ankur.dwiv...@cavium.com>
> 
> These functions help in preparing symmetric crypto requests
> for the supported cipher/auth/aead. This includes all supported
> algos except Kasumi, Snow3G, Zuc, HMAC_ONLY and HASH_ONLY cases.
> 
> Signed-off-by: Ankur Dwivedi <ankur.dwiv...@cavium.com>
> Signed-off-by: Murthy NSSR <nidadavolu.mur...@cavium.com>
> Signed-off-by: Nithin Dabilpuram <nithin.dabilpu...@cavium.com>
> Signed-off-by: Ragothaman Jayaraman <ragothaman.jayara...@cavium.com>
> Signed-off-by: Srisivasubramanian Srinivasan 
> <srisivasubramanian.sriniva...@cavium.com>
> ---
>  drivers/crypto/cpt/base/cpt.h     |  129 +++++
>  drivers/crypto/cpt/base/cpt_ops.c | 1021 
> +++++++++++++++++++++++++++++++++++++
>  2 files changed, 1150 insertions(+)
> 
> diff --git a/drivers/crypto/cpt/base/cpt.h b/drivers/crypto/cpt/base/cpt.h
> index 11407ae..54b1cb6 100644
> --- a/drivers/crypto/cpt/base/cpt.h
> +++ b/drivers/crypto/cpt/base/cpt.h
> @@ -54,6 +54,135 @@
>       void *marker;
>  } app_data_t;
>  
> +/*
> + * Parameters for Flexi Crypto
> + * requests
> + */
> +#define VALID_AAD_BUF 0x01
> +#define VALID_MAC_BUF 0x02
> +#define VALID_IV_BUF 0x04
> +#define SINGLE_BUF_INPLACE 0x08
> +#define SINGLE_BUF_HEADTAILROOM 0x10
> +
> +#define ENCR_IV_OFFSET(__d_offs) ((__d_offs >> 32) & 0xffff)
> +#define ENCR_OFFSET(__d_offs) ((__d_offs >> 16) & 0xffff)
> +#define AUTH_OFFSET(__d_offs) (__d_offs & 0xffff)
> +#define ENCR_DLEN(__d_lens) (__d_lens >> 32)
> +#define AUTH_DLEN(__d_lens) (__d_lens & 0xffffffff)
> +
> +typedef struct fc_params {
> +     /* 0th cache line */

Does it used in fastpath, if so, make it cache aligned

> +     union {
> +             buf_ptr_t bufs[1];
> +             struct {
> +                     iov_ptr_t *src_iov;
> +                     iov_ptr_t *dst_iov;
> +             };
> +     };
> +     void *iv_buf;
> +     void *auth_iv_buf;
> +     buf_ptr_t meta_buf;
> +     buf_ptr_t ctx_buf;
> +     uint64_t rsvd2;
> +
> +     /* 1st cache line */
> +     buf_ptr_t aad_buf;
> +     buf_ptr_t mac_buf;
> +
> +} fc_params_t;
> +
> +/*
> + * Parameters for digest
> + * generate requests
> + * Only src_iov, op, ctx_buf, mac_buf, prep_req

Reply via email to