[v3,8/8] doc: add doc updates for DOCSIS security protocol
Checks
Commit Message
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 <david.coyle@intel.com>
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
---
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(-)
Comments
Hi David,
> Subject: [PATCH v3 8/8] doc: add doc updates for DOCSIS security protocol
>
> 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 <david.coyle@intel.com>
> Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Overall the patches looks good. However, I will do a detailed review soon.
> ---
> 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(-)
This patch should be split and merged to relevant other patches in the series.
rte_security related in 1/8
Like aesni-mb related changes should go in 3/8
qat related should be part of 4/8
crypto-perf should be part of 7/8
And release notes should also be split into 3 different entries and squashed into
Rte_security, qat and aesni-mb patches.
<snip>
> +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.
The above note is not correct. It should be
* The offset and length of data for which CRC need to be computed 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
> ---------------------------------
>
<snip>
> 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.
Split this release note entry into two, 1 for 1/8 and one for 7/8
> +
> +* **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.
> +
>
Hi Akhil, thank you for these comments
>
> This patch should be split and merged to relevant other patches in the series.
> rte_security related in 1/8
> Like aesni-mb related changes should go in 3/8 qat related should be part of
> 4/8 crypto-perf should be part of 7/8 And release notes should also be split
> into 3 different entries and squashed into Rte_security, qat and aesni-mb
> patches.
[DC] I will make this change in v4.
I will wait until there are more comments before submitting v4.
> > +
> > +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.
>
> The above note is not correct. It should be
> * The offset and length of data for which CRC need to be computed are
> specified
> via the auth offset and length fields of the rte_crypto_sym_op.
[DC] Yes, that is a good clarification - I will make that update
> >
> > +* **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.
>
> Split this release note entry into two, 1 for 1/8 and one for 7/8
[DC] I will make this change
@@ -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
@@ -6,6 +6,7 @@
[Features]
Symmetric crypto = Y
Sym operation chaining = Y
+Protocol offload = Y
CPU SSE = Y
CPU AVX = Y
CPU AVX2 = Y
@@ -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
@@ -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
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -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
~~~~~~~~~~~~
@@ -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
-------------
@@ -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 <n>``
+
+ Set DOCSIS header size(n) in bytes.
+
Test Vector File
~~~~~~~~~~~~~~~~