From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jMx35KUtsIOYrucpcVtVW5mdik8yn75uFhZwkZpx5+s=; b=R6Z5zRJ1N8c2da8QF2aIZ51F5hQZiOkGO8tbFhGO5nwTY5qfALbNrLbjJVL1DECGfUaxgy4F2U7qHeonO0Gy95D2ynFN/UROM9CnPvTEdm44cdgdgCgC5LkyAuWx6RWwXROuEu03Tnv9LTFCy79p8ay7F/nC+mEQt3RwD73BG2E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (223.226.32.255) by CO2PR07MB2519.namprd07.prod.outlook.com (2603:10b6:102:13::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Thu, 14 Jun 2018 03:24:25 +0000 Date: Thu, 14 Jun 2018 08:54:10 +0530 From: Jerin Jacob To: Anoob Joseph Cc: Akhil Goyal , Pablo de Lara , Thomas Monjalon , Ankur Dwivedi , Murthy NSSR , Narayana Prasad , Nithin Dabilpuram , Ragothaman Jayaraman , Srisivasubramanian Srinivasan , dev@dpdk.org 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 Content-Disposition: inline In-Reply-To: <1528476325-15585-7-git-send-email-anoob.joseph@caviumnetworks.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [223.226.32.255] X-ClientProxiedBy: MA1PR01CA0118.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::34) To CO2PR07MB2519.namprd07.prod.outlook.com (2603:10b6:102:13::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4463b20a-3d70-4d8b-b728-08d5d1a6571e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 3:19NBf0EnMrCHZA5vIp9zQsesDKuAuDY9foO2B+VsB9wqgxM7ARAlgS66qhktxZOLY6vHh6Fx6Qbn4z/xpbBnEZps1+gk52NpIQyWMYUq20/D4hX/RQUuj4YA8xaYPLlZatvRNYlni0hEaeH77NXzzMhd7wPua9vzw41i5mQf7suZLwNuj4iHtDt3wdJVBNCJUgDoudzH9FfIe05NYkAZcpobQHs/Lz7IVjrspIN+sb0cXPhWWSXwyw+OrNE2PsXi; 25:oc5LtbtFjRk6j9Ru26iFXtsPbAtkb4ywp7KNS4vALQ7qn549wEVUv1BzTMhI19g5Pbi04HtAJLVZCmXQ/japtgZizdsSymEhvoBhE5eMo2RF54c/t+zNvCV318ZmhI1jYS4uj483l3XKQ4YzHZOsBQI37rYK+QqSRhagvyBtYo/mCcVjAYdxJc5ahx9gv9Q9F5wl8roba4IV7gxW3pXBkwYBWUedFSPGyRkmaW/KKxMceoMptktipwg/XyKczOK3gpFhV6O049/wFIbnz7MwtdGvMbizynqDLPiK7fV0TWHAS3LTaCt5Pu+QTXHcmOkSzF76r22lhJwNfoV4u+BRSQ==; 31:KGvxF6ynx5GfpPHxJ2NrkBQxeMW94k0QRZ80Wf3/cUux35ERefbHVqIoEfeSpN0av8TUJgD++C4JUmQfDGgUWITSeZMtAIr8zk26RCiGs1UxDXGoDgyBqz0/pooxphKtT/6BtEMq2LW3XOCsH6jxUgZVgRewSxwRfMri5HxlOF4GE97Pq2X50V43Czda9BXwaV9MaJAvPo3tBX+zaAkupgUd/xlbSuBlEydeyfDRE7Y= X-MS-TrafficTypeDiagnostic: CO2PR07MB2519: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 20:0P75DQoa5sLNN8uy/20x3SZuhNgF86NDI8NjMAx7GttJj+PV8ahg4qgeZH83hOcp7BOIAVpJipG84daDz6hUD0TZyKrU8Ppq/N4SlKHXM76hjcuwRKA6E+/iY2n3B4vtZmn9ZnOIuCYmwlZz+X/w7Txr+hkNbm3fxiaATWxORbuw/Ijo+YDKgqmZyCgLC5+wqdNwo051mEGdNbFpOzafMvxmG1/9GO0nBYPQnWtwXq9REgJQbcd9nfXzPKPCsXb4QNCzeGhv12nRU3zfgIbspZs3hTBpaQcJRPhCOMLDMn+7Qnfq5fYysVVWxun0+ngclFS4xO0di2our3ZxyItGoW+FWmp51JWwZmLaCpPDno1xeH4y0sKCLhJugkX8Ukyl8fvUonpR7wGkHICw8c5+jDtX3S/5KgkPX78EvfCDFY4ArdP6Sw4ibMpblrSGVBlw+4idgsEia0tp9qwYhSL0K94QgYv1sNcSOAjlhCbmoO+4vu4Ly2aup5nJnOZibHoHBhubPk3fLubsbQ8LGrk4G6SCjcjA1bt0zOejQj8/HhY730yKTre5EAlMquLaXtqyXxHsatSGHZOg9o8Ad3n1mDr2L/Zc3ipHKqnUTGjVZ4A= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:CO2PR07MB2519; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 4:UURvRIndInxolj13ivD24dBp67+jFS7czSDMvghrIaYn3z8MZOmzlGuY8u5uaL7TuW1I55p2UPzh3FkmVxZpBJ8L1KHeZd0GvmqT0KWI6xkAX5TR6R9cTtBSbV6a9IX4n4mBrcIbUgG3s47czZCrd4TC/9SL0d/yhmuhzZoravsCVaKTarK387n0iMOUlOCH2OzOg2opGuyCQ7cFVRVwt1qUME3sxIORNCtajzSQgqN9AFnYh/yCqC0BGDzaPD69bUbNB4uzXb8Imz3RSl8pdRXUjcueY4y0d1iw9Tc9K5QsU7AzubIYsb4JDBWFlD/p24TNLedY/w2OOVBX51/VqZFUJEdzFVCKp5jbnvD9cxg= X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39380400002)(396003)(39850400004)(199004)(189003)(13464003)(6116002)(3846002)(25786009)(16526019)(47776003)(8676002)(81166006)(66066001)(50466002)(7736002)(97736004)(53936002)(8936002)(76176011)(8656006)(59450400001)(52116002)(26005)(33896004)(4326008)(1076002)(23726003)(33716001)(386003)(6496006)(6862004)(9686003)(42882007)(81156014)(6246003)(68736007)(5660300001)(72206003)(16586007)(6666003)(58126008)(6636002)(478600001)(33656002)(54906003)(55016002)(446003)(486006)(476003)(956004)(11346002)(44832011)(229853002)(106356001)(2906002)(105586002)(305945005)(316002)(18370500001)(7756004); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2519; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2519; 23:GBvhftrnjmdxhp5eWoL4db3GoFe0PBh5G6macx6X+?= =?us-ascii?Q?5MPoKv8sec3Iijn+Pa+LDEHwiD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BJD6u9rROqaMjprVinky525dhfCRr48+ccebup6fhjn0Gbcao1qvEzj9l/NjGrvBx31nzc1Zw7oBYK3Wt1iCKRlheDy/7fPL30JF7CchGzEV7pq+hGMaSmlJ9xRdbve8kCUMbdefMXccdlss12ZmTxybAwhv7UWrnT4POL/ev+fMYNiJ7uZovC1wLvtrmHUOVW8IZa4a1bhxAmkT+IhizMp5d4XaKTJP+PcI/jcvNLVVvbcyNQldz2JY21TtgooVobMtFDY3QrmNpQTQ==; 5:+yJFY6Ctu0OHnqIV17ovzdBYSH77P4kVJ3tQ5c3C2uzUbE0EhLxa411YLcjSA9IZGd8jVnw0/0mLbnXBZ8rzIVqq8PTJMh1sqZOYhir89P43B2VPvbQLs0F31NDoKOYVIyHHVnlfE1aJPMQKy5scPg4kTuwsjgtVo870Eb9ojEU=; 24:xKdfj6IGPvMXm8PANm7QGNYBXMFLuK1uSSW5ygsBGW/Ld6d+/d4clcxn6ww4Rx4OQxWmPdC2908iM7BGGKu5oFxKIt7v6+oqGZqBeZZL8IM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 7:5cwOjPm1VJ5hs5MKJ8KCg+1In3OVnbdlDzcBq6CSpF0rztwJH+gRQz8dqB++yqYrMMSY8tYivWHFVQsueVPKcIXZXJfbwgLNcucUr0yyGFjMvV8Y4fER+7ul+up0UKz307i9w9/geSE41i7kKKW5lLHpPtjVZREq0DZ9OkMSIX0CNcp08v1592ymLClt8ofjTvKcZ0Tcc74vJsiA6XSqQ/Wtl0so1xvzIe4/bN73jZFLbVl1np4iyba18IvBJlPU X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 03:24:25.9066 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4463b20a-3d70-4d8b-b728-08d5d1a6571e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2519 Subject: Re: [dpdk-dev] [PATCH 06/16] crypto/cpt/base: add sym crypto request prepare for CPT X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 03:24:33 -0000 -----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