From: Gagandeep Singh Date: Wed, 8 Sep 2021 12:51:27 +0000 (+0530) Subject: crypto/dpaa_sec: support PDCP short MAC-I X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=93e2661efbfc7e5e7542873a4c1c0e16f9b059c8;p=dpdk.git crypto/dpaa_sec: support PDCP short MAC-I This patch add PDCP security short MAC-I support for dpaa_sec driver. Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index b7e5128be5..3fa8018695 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -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.** diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index fa4d276ead..d5aa2748d6 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -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) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index c94d78e046..503047879e 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -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 }