[v10,0/4] cryptodev: add raw data-path APIs
Message ID | 20200924163417.49983-1-roy.fan.zhang@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91D1FA04B6; Thu, 24 Sep 2020 18:34:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DEEE1DECA; Thu, 24 Sep 2020 18:34:25 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5B9931DEC6 for <dev@dpdk.org>; Thu, 24 Sep 2020 18:34:23 +0200 (CEST) IronPort-SDR: HK82kuvLK/71AFbBAzcAO8iooCzd/XZKbedSlgESF0ZK7QDBq8By1KtV2p+971SNSpSDOIXAph 1vpzeTEXyZpw== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="162162676" X-IronPort-AV: E=Sophos;i="5.77,298,1596524400"; d="scan'208";a="162162676" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 09:34:22 -0700 IronPort-SDR: zpTijZXasuxnp51CvRo6AxFfozKMgZ/gQEcFH50mq0JXbEgjcrO0WOOKE6i4VvQczjGD/O7I1o M2TAu+eYol5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,298,1596524400"; d="scan'208";a="512233174" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.136]) by fmsmga005.fm.intel.com with ESMTP; 24 Sep 2020 09:34:20 -0700 From: Fan Zhang <roy.fan.zhang@intel.com> To: dev@dpdk.org Cc: akhil.goyal@nxp.com, fiona.trahe@intel.com, arkadiuszx.kusztal@intel.com, adamx.dybkowski@intel.com, anoobj@marvell.com, konstantin.ananyev@intel.com, Fan Zhang <roy.fan.zhang@intel.com> Date: Thu, 24 Sep 2020 17:34:13 +0100 Message-Id: <20200924163417.49983-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200908084253.81022-1-roy.fan.zhang@intel.com> References: <20200908084253.81022-1-roy.fan.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [dpdk-dev v10 0/4] cryptodev: add raw data-path APIs 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> |
Message
Fan Zhang
Sept. 24, 2020, 4:34 p.m. UTC
The Crypto Raw data-path APIs are a set of APIs are designed to enable externel libraries/applications which want to leverage the cryptographic processing provided by DPDK crypto PMDs through the cryptodev API but in a manner that is not dependent on native DPDK data structures (eg. rte_mbuf, rte_crypto_op, ... etc) in their data-path implementation. The raw data-path APIs have the following advantages: - External data structure friendly design. The new APIs uses the operation descriptor ``struct rte_crypto_sym_vec`` that supports raw data pointer and IOVA addresses as input. Moreover, the APIs does not require the user to allocate the descriptor from mempool, nor requiring mbufs to describe input data's virtual and IOVA addresses. All these features made the translation from user's own data structure into the descriptor easier and more efficient. - Flexible enqueue and dequeue operation. The raw data-path APIs gives the user more control to the enqueue and dequeue operations, including the capability of precious enqueue/dequeue count, abandoning enqueue or dequeue at any time, and operation status translation and set on the fly. V10: - Changed rte_crypto_sym_vec structure to support both sync cpu_crypto and async raw data-path API. - Changed documentation. - Changed API names. - Changed the way data-path context is initialized. - Added new API to attach session or xform to existing context. - Changed QAT PMD accordingly with new APIs. - Changed unit test to use the device feature flag for the raw API tests. v9: - Changed return types of submit_done() and dequeue_done() APIs. - Added release note update. v8: - Updated following by comments. - Fixed a few bugs. - Fixed ARM build error. - Updated the unit test covering all tests. v7: - Fixed a few typos. - Fixed length calculation bugs. v6: - Rebased on top of DPDK 20.08. - Changed to service ctx and added single job submit/dequeue. v5: - Changed to use rte_crypto_sym_vec as input. - Changed to use public APIs instead of use function pointer. v4: - Added missed patch. v3: - Instead of QAT only API, moved the API to cryptodev. - Added cryptodev feature flags. v2: - Used a structure to simplify parameters. - Added unit tests. - Added documentation. Fan Zhang (4): cryptodev: change crypto symmetric vector structure cryptodev: add raw crypto data-path APIs crypto/qat: add raw crypto data-path API support test/crypto: add unit-test for cryptodev raw API test app/test/test_cryptodev.c | 784 ++++++++++++++- app/test/test_cryptodev.h | 12 + app/test/test_cryptodev_blockcipher.c | 58 +- doc/guides/prog_guide/cryptodev_lib.rst | 96 +- doc/guides/rel_notes/release_20_11.rst | 10 + drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 18 +- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 9 +- drivers/crypto/qat/meson.build | 1 + drivers/crypto/qat/qat_sym.h | 11 + drivers/crypto/qat/qat_sym_hw_dp.c | 951 ++++++++++++++++++ drivers/crypto/qat/qat_sym_pmd.c | 9 +- lib/librte_cryptodev/rte_crypto_sym.h | 40 +- lib/librte_cryptodev/rte_cryptodev.c | 104 ++ lib/librte_cryptodev/rte_cryptodev.h | 354 ++++++- lib/librte_cryptodev/rte_cryptodev_pmd.h | 47 +- .../rte_cryptodev_version.map | 11 + lib/librte_ipsec/esp_inb.c | 12 +- lib/librte_ipsec/esp_outb.c | 12 +- lib/librte_ipsec/misc.h | 6 +- 19 files changed, 2437 insertions(+), 108 deletions(-) create mode 100644 drivers/crypto/qat/qat_sym_hw_dp.c