From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0053.outbound.protection.outlook.com [104.47.42.53]) by dpdk.org (Postfix) with ESMTP id 2F3691EB35 for ; Thu, 14 Jun 2018 05:02:28 +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=iWXIPhOD0bFX1laQIwFQqqX5PknMzUqP6z0DGPT8QQQ=; b=KTl2jTa22JDUqZgUDcNZ+q6D+lzh37o/IIe6E/BxLFv4ljuBnTmwUWli5mgfwZBm4widrEuw1n46ZWoD1ok0U6qCga3IGZo+uh5uT57kG4cmM3HbKAi2mxhKfAwNkFt3zv07SCWvNcafk5wlpdYQ5yguL7DSlwGw+mqpje/qK64= 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:02:21 +0000 Date: Thu, 14 Jun 2018 08:32:08 +0530 From: Jerin Jacob To: Anoob Joseph Cc: Akhil Goyal , Pablo de Lara , Thomas Monjalon , Nithin Dabilpuram , Ankur Dwivedi , Murthy NSSR , Narayana Prasad , Ragothaman Jayaraman , Srisivasubramanian Srinivasan , dev@dpdk.org Message-ID: <20180614030207.GB16602@jerin> References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com> <1528476325-15585-3-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-3-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: MA1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::24) To CO2PR07MB2519.namprd07.prod.outlook.com (2603:10b6:102:13::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3e9d263-34e4-4e30-d59f-08d5d1a341ae 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:ib/U5t2uqG3krxaMRI07efKsuWvMg1WEeYj3dTJUhFyZeuSCX9PZc58BOoiGINupTr4AGCUWY0UiZTphCYi8igl2NJTCJC0MGz6ZMlmN4L+kmvp2A9hNp3ZznxkanpjzhXKiss9tTBlWeG/V2depsD3O4I0/xxKjtfS525MVq9SBiqolKT6IHR3G/mbwQsIqkSQEoEOuEmwtm2nadlD9deO1ZP8g/cmaoVxnkkxh1bc2WO65We9qZMKkWB41VGvJ; 25:13xCuNmz1ihY6ocLTrsuVJGzSi9Rq/8vCECCm/lNMJzEjuClIgNT7e+9VSdEjZDMBAPATGKf8mzFcb+2OHPwgfeiNvJGxgRfdgYZQFsudlI12HYmP62lh2XLLmS64hkKWNVNaGF2+3LHaqrXJME4/DLgatpiQ8elswbzBX7TPXsV5YpDwMpEnJP+FiW5ZsWSAnL9zf45T1zfYjthdVzAaKmMOGYmRiVvSDOdxTPTtO2+VdUAw3uGNN34arf8xReB7z9Wn8fkYylEfGb/ulRhJxl0GxUQAdsf6lv3qv1DX+Ab+JLo/NZMFhJCkU6vLkY00AZEix1MN+3ZsVcVAhrxmQ==; 31:4gyfmLC4AdOlbd+Q4YBkNOZRDXSkArieqkiaUJyt1ZeU1nUErhkUlPxnmXXCf127UPMcYQQyxvnOKJo9vFHJq5+XwhueDVLBaT9PFWz6qVOzxjeJKodtzVynuxjf27ch+Ew1vuUsy3ppey6SVyCVkvkqWZrwtU8ZJbPyxoNEn223p7Wi4NOpotW//DZFsxZeDnmOWzobtJoBtsUnr1rghoozhg5x7Av9swaMr1sfuNc= X-MS-TrafficTypeDiagnostic: CO2PR07MB2519: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 20:FQvY8Ev7JPbXI2iPeoPF/xBYO4n1j9VNEeK/YKdzHwkvJ9hhzZf6U1ALIz7d9ct8Uais/b3+33Mv8jjyR3dyosbF0thTYCuS2pqsvJRC1gz2MPLqvhYuufjskbTWdhIBzkoYcJfsjwDyMfqC7RQFLG5gSjn/rRYq3qRTsVWiqgO9CecEEjIYVeCQcuJWukL0A2i6PZhPNt5w2v8UKDbf+n+/wvKDn9iX/xdwhfLEg7uYcCxuEzPyVCqNltAkIV9A2MRdsTkAHODjs0uNBD4i2yok4df5AIOTbYwqrQUcVeWh9ZmzVbiA4Gaa5XZI2GF2cujtUGDup7iZ4g/3BLdvg4EAKP3XmA9L3N7VhP360+wokPYJGYd5d/0TcnIVx2/U0VPuNg5U1Zv5PshC+sKdWpe3FW6qvIaRu9rBUo1hKEoVEeaeomgZbrnCqhQ0kg+Pu3gjcwWjNpru2tekDh2WCmrw2eJiNk2CD0+/ODIUhceazcC/xFElZlinI4sYZlBuD90ffcOLmSruMlgqA4c67/vntlxPURemEwEoDhvE0YdqzLxe8OJxqNP1I16i9iqQev4RGXBB/Q4P6zf86CUiGjFA0WIJllToRTlE4GuLnXM= 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:PRLWcJ3toV0rvQdsmNe10pTVZYuKAAgSYt8nhfkeqy4k/Fk+1n49irtwXTFiEelLxjEFL7MJtvwxe2STZTJZlwwfeIgGFly9z25QNm7AijpuOKCObL9NotgrqiLyf0bgIfjvPfG45dg0HY5uafBUVl+3CJBLtr2/MpBSswYPsqD/3K1q7j+2zvXa9gB69wYUxNRP7ar6GSRWUPrBiapoTQeUnAs4zFV2SAMfqyWd8Pmh4mPPn81eS0cQiVpc5ZFpcnTcj8xT9dr6tMB866iOFU1WwL0LI+f79fzf8WRflh9DPxCrinXfErMUmTt7Td+TqPcn3Ojf+PqEv0K14RwmMsqwk41eW5sst/IcYMi1fTQ= X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39850400004)(39380400002)(396003)(376002)(346002)(189003)(199004)(13464003)(33656002)(478600001)(55016002)(54906003)(5660300001)(58126008)(6636002)(6666003)(72206003)(16586007)(105586002)(316002)(305945005)(44832011)(446003)(486006)(956004)(11346002)(476003)(2906002)(229853002)(106356001)(50466002)(7736002)(97736004)(16526019)(6116002)(3846002)(25786009)(8676002)(81166006)(66066001)(47776003)(23726003)(1076002)(68736007)(42882007)(81156014)(6246003)(9686003)(386003)(33716001)(6862004)(6496006)(59450400001)(8936002)(76176011)(8656006)(53936002)(52116002)(4326008)(26005)(33896004)(18370500001)(7756004); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2519; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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:5bU+pWb+GUZZYqRDuNK3ibO4FqpCe6z2oCRdkOk/B?= =?us-ascii?Q?HYg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kUqAukrZIqF+5?= =?us-ascii?Q?WNROZHRl4PDTxLzZVOM3G0P2KbFCgrLeDCbse1xJENwIrlgKXKbSoEYFbUaS?= =?us-ascii?Q?kHpXvdL02uWh4JEtp5sfFefzistV2FFj4PNg3wXuJrwNQtDy014UQagVenZB?= =?us-ascii?Q?Ltr4VyHDj7vaVVYG6UzIO+uixxYLgp71di2uyAixXLdEtjQtNJAoWEqG0Iuy?= =?us-ascii?Q?4Y7W3xEBHKfYPi/ooh8acyYIyztk7Bejbxz+dDGaFa8aulA6b2vMkQ0hgn1A?= =?us-ascii?Q?/Y3Vma8Wg/nIffDic3rRPcDCDN1EPJW1XcG//37JtS7L+BeEHqPmqg18ufEl?= =?us-ascii?Q?wa5uhe5bjr0qmBfl8Isk1sWZSyHbV55NeA9S/g8LCicmtueewwrxs3ji+72H?= =?us-ascii?Q?U/wCMIQnhaWWRCTSfaMZo4MtISZ+wl+yIpvH596RWJYKDrwGzcNd131bqhL9?= =?us-ascii?Q?P4SqMX4IxzT5p43DwIodnhUrYHuGQOiVfRBgWLUozW1HCgCTefbWgIMcJ3qK?= =?us-ascii?Q?wBQiAsHKw=3D=3D?= X-Microsoft-Antispam-Message-Info: LS9thfk0SvHvlCMymw87ul2ZhsxAUxnMQ07yMTiGpeBi+GMTad5Wdf9MMZNNWCgEZhCseNb5t/CVPdE+I5i5G0zafhHCyZjUResdJmc0LxNTQonC/UvckTc/K6kTfMrXwdEAF3C9fQj/sQ4xuBDckSqroMCPD+XQixCIyoeSlQNV7SWGEgoMrh/IJApxxp4m X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 6:cZd7osobF5lcL9kVKvU++lsA5rOrZbWX5KbEfqAtS7OKMS/q5HhxjQ4VvafiSfXUevrdLyp0YzS1f3iu12QU1lKXMvu7u6flkx/4TY8Lb1xCPPuhqEoFryXrz7nMhus75NAnEht6f6fMSZRGgTxUmosaRkWwVdhi7YK4CU91Usb3cfJpt4s8tC8ucY6IT8a4cPB5mO3qlRo/5/K56KVrX8x9zZ4dX2ES+FI8+xLd6JV4iLr0pt0vZn4DdoYem1rjKWoQiOVKMMmJ6/cjm3gS82ssVA3xx3OwXPAiJ/MUiPVcgTtoytlFfI4Qr9KZ1+Ja+rjfZlDF/KjuAuEHYIan7zvUGM4zDd1Xz0oQqfhwsV3SLCjlwrvTZszYC3kJW8TvAq4ciB2Wj3LwSnlGNLZyFHZIu/+aBzZedeF5SbSH63znJOErz3ne5buLkeJQfB+KYAv8+Y9Hv1RtR61GSv2yqQ==; 5:lciDcnC1mcMzW0lsbV0jH1H8+ZBy29csfoIGUfRzTuKu82rpfPmQfdtq9GFxa4T/xs288BEbTWF1tzrtFQixCvahbtz0ja0j+AWvZq7OiA1rtGqbrYr4Va2Q6fKt3R7Arq0Q4t+M2rE0B/qSp+jofndY3VAdlzDAVU36ajxYaaw=; 24:ZlXdt0GHoSJISo51XIv1I2l825a/xhtnHw2NoF9mbze4ghAZ5lauzvpAFQAb9wbk/GuUpZN0wXlbA30Mpsz+uoypXLNC4R7wsvC55YutMTs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 7:Bq+/YwHyHC0sOGVCi8tjzQ6gabZmgzUQIqdUVYWCjQQ/nPnO6NkdIzIJPdLwVI4zUpKMDd7TH/KmVjadP67REJ3zyOTNg0RAU0yFV+vAzfn7o7l8J7/6SwoJY7VtJi0buyNyjlgD0vErDj2yRinXhbxUChjgkZsef4vE82NDo1v7mCwfVnUlh3JItyeJIDQKjGUpA9TTACKkKfAuREiVidm1H4gBCaG0ZzkH8T7pTKkfrnLZiiTNM8U/85AtMlb+ X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 03:02:21.8344 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b3e9d263-34e4-4e30-d59f-08d5d1a341ae 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 02/16] crypto/cpt/base: add hardware definitions Cavium 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:02:28 -0000 -----Original Message----- > Date: Fri, 8 Jun 2018 22:15:11 +0530 > From: Anoob Joseph > To: Akhil Goyal , Pablo de Lara > , Thomas Monjalon > Cc: Nithin Dabilpuram , Ankur Dwivedi > , Jerin Jacob , > Murthy NSSR , Narayana Prasad > , Ragothaman Jayaraman > , Srisivasubramanian Srinivasan > , dev@dpdk.org > Subject: [PATCH 02/16] crypto/cpt/base: add hardware definitions Cavium CPT > X-Mailer: git-send-email 2.7.4 > > From: Nithin Dabilpuram > > Adds hardware specific definitions for Cavium CPT device. > > 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_hw_types.h | 836 ++++++++++++++++++++++++++++++++ > drivers/crypto/cpt/base/mcode_defines.h | 215 ++++++++ > 2 files changed, 1051 insertions(+) > create mode 100644 drivers/crypto/cpt/base/cpt_hw_types.h > create mode 100644 drivers/crypto/cpt/base/mcode_defines.h > > diff --git a/drivers/crypto/cpt/base/cpt_hw_types.h b/drivers/crypto/cpt/base/cpt_hw_types.h > new file mode 100644 > index 0000000..b4b2af1 > --- /dev/null > +++ b/drivers/crypto/cpt/base/cpt_hw_types.h > @@ -0,0 +1,836 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2017 Cavium, Inc > + */ > + > +#ifndef __CPT_HW_TYPES_H > +#define __CPT_HW_TYPES_H > + > +#include > +#include > +#include > +#include > +#include Use alphabetical order. > + > +#define CPT_INST_SIZE (64) > +#define CPT_VQ_CHUNK_ALIGN (128) /**< 128 byte align */ > +#define CPT_NEXT_CHUNK_PTR_SIZE (8) > +#define CPT_INST_CHUNK_MAX_SIZE (1023) > + > +#define CPT_PF_VF_MAILBOX_SIZE (2) > + > +#define CPT_VF_INTR_MBOX_MASK (1<<0) > +#define CPT_VF_INTR_DOVF_MASK (1<<1) > +#define CPT_VF_INTR_IRDE_MASK (1<<2) > +#define CPT_VF_INTR_NWRP_MASK (1<<3) > +#define CPT_VF_INTR_SWERR_MASK (1<<4) > +#define CPT_VF_INTR_HWERR_MASK (1<<5) > +#define CPT_VF_INTR_FAULT_MASK (1<<6) > + > +/* > + * CPT_INST_S software command definitions > + * Words EI (0-3) > + */ > +typedef union { > + uint64_t u64; > + struct { > + uint16_t opcode; > + uint16_t param1; > + uint16_t param2; > + uint16_t dlen; > + } s; > +} vq_cmd_word0_t; > + > +typedef union { > + uint64_t u64; > + struct { > +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ Use DPDK primitives for endian checking. > + uint64_t grp : 3; > + uint64_t cptr : 61; > +#else > + uint64_t cptr : 61; > + uint64_t grp : 3; > +#endif > + } s; > + uint8_t reg_A[8]; > + uint8_t ci_key[16]; > +} mc_kasumi_ctx_t; > + > +#define ENC_CTRL(fctx) fctx.enc.enc_ctrl.e > +#define AUTH_CTRL(fctx) fctx.auth.auth_ctrl > +#define P_ENC_CTRL(fctx) fctx->enc.enc_ctrl.e > + > +#define MAX_IVLEN 16 > +#define MAX_KEYLEN 32 If something specific to CPT, IMO, better to start with CPT_ to avoid name collision.