From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 492F8A0523; Tue, 30 Jun 2020 18:54:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03F751C065; Tue, 30 Jun 2020 18:54:02 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C6BE71BF8E for ; Tue, 30 Jun 2020 18:53:58 +0200 (CEST) IronPort-SDR: HneE46fTgX193XP4uCNAWMdr25/OqlheE20BFoV8J4L90Pf8Ob4Sqikqt8Mbk9gpu578FIIBvD gcgcrDJd3TjA== X-IronPort-AV: E=McAfee;i="6000,8403,9667"; a="207816053" X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="207816053" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 09:53:57 -0700 IronPort-SDR: P6Md1HNIJvN/94vkuXfIm5purk6ZWIawjGXoINuK72vEhvw6Bk4595oASTH/K+VHNS88RLO1kM MEKTfoLQcDJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,298,1589266800"; d="scan'208";a="386747447" Received: from silpixa00399912.ir.intel.com (HELO silpixa00399912.ger.corp.intel.com) ([10.237.223.64]) by fmsmga001.fm.intel.com with ESMTP; 30 Jun 2020 09:53:52 -0700 From: David Coyle To: akhil.goyal@nxp.com, declan.doherty@intel.com, pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, roy.fan.zhang@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com, brendan.ryan@intel.com, hemant.agrawal@nxp.com, anoobj@marvell.com, ruifeng.wang@arm.com, lironh@marvell.com, rnagadheeraj@marvell.com, jsrikanth@marvell.com, G.Singh@nxp.com, jianjay.zhou@huawei.com, ravi1.kumar@amd.com, bruce.richardson@intel.com, olivier.matz@6wind.com, honnappa.nagarahalli@arm.com, stephen@networkplumber.org, alexr@mellanox.com, jerinj@marvell.com, David Coyle , Mairtin o Loingsigh Date: Tue, 30 Jun 2020 17:30:49 +0100 Message-Id: <20200630163049.61900-9-david.coyle@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200630163049.61900-1-david.coyle@intel.com> References: <20200623101423.9215-1-david.coyle@intel.com> <20200630163049.61900-1-david.coyle@intel.com> Subject: [dpdk-dev] [PATCH v3 8/8] doc: add doc updates for DOCSIS security protocol 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update Security library, AESNI-MB crypto PMD, QAT crypto PMD, dpdk-test-crypto-perf tool and release note documentation for DOCSIS protocol support. Signed-off-by: David Coyle Signed-off-by: Mairtin o Loingsigh --- doc/guides/cryptodevs/aesni_mb.rst | 8 ++ doc/guides/cryptodevs/features/aesni_mb.ini | 1 + doc/guides/cryptodevs/features/qat.ini | 1 + doc/guides/cryptodevs/qat.rst | 7 ++ doc/guides/prog_guide/rte_security.rst | 114 +++++++++++++++++++- doc/guides/rel_notes/release_20_08.rst | 16 +++ doc/guides/tools/cryptoperf.rst | 5 + 7 files changed, 150 insertions(+), 2 deletions(-) diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst index cc64f1243..15388d20a 100644 --- a/doc/guides/cryptodevs/aesni_mb.rst +++ b/doc/guides/cryptodevs/aesni_mb.rst @@ -55,10 +55,18 @@ AEAD algorithms: * RTE_CRYPTO_AEAD_AES_CCM * RTE_CRYPTO_AEAD_AES_GCM +Protocol offloads: + +* RTE_SECURITY_PROTOCOL_DOCSIS + Limitations ----------- * Chained mbufs are not supported. +* Out-of-place is not supported for combined Crypto-CRC DOCSIS security + protocol. +* RTE_CRYPTO_CIPHER_DES_DOCSISBPI is not supported for combined Crypto-CRC + DOCSIS security protocol. Installation diff --git a/doc/guides/cryptodevs/features/aesni_mb.ini b/doc/guides/cryptodevs/features/aesni_mb.ini index 49cb82a39..38d255aff 100644 --- a/doc/guides/cryptodevs/features/aesni_mb.ini +++ b/doc/guides/cryptodevs/features/aesni_mb.ini @@ -6,6 +6,7 @@ [Features] Symmetric crypto = Y Sym operation chaining = Y +Protocol offload = Y CPU SSE = Y CPU AVX = Y CPU AVX2 = Y diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini index a72241997..2d56b187a 100644 --- a/doc/guides/cryptodevs/features/qat.ini +++ b/doc/guides/cryptodevs/features/qat.ini @@ -7,6 +7,7 @@ Symmetric crypto = Y Sym operation chaining = Y HW Accelerated = Y +Protocol offload = Y In Place SGL = Y OOP SGL In SGL Out = Y OOP SGL In LB Out = Y diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst index c2cc3d5ca..ee873e7b8 100644 --- a/doc/guides/cryptodevs/qat.rst +++ b/doc/guides/cryptodevs/qat.rst @@ -76,6 +76,9 @@ Supported AEAD algorithms: * ``RTE_CRYPTO_AEAD_AES_GCM`` * ``RTE_CRYPTO_AEAD_AES_CCM`` +Protocol offloads: + +* ``RTE_SECURITY_PROTOCOL_DOCSIS`` Supported Chains ~~~~~~~~~~~~~~~~ @@ -126,6 +129,10 @@ Limitations generations in the same process if planning to use for GCM. * The mixed algo feature on GEN2 is not supported by all kernel drivers. Check the notes under the Available Kernel Drivers table below for specific details. +* Out-of-place is not supported for combined Crypto-CRC DOCSIS security + protocol. +* ``RTE_CRYPTO_CIPHER_DES_DOCSISBPI`` is not supported for combined Crypto-CRC + DOCSIS security protocol. Extra notes on KASUMI F9 ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/guides/prog_guide/rte_security.rst b/doc/guides/prog_guide/rte_security.rst index 9b5d249de..af4281587 100644 --- a/doc/guides/prog_guide/rte_security.rst +++ b/doc/guides/prog_guide/rte_security.rst @@ -10,8 +10,9 @@ The security library provides a framework for management and provisioning of security protocol operations offloaded to hardware based devices. The library defines generic APIs to create and free security sessions which can support full protocol offload as well as inline crypto operation with -NIC or crypto devices. The framework currently only supports the IPsec and PDCP -protocol and associated operations, other protocols will be added in future. +NIC or crypto devices. The framework currently only supports the IPsec, PDCP +and DOCSIS protocols and associated operations, other protocols will be added +in the future. Design Principles ----------------- @@ -296,6 +297,53 @@ Just like IPsec, in case of PDCP also header addition/deletion, cipher/ de-cipher, integrity protection/verification is done based on the action type chosen. +DOCSIS Protocol +~~~~~~~~~~~~~~~ + +The Data Over Cable Service Interface Specification (DOCSIS) support comprises +the combination of encryption/decryption and CRC generation/verification, for +use in a DOCSIS-MAC pipeline. + +.. code-block:: c + + + Downlink Uplink + -------- ------ + + Ethernet frame Ethernet frame + from core network to core network + | ^ + ~ | + | ~ ----+ + V | | + +---------|----------+ +----------|---------+ | + | CRC generation | | CRC verification | | + +---------|----------+ +----------|---------+ | combined + | | > Crypto + CRC + +---------|----------+ +----------|---------+ | + | Encryption | | Decryption | | + +---------|----------+ +----------|---------+ | + | ^ | + ~ | ----+ + | ~ + V | + DOCSIS frame DOCSIS frame + to Cable Modem from Cable Modem + +The encryption/decryption is a combination of CBC and CFB modes using either AES +or DES algorithms as specified in the DOCSIS Security Specification (from DPDK +lib_rtecryptodev perspective, these are RTE_CRYPTO_CIPHER_AES_DOCSISBPI and +RTE_CRYPTO_CIPHER_DES_DOCSISBPI). + +The CRC is Ethernet CRC-32 as specified in Ethernet/[ISO/IEC 8802-3]. + +.. note:: + + * The CRC offset and length are specified via the auth offset and + length fields of the rte_crypto_sym_op. + * Other DOCSIS protocol functionality such as Header Checksum (HCS) + calculation may be added in the future. + Device Features and Capabilities --------------------------------- @@ -408,6 +456,56 @@ PMD which supports the IPsec and PDCP protocol. } } +Below is an example of the capabilities for a PMD which supports the DOCSIS +protocol. + +.. code-block:: c + + static const struct rte_security_capability pmd_security_capabilities[] = { + { /* DOCSIS Uplink */ + .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, + .protocol = RTE_SECURITY_PROTOCOL_DOCSIS, + .docsis = { + .direction = RTE_SECURITY_DOCSIS_UPLINK + }, + .crypto_capabilities = pmd_capabilities + }, + { /* DOCSIS Downlink */ + .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, + .protocol = RTE_SECURITY_PROTOCOL_DOCSIS, + .docsis = { + .direction = RTE_SECURITY_DOCSIS_DOWNLINK + }, + .crypto_capabilities = pmd_capabilities + }, + { + .action = RTE_SECURITY_ACTION_TYPE_NONE + } + }; + static const struct rte_cryptodev_capabilities pmd_capabilities[] = { + { /* AES DOCSIS BPI */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + .sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + .cipher = { + .algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI, + .block_size = 16, + .key_size = { + .min = 16, + .max = 32, + .increment = 16 + }, + .iv_size = { + .min = 16, + .max = 16, + .increment = 0 + } + } + } + }, + + RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() + }; Capabilities Discovery ~~~~~~~~~~~~~~~~~~~~~~ @@ -491,6 +589,7 @@ Security Session configuration structure is defined as ``rte_security_session_co struct rte_security_ipsec_xform ipsec; struct rte_security_macsec_xform macsec; struct rte_security_pdcp_xform pdcp; + struct rte_security_docsis_xform docsis; }; /**< Configuration parameters for security session */ struct rte_crypto_sym_xform *crypto_xform; @@ -538,6 +637,8 @@ The ``rte_security_session_protocol`` is defined as /**< MACSec Protocol */ RTE_SECURITY_PROTOCOL_PDCP, /**< PDCP Protocol */ + RTE_SECURITY_PROTOCOL_DOCSIS, + /**< DOCSIS Protocol */ }; Currently the library defines configuration parameters for IPsec and PDCP only. @@ -594,6 +695,15 @@ PDCP related configuration parameters are defined in ``rte_security_pdcp_xform`` uint32_t hfn_threshold; }; +DOCSIS related configuration parameters are defined in ``rte_security_docsis_xform`` + +.. code-block:: c + + struct rte_security_docsis_xform { + enum rte_security_docsis_direction direction; + /**< DOCSIS direction */ + }; + Security API ~~~~~~~~~~~~ diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index 39064afbe..0e72a26b1 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -56,6 +56,22 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **Added support for DOCSIS protocol to rte_security.** + + Added support for combined crypto and CRC operations for the DOCSIS protocol + to ``rte_security``. Test and test-crypto-perf applications have been updated + for unit testing. + +* **Updated the AESNI MB crypto PMD.** + + Added support for lookaside protocol offload for DOCSIS through the + ``rte_security`` API. + +* **Updated the QuickAssist Technology (QAT) Crypto PMD.** + + Added support for lookaside protocol offload for DOCSIS through the + ``rte_security`` API. + Removed Items ------------- diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst index a19ccb262..a8df8bc99 100644 --- a/doc/guides/tools/cryptoperf.rst +++ b/doc/guides/tools/cryptoperf.rst @@ -193,6 +193,7 @@ The following are the application command-line options: auth-then-cipher aead pdcp + docsis For GCM/CCM algorithms you should use aead flag. @@ -342,6 +343,10 @@ The following are the application command-line options: Set PDCP domain to specify Control/user plane. +* ``--docsis-hdr-sz `` + + Set DOCSIS header size(n) in bytes. + Test Vector File ~~~~~~~~~~~~~~~~ -- 2.17.1