From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH 06/16] crypto/cpt/base: add sym crypto request prepare for CPT Date: Thu, 14 Jun 2018 08:54:10 +0530 Message-ID: <20180614032409.GE16602@jerin> References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1528476325-15585-7-git-send-email-anoob.joseph@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Akhil Goyal , Pablo de Lara , Thomas Monjalon , Ankur Dwivedi , Murthy NSSR , Narayana Prasad , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian Srinivasan , dev@dpdk.org To: Anoob Joseph Return-path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700086.outbound.protection.outlook.com [40.107.70.86]) by dpdk.org (Postfix) with ESMTP id A266A1E50E for ; Thu, 14 Jun 2018 05:24:32 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1528476325-15585-7-git-send-email-anoob.joseph@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Fri, 8 Jun 2018 22:15:15 +0530 > From: Anoob Joseph > To: Akhil Goyal , Pablo de Lara > , Thomas Monjalon > Cc: Ankur Dwivedi , Jerin Jacob > , Murthy NSSR > , Narayana Prasad > , Nithin Dabilpuram > , Ragothaman Jayaraman > , Srisivasubramanian Srinivasan > , 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 > > 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 > Signed-off-by: Murthy NSSR > Signed-off-by: Nithin Dabilpuram > Signed-off-by: Ragothaman Jayaraman > Signed-off-by: Srisivasubramanian Srinivasan > --- > 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