crypto/dpaa_sec: support PDCP short MAC-I
authorGagandeep Singh <g.singh@nxp.com>
Wed, 8 Sep 2021 12:51:27 +0000 (18:21 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 8 Sep 2021 15:20:30 +0000 (17:20 +0200)
This patch add PDCP security short MAC-I support for
dpaa_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/dpaa_sec/dpaa_sec.c
drivers/crypto/dpaa_sec/dpaa_sec.h

index b7e5128..3fa8018 100644 (file)
@@ -76,6 +76,7 @@ New Features
 * **Updated NXP dpaa_sec crypto PMD.**
 
   * Added DES-CBC, AES-XCBC-MAC, AES-CMAC and non-HMAC algo support.
+  * Added PDCP short MAC-I support.
 
 * **Updated NXP dpaa2_sec crypto PMD.**
 
index fa4d276..d5aa274 100644 (file)
@@ -311,6 +311,9 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
                                        ses->pdcp.hfn_threshold,
                                        &cipherdata, &authdata,
                                        0);
+       } else if (ses->pdcp.domain == RTE_SECURITY_PDCP_MODE_SHORT_MAC) {
+               shared_desc_len = cnstr_shdsc_pdcp_short_mac(cdb->sh_desc,
+                                                    1, swap, &authdata);
        } else {
                if (ses->dir == DIR_ENC) {
                        if (ses->pdcp.sdap_enabled)
index c94d78e..5030478 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- *   Copyright 2016-2020 NXP
+ *   Copyright 2016-2021 NXP
  *
  */
 
@@ -958,6 +958,15 @@ static const struct rte_security_capability dpaa_sec_security_cap[] = {
                },
                .crypto_capabilities = dpaa_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 = dpaa_pdcp_capabilities
+       },
        {
                .action = RTE_SECURITY_ACTION_TYPE_NONE
        }