From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [PATCH 0/4] A proposed DPDK Crypto API and device framework Date: Thu, 20 Aug 2015 15:07:19 +0100 Message-ID: <1440079643-5437-1-git-send-email-declan.doherty@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2E58C8D3B for ; Thu, 20 Aug 2015 15:59:15 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Co-authored-by: Des O Dea Co-authored-by: John Griffin Co-authored-by: Fiona Trahe This series of patches proposes a set of application burst oriented APIs = for asynchronous symmetric cryptographic functions within DPDK. It also cont= ains a poll mode driver cryptographic device framework for the implementation of crypto devices within DPDK. In the patch set we also have included 2 reference implementations of cry= pto PMDs, both are still early in development but act as an example of how we envisage the APIs and device framework to be used. Currently both implementations only support AES128-CBC with HMAC_SHA1/SHA256/SHA512 authentication operations. The first device is a purely software PMD base= d on Intel's multi-buffer library, which utilises both AES-NI instructions and vector operations to accelerate crypto operations and the second PMD util= ises Intel's Quick Assist Technology (on DH895xxC) to provide hardware acceler= ated crypto operations. The proposed API set supports two functional modes of operation:=20 1, A session oriented mode. In this mode the user creates a crypto sessio= n which defines all the immutable data required to perform a particular cry= pto operation in advance, including cipher/hash algorithms and operations to = be performed as well as the keys to used etc. The session is then referenced= by the crypto operation data structure which is a data structure specific to= each mbuf. It is used to contain all mutable data about the cryto operation to= be performed, such as data offsets and lengths into the mbuf's data payload = for cipher and hash operations to be performed.=20 2, A session-less mode. In this mode the user is able to provision crypto operations on an mbuf without the need to have a cached session created i= n advance, but at the cost of entailing the overhead of calculating authentication pre-computes and preforming key expansions in-line with th= e crypto operation. Only the crypto operation data structure must be comple= ted in this mode but all of immutable crypto operation parameters that would be normally set within a session are now specified within the crypto operati= on data structure. Once all mutable and immutable parameters are set the cry= pto operation data structure can be attached to the specified mbuf and enqueu= ed on a specified crypto device for processing.=20 The patch set contains the following features: - Crypto device APIs and device framework - Example implementation of a software crypto PMD based on multi-buffer l= ibrary - Example implementation of a hardware crypto PMD baed on Intel QAT(DH895= xxC) - Unit and performance test's which give and example of utilising the cry= pto API's. Current Status: The patch set has only been compiled and tested with 64-b= it gcc. There is no support for chained mbuf's and as mentioned above the PM= D's have only currently implemented support for AES128-CBC/AES256-CBC/AES512-= CBC and HMAC_SHA1/SHA256/SHA512. At this stage we are looking for feedback on= the proposed API's and the framework implementations.=20 Declan Doherty (3): cryptodev: Initial DPDK Crypto APIs and device framework release aesni_mb_pmd: Initial implementation of multi buffer based crypto device app/test: add cryptodev unit and performance tests John Griffin (1): qat_crypto_pmd: Addition of a new QAT DPDK PMD. app/test/Makefile | 7 +- app/test/test.c | 91 +- app/test/test.h | 34 +- app/test/test_cryptodev.c | 1079 ++++++++++++++= + app/test/test_cryptodev_perf.c | 1438 ++++++++++++++= ++++++ app/test/test_link_bonding.c | 6 +- app/test/test_link_bonding_mode4.c | 7 +- config/common_bsdapp | 30 +- config/common_linuxapp | 29 +- doc/api/doxy-api-index.md | 1 + doc/api/doxy-api.conf | 1 + doc/guides/cryptodevs/aesni_mb.rst | 76 ++ doc/guides/cryptodevs/index.rst | 43 + doc/guides/cryptodevs/qat.rst | 155 +++ doc/guides/index.rst | 1 + drivers/Makefile | 1 + drivers/crypto/Makefile | 38 + drivers/crypto/aesni_mb/Makefile | 67 + drivers/crypto/aesni_mb/aesni_mb_ops.h | 206 +++ drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 550 ++++++++ drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 346 +++++ drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 224 +++ drivers/crypto/aesni_mb/rte_pmd_aesni_version.map | 5 + drivers/crypto/qat/Makefile | 63 + .../qat/qat_adf/adf_transport_access_macros.h | 173 +++ drivers/crypto/qat/qat_adf/icp_qat_fw.h | 316 +++++ drivers/crypto/qat/qat_adf/icp_qat_fw_la.h | 404 ++++++ drivers/crypto/qat/qat_adf/icp_qat_hw.h | 305 +++++ drivers/crypto/qat/qat_adf/qat_algs.h | 124 ++ drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 462 +++++++ drivers/crypto/qat/qat_crypto.c | 469 +++++++ drivers/crypto/qat/qat_crypto.h | 99 ++ drivers/crypto/qat/qat_logs.h | 78 ++ drivers/crypto/qat/qat_qp.c | 372 +++++ drivers/crypto/qat/rte_pmd_qat_version.map | 5 + drivers/crypto/qat/rte_qat_cryptodev.c | 128 ++ lib/Makefile | 1 + lib/librte_cryptodev/Makefile | 60 + lib/librte_cryptodev/rte_crypto.h | 649 +++++++++ lib/librte_cryptodev/rte_crypto_version.map | 40 + lib/librte_cryptodev/rte_cryptodev.c | 966 +++++++++++++ lib/librte_cryptodev/rte_cryptodev.h | 550 ++++++++ lib/librte_cryptodev/rte_cryptodev_pmd.h | 622 +++++++++ lib/librte_eal/common/include/rte_log.h | 1 + lib/librte_eal/common/include/rte_memory.h | 14 +- lib/librte_mbuf/rte_mbuf.c | 1 + lib/librte_mbuf/rte_mbuf.h | 51 + mk/rte.app.mk | 8 + 48 files changed, 10346 insertions(+), 50 deletions(-) create mode 100644 app/test/test_cryptodev.c create mode 100644 app/test/test_cryptodev_perf.c create mode 100644 doc/guides/cryptodevs/aesni_mb.rst create mode 100644 doc/guides/cryptodevs/index.rst create mode 100644 doc/guides/cryptodevs/qat.rst create mode 100644 drivers/crypto/Makefile create mode 100644 drivers/crypto/aesni_mb/Makefile create mode 100644 drivers/crypto/aesni_mb/aesni_mb_ops.h create mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c create mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c create mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h create mode 100644 drivers/crypto/aesni_mb/rte_pmd_aesni_version.map create mode 100644 drivers/crypto/qat/Makefile create mode 100644 drivers/crypto/qat/qat_adf/adf_transport_access_macro= s.h create mode 100644 drivers/crypto/qat/qat_adf/icp_qat_fw.h create mode 100644 drivers/crypto/qat/qat_adf/icp_qat_fw_la.h create mode 100644 drivers/crypto/qat/qat_adf/icp_qat_hw.h create mode 100644 drivers/crypto/qat/qat_adf/qat_algs.h create mode 100644 drivers/crypto/qat/qat_adf/qat_algs_build_desc.c create mode 100644 drivers/crypto/qat/qat_crypto.c create mode 100644 drivers/crypto/qat/qat_crypto.h create mode 100644 drivers/crypto/qat/qat_logs.h create mode 100644 drivers/crypto/qat/qat_qp.c create mode 100644 drivers/crypto/qat/rte_pmd_qat_version.map create mode 100644 drivers/crypto/qat/rte_qat_cryptodev.c create mode 100644 lib/librte_cryptodev/Makefile create mode 100644 lib/librte_cryptodev/rte_crypto.h create mode 100644 lib/librte_cryptodev/rte_crypto_version.map create mode 100644 lib/librte_cryptodev/rte_cryptodev.c create mode 100644 lib/librte_cryptodev/rte_cryptodev.h create mode 100644 lib/librte_cryptodev/rte_cryptodev_pmd.h --=20 1.9.3