This patch add PDCP short mac support in dpaa2_sec driver. Signed-off-by: Gagandeep Singh <g.si...@nxp.com> --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 ++++ drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 9 +++++++++ 2 files changed, 13 insertions(+)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 1ccead3641..fe5cf76162 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3290,6 +3290,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 } -- 2.25.1