From: Gagandeep Singh Date: Wed, 8 Sep 2021 12:51:26 +0000 (+0530) Subject: crypto/dpaa2_sec: support PDCP short MAC-I X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3d1037e92a3c66ed03e751f3e995f9330b18a2a0;p=dpdk.git crypto/dpaa2_sec: support PDCP short MAC-I This patch add PDCP short mac support in dpaa2_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 50e4fb1205..b7e5128be5 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -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 ------------- diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index b8d57c2b22..dfa72f3f93 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -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) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h index 7dbc69f6cb..8dee0a4bda 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -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 }