crypto/dpaa2_sec: support PDCP short MAC-I
authorGagandeep Singh <g.singh@nxp.com>
Wed, 8 Sep 2021 12:51:26 +0000 (18:21 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 8 Sep 2021 14:56:56 +0000 (16:56 +0200)
This patch add PDCP short mac support in dpaa2_sec driver.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
doc/guides/rel_notes/release_21_11.rst
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h

index 50e4fb1..b7e5128 100644 (file)
@@ -77,6 +77,10 @@ New Features
 
   * Added DES-CBC, AES-XCBC-MAC, AES-CMAC and non-HMAC algo support.
 
+* **Updated NXP dpaa2_sec crypto PMD.**
+
+  * Added PDCP short MAC-I support.
+
 
 Removed Items
 -------------
index b8d57c2..dfa72f3 100644 (file)
@@ -3309,6 +3309,10 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
                                        pdcp_xform->hfn_threshold,
                                        &cipherdata, &authdata,
                                        0);
+
+       } else if (pdcp_xform->domain == RTE_SECURITY_PDCP_MODE_SHORT_MAC) {
+               bufsize = cnstr_shdsc_pdcp_short_mac(priv->flc_desc[0].desc,
+                                                    1, swap, &authdata);
        } else {
                if (session->dir == DIR_ENC) {
                        if (pdcp_xform->sdap_enabled)
index 7dbc69f..8dee0a4 100644 (file)
@@ -941,6 +941,15 @@ static const struct rte_security_capability dpaa2_sec_security_cap[] = {
                },
                .crypto_capabilities = dpaa2_pdcp_capabilities
        },
+       { /* PDCP Lookaside Protocol offload Short MAC */
+               .action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
+               .protocol = RTE_SECURITY_PROTOCOL_PDCP,
+               .pdcp = {
+                       .domain = RTE_SECURITY_PDCP_MODE_SHORT_MAC,
+                       .capa_flags = 0
+               },
+               .crypto_capabilities = dpaa2_pdcp_capabilities
+       },
        {
                .action = RTE_SECURITY_ACTION_TYPE_NONE
        }