Message ID | 20190927062533.19005-1-rnagadheeraj@marvell.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9482D28EE; Fri, 27 Sep 2019 08:26:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id DB49F1E34 for <dev@dpdk.org>; Fri, 27 Sep 2019 08:26:28 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8R5nuiQ002498; Thu, 26 Sep 2019 23:26:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=3zhS6MNd571YY20xHHDEfbAVoLpayeFRRJtEG3fsFbI=; b=cdB+8bP6gXW7uW3dInFQn/+E9if7wizDqXsaNcNnxGBQhUoFAGOYdrZBmng1fHQUkWwZ MMZOf+jCLR+pqZPAY3ieZ/yUO8DsmdHlpaMQnkcbrHTdcnx9X58M6s6FQj5sziBnoFLP exYTWLW7VBZMiXJUNaKlkdHZMxhyLEXohp8+F27GuSm4vbjozwN3bXjSXJ+aYGN7rrg5 nyMij9QudkMnIPi3HyO5xqJVoeKktxd6mSxEjrL02SVBXEIS/MUXWbITCdqRqoOT2hda Qpa9Xtsk4Z3CHBK+Lg1OxD2hHi487NEUhm0KbeKjo+BtRjpgCZ+nMi5QHyB9nLDrPRpM QA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2v8vf24688-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 26 Sep 2019 23:26:28 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 26 Sep 2019 23:26:26 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.58) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 26 Sep 2019 23:26:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBuEymC29tE+6tAX06k/rrQoR0I2xvujLZWf7YF0UhM83X6+rFuuzEXvymf1nUf/GqHenDEewtS7RAn9Zf7Xs1mL9WZsMU27Cgr5SXsZgn2NlBcDenVFREfX7wP+7WXv/1w2zubWxJuHJMWpohMaBloKGxVC0BQVBsJVxqoDtclEbqLWEQQ5VQAOtYXrOaOzICaiTrnOhnnQDrDkByelWB7HQc9AaD92SL2cpQttUUezlBKTwYoSK4d5NnxsXRw9RnBoZYJ2wS3x8WvgwiW5RG4cO/M0z49pwlBHM1Fk3sBsaVpDBld33bkuZV/mO7ioA477QKjGazqzRnLXiE+2dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3zhS6MNd571YY20xHHDEfbAVoLpayeFRRJtEG3fsFbI=; b=QwVb8hVNkEPa4kVNQ432Wg5FmtC0p9yfI6LwDCZdTe0rxEK8Ryf7PMdjTBr25nUIZMeILdAl5awp7uWowVB1lKCMtRqn9tKGP7dk0Jl8yEhT2vGE96aVUnxL/69GRxywmdtm9pfk7uzLz6+5nPNhaWvA4u9OJeDQnPTeIwRmuuLUmFIh+T59kfE44XIWZIrH3FJvZSBdPMgko+SIMJguntKpHXWDxtLJSK/OwDHQg45Qlp3w2Q9UaA4l+07qF9/Or6X3ZN2X98Z4EsuP/Ph6WUukVaqHyFUJe+OdlSC/FlX3OsVCfZBhtsrpaGz1eUFEUVQYCTTr/qhLKleF3M1G5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3zhS6MNd571YY20xHHDEfbAVoLpayeFRRJtEG3fsFbI=; b=PMgF9VIIstyX5G8ANqIuYJxIL/E4m6M3dLDCBgOY7vlwKFOUmdWFExILW9IHKKeJg/2kEvSq8prHkwdHbn5NLV7AoeeMjWc/RJNYZOgYyvDJFl4TZ2kSqgzVMsyzZ3MHyVRdUlvXhcPUsnTW/gYO2IX7580UYPJ6xAoLvro87SI= Received: from BYAPR18MB2792.namprd18.prod.outlook.com (20.179.56.216) by BYAPR18MB2984.namprd18.prod.outlook.com (20.179.59.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.19; Fri, 27 Sep 2019 06:26:24 +0000 Received: from BYAPR18MB2792.namprd18.prod.outlook.com ([fe80::7112:68c6:eb44:e9aa]) by BYAPR18MB2792.namprd18.prod.outlook.com ([fe80::7112:68c6:eb44:e9aa%3]) with mapi id 15.20.2284.028; Fri, 27 Sep 2019 06:26:23 +0000 From: Nagadheeraj Rottela <rnagadheeraj@marvell.com> To: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>, "pablo.de.lara.guarch@intel.com" <pablo.de.lara.guarch@intel.com> CC: Srikanth Jampala <jsrikanth@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>, Nagadheeraj Rottela <rnagadheeraj@marvell.com> Thread-Topic: [PATCH v6 0/8] add Nitrox crypto device support Thread-Index: AQHVdPx7uYJPG8uV10y3DhyAg64Nig== Date: Fri, 27 Sep 2019 06:26:22 +0000 Message-ID: <20190927062533.19005-1-rnagadheeraj@marvell.com> References: <20190716091016.4788-1-rnagadheeraj@marvell.com> In-Reply-To: <20190716091016.4788-1-rnagadheeraj@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PN1PR0101CA0025.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:c::11) To BYAPR18MB2792.namprd18.prod.outlook.com (2603:10b6:a03:105::24) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.13.6 x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b2ec82bc-c944-4823-9d54-08d743139dd9 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:BYAPR18MB2984; x-ms-traffictypediagnostic: BYAPR18MB2984: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <BYAPR18MB2984DDAF4953761C5F96A443D6810@BYAPR18MB2984.namprd18.prod.outlook.com> x-ms-oob-tlc-oobclassifiers: OLM:3631; x-forefront-prvs: 0173C6D4D5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(136003)(366004)(39860400002)(346002)(189003)(199004)(6436002)(26005)(2906002)(107886003)(14444005)(102836004)(3846002)(1076003)(66066001)(14454004)(6486002)(55236004)(36756003)(305945005)(256004)(478600001)(186003)(6506007)(66946007)(110136005)(76176011)(8936002)(8676002)(54906003)(6116002)(71190400001)(5660300002)(71200400001)(52116002)(386003)(66556008)(66446008)(446003)(11346002)(2501003)(86362001)(81166006)(64756008)(316002)(4326008)(66476007)(25786009)(50226002)(99286004)(2616005)(476003)(7736002)(486006)(81156014)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2984; H:BYAPR18MB2792.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: lZABX9n2ZywpxTK7lLB76SzagEgUseRPIdBweztk4PhWZYPxT70n1uygkewT1ntrkzqNs6ubteGBFNKcJTmcNgPzjrwgmUY44+3Cc4J/asKCXB8blNMcj1FcLLFTI3X8z2+qix9IscpIskHgGh51q+UmZ7+S4lRSEbnte3dvWyDAssBxZkvTW+0sOudhb8Xb5PF05M42bsnfo6fJ6DwP5BzNEizoF3n7cs/KTKqfXzxRP1MUsyzlPr3F0fjF9ihanDfykbwUlIFkh2NY8TMNYJL1DCNpkTYDh9gX1bVJ81ldN6y0eMILQRkcJsNno6M+LnbEgJLJUOP7VqFJ+8sDV1/CKIUVIG6xzzyocA7ynuM/3nlAUSwHbyvGveDzkVIiDXxoxtki+Ug+b4oPJIunOXs0WqTNymfQpTx83GjUUms= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b2ec82bc-c944-4823-9d54-08d743139dd9 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2019 06:26:23.0727 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0oWwd7Ic4UwIO4DKLzSLlvgxJ+gbdk3z4auCD6muOyA8NiT7xH5o/jGBpuPle5LdXnRoQG6Cpz/qOJLX2OYlPivxWmcOpnt75Z/hKrneHaM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2984 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-09-27_04:2019-09-25,2019-09-27 signatures=0 Subject: [dpdk-dev] [PATCH v6 0/8] add Nitrox crypto device support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
add Nitrox crypto device support
|
|
Message
Nagadheeraj Rottela
Sept. 27, 2019, 6:26 a.m. UTC
Add the Nitrox PMD to support Nitrox crypto device. --- v6: * Updated Nitrox cryptodev html guide. * Updated release notes 19.11. v5: * Combined related changes together and merged into single patch. * Defined macros for PCI vendor and device ids. * Checking return value of nitrox_sym_pmd_destroy() in pci remove. * Removed wrapper macro over RTE_CRYPTODEV_NAME_MAX_LEN. * Added cryptodev feature flags in the code and documentation in a patch where they are supported. * Added capabilities in the patch where they are supported. * Implemented nitrox_sym_dev_config() and validating the number of queue pairs requested in the config. * Used RTE_SET_USED() in place of __rte_unused and added comments in empty functions. * Removed empty lines which are not required. v4: * Added wmb between pending_count store and sr pointer store in enqueue operation. This is required to safely read sr in dequeue operation. v3: * Add SHA224 and SHA256 HMAC algorithms v2: * Fix compilation error on AARCH64. * Fix checkpatch warning "UNNECESSARY_ELSE: else is not generally useful after a break or return". Nagadheeraj Rottela (8): crypto/nitrox: add Nitrox PMD library crypto/nitrox: create Nitrox symmetric cryptodev crypto/nitrox: add software queue management functionality crypto/nitrox: add hardware queue management functionality crypto/nitrox: add session management operations crypto/nitrox: add burst enqueue and dequeue operations crypto/nitrox: add cipher auth crypto chain processing test/crypto: add tests for Nitrox PMD MAINTAINERS | 7 + app/test/test_cryptodev.c | 52 ++ app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_aes_test_vectors.h | 48 +- app/test/test_cryptodev_blockcipher.c | 9 +- app/test/test_cryptodev_blockcipher.h | 1 + config/common_base | 5 + doc/guides/cryptodevs/features/nitrox.ini | 40 ++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/cryptodevs/nitrox.rst | 51 ++ doc/guides/rel_notes/release_19_11.rst | 5 + drivers/crypto/Makefile | 1 + drivers/crypto/meson.build | 4 +- drivers/crypto/nitrox/Makefile | 34 ++ drivers/crypto/nitrox/meson.build | 19 + drivers/crypto/nitrox/nitrox_csr.h | 40 ++ drivers/crypto/nitrox/nitrox_device.c | 124 ++++ drivers/crypto/nitrox/nitrox_device.h | 22 + drivers/crypto/nitrox/nitrox_hal.c | 236 ++++++++ drivers/crypto/nitrox/nitrox_hal.h | 165 +++++ drivers/crypto/nitrox/nitrox_logs.c | 14 + drivers/crypto/nitrox/nitrox_logs.h | 15 + drivers/crypto/nitrox/nitrox_qp.c | 115 ++++ drivers/crypto/nitrox/nitrox_qp.h | 108 ++++ drivers/crypto/nitrox/nitrox_sym.c | 733 +++++++++++++++++++++++ drivers/crypto/nitrox/nitrox_sym.h | 13 + drivers/crypto/nitrox/nitrox_sym_capabilities.c | 99 +++ drivers/crypto/nitrox/nitrox_sym_capabilities.h | 12 + drivers/crypto/nitrox/nitrox_sym_ctx.h | 84 +++ drivers/crypto/nitrox/nitrox_sym_reqmgr.c | 638 ++++++++++++++++++++ drivers/crypto/nitrox/nitrox_sym_reqmgr.h | 23 + drivers/crypto/nitrox/rte_pmd_nitrox_version.map | 3 + mk/rte.app.mk | 1 + 33 files changed, 2704 insertions(+), 19 deletions(-) create mode 100644 doc/guides/cryptodevs/features/nitrox.ini create mode 100644 doc/guides/cryptodevs/nitrox.rst create mode 100644 drivers/crypto/nitrox/Makefile create mode 100644 drivers/crypto/nitrox/meson.build create mode 100644 drivers/crypto/nitrox/nitrox_csr.h create mode 100644 drivers/crypto/nitrox/nitrox_device.c create mode 100644 drivers/crypto/nitrox/nitrox_device.h create mode 100644 drivers/crypto/nitrox/nitrox_hal.c create mode 100644 drivers/crypto/nitrox/nitrox_hal.h create mode 100644 drivers/crypto/nitrox/nitrox_logs.c create mode 100644 drivers/crypto/nitrox/nitrox_logs.h create mode 100644 drivers/crypto/nitrox/nitrox_qp.c create mode 100644 drivers/crypto/nitrox/nitrox_qp.h create mode 100644 drivers/crypto/nitrox/nitrox_sym.c create mode 100644 drivers/crypto/nitrox/nitrox_sym.h create mode 100644 drivers/crypto/nitrox/nitrox_sym_capabilities.c create mode 100644 drivers/crypto/nitrox/nitrox_sym_capabilities.h create mode 100644 drivers/crypto/nitrox/nitrox_sym_ctx.h create mode 100644 drivers/crypto/nitrox/nitrox_sym_reqmgr.c create mode 100644 drivers/crypto/nitrox/nitrox_sym_reqmgr.h create mode 100644 drivers/crypto/nitrox/rte_pmd_nitrox_version.map
Comments
Hi Nagadheeraj, I am no expert in crypto dev, maybe you can educate me if I am wrong: I got an impression in this series, the barriers were used too much, too heavily and unnecessarily. For enqueue operations, I understand they are stores to the DMA buffer, the queue will be fetched and updated by the crypto device after processing, then dequeued by the other CPU cores. So for enqueue operations, an rte_io_wmb is required before the doorbell ringing, and an rte_smp_wmb is required to ensure the enqueue operations were done before the consumer on the other side(who dequeues) sees the updated pending_count. For dequeue operations, rte_smp_rmb is required after reading the pending_count to ensure reading the intact content from the queue(if the queue entries were not handled yet by the crypto dev, the status will show that, maybe an rte_io_rmb is required to ensure the status is read out first). The rte_smp_xmb can even be optimized with C11 atomics, but it can be next step. Best Regards, Gavin
Hi Gavin, Thanks for your comments. Your suggestions are applicable in this case. I will remove the usage of rte_wmb() and rte_rmb() in all places as they are not required. I will add rte_smp_wmb() before pending count update in enqueue operation and add rte_smp_rmb() before reading softreq from pending queue. I will add rte_io_wmb() before the ring doorbell to ensure all the DMA buffers & descriptors stores are completed. We check command completion based on the completion code update (which is the last word in the output buffer) and hence rte_io_rmb() is not required. Best Regards, Dheeraj > -----Original Message----- > From: Gavin Hu (Arm Technology China) <Gavin.Hu@arm.com> > Sent: Saturday, September 28, 2019 8:17 PM > To: Nagadheeraj Rottela <rnagadheeraj@marvell.com>; > Akhil.goyal@nxp.com; pablo.de.lara.guarch@intel.com > Cc: Srikanth Jampala <jsrikanth@marvell.com>; dev@dpdk.org; Honnappa > Nagarahalli <Honnappa.Nagarahalli@arm.com>; Gavin Hu (Arm Technology > China) <Gavin.Hu@arm.com>; nd <nd@arm.com>; nd <nd@arm.com> > Subject: [EXT] RE: [PATCH v6 0/8] add Nitrox crypto device support > > External Email > > ---------------------------------------------------------------------- > Hi Nagadheeraj, > > I am no expert in crypto dev, maybe you can educate me if I am wrong: > I got an impression in this series, the barriers were used too much, too > heavily and unnecessarily. > > For enqueue operations, I understand they are stores to the DMA buffer, > the queue will be fetched and updated by the crypto device after processing, > then dequeued by the other CPU cores. So for enqueue operations, an > rte_io_wmb is required before the doorbell ringing, and an rte_smp_wmb is > required to ensure the enqueue operations were done before the consumer > on the other side(who dequeues) sees the updated pending_count. For > dequeue operations, rte_smp_rmb is required after reading the > pending_count to ensure reading the intact content from the queue(if the > queue entries were not handled yet by the crypto dev, the status will show > that, maybe an rte_io_rmb is required to ensure the status is read out first). > > The rte_smp_xmb can even be optimized with C11 atomics, but it can be > next step. > > Best Regards, > Gavin