From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0126DA0C55; Wed, 13 Oct 2021 21:06:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CFC74129A; Wed, 13 Oct 2021 21:05:33 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80087.outbound.protection.outlook.com [40.107.8.87]) by mails.dpdk.org (Postfix) with ESMTP id 5A82A41289 for ; Wed, 13 Oct 2021 21:05:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k4tM3Jx91UlfPQ9G1mdWdoogKbXw9VecUGbKk7r79VXKVby8w+QZMsTNEnM71zuDQI19vk1mTuA0c7yHt4rq762M96jxSGz8pPMiT2uw731000tsqUcsiCORkcPRe99aHl520kl2wOxXaudQEaFP0bLy0KYaB5mq+noWWZVwAP5djocRpO1PwsxbwA5esbKcnsKtbL1EmftOGX+5WZBrRrGutrGo4EV0Vt1w8RlJeDMNGPG34rSX9JnMEXiafnonXFeiRq9cpCEAGyh05uIfSc6XvhSOrx/xGVv8Hnw6h5V14L0RS6ihDV79zAOGxTxWKzbc7M1tFAZUzIuNgxSCcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fRB07/gO/99NUNz+t4hLwZuh1YkVBu8sAP7e1JJLKfM=; b=kQdr25GxFN8VwXG/Zo8G6Nx5YC8xAmHQUCCr/23UmOoWn0XHg5lD4SPnLcYSU8PDUg1V+2WHrQkx/7i4atpmxnrm8v5FqT4p3WitcrX1nRFhjjLGSDNJboOtGlbW1ytui4+M5xeXASm4AYGQHhBITfHdYZEUFGwbVsVHkWAUejyw1wxP6cMP26g/FjNkND9NTxwJb1Yo4yLI9tNyzDOVox9UV2TNK13NCgOO6RAtS/ztU1Ia5PAi/axiZ1tAL+qgL3fyL/P9W+EN9NzMKNyxmnv01GQipPu7MU0NiXRh1kcknG6pZ79n8vuk8OkmQPgIzNacIrmdW3i4CIStuk/AIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fRB07/gO/99NUNz+t4hLwZuh1YkVBu8sAP7e1JJLKfM=; b=WNa5UEh7MuOkxsbTWNn34p5+ABU78sgRqHrQvceasiL0vyp67zoe+t+63QVmwHSx4y5KhFJWBK3A4+gKcHZ2znSBo3kze5mB8bPW4Gis5U4ovE8Jv7AzkyhnWUEQ7ePpx1SrJJ6XtkwT1q4kgdz22TGQq5EfRS3CFR9jBMdVcJ0= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8949.eurprd04.prod.outlook.com (2603:10a6:10:2e0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 19:05:29 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80%3]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 19:05:29 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: konstantin.ananyev@intel.com, roy.fan.zhang@intel.com, Gagandeep Singh Date: Thu, 14 Oct 2021 00:30:30 +0530 Message-Id: <20211013190032.2308-14-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211013190032.2308-1-hemant.agrawal@nxp.com> References: <20210907075957.28848-1-hemant.agrawal@nxp.com> <20211013190032.2308-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR0302CA0011.apcprd03.prod.outlook.com (2603:1096:3:2::21) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR0302CA0011.apcprd03.prod.outlook.com (2603:1096:3:2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.4 via Frontend Transport; Wed, 13 Oct 2021 19:05:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1013fc8-929a-4f8a-4b47-08d98e7c6c0c X-MS-TrafficTypeDiagnostic: DU2PR04MB8949: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:169; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UzTNSmRpo3p69XBjDt4yDvVW2lYkt2k0sLnGeuIQBDgWlcNhKKaWiwH4sU6CkMBOtI9DEbjrjQt/NOunRfYIo/MXUzN6Us9H6z3YYGeDCJAAEhmwn326tV+msa8iUaPI/PssXEHo3DgFbGVvtlU3E8qxJ/l4SxH1gBgBhvaoisoJnoWts+FHl2+0Dke0CHTIpOgf5OTe94kulBTQ9KhH1mIAnOGB9bSRfDe2f1/VrsQiMfqlHetJCdba2wkpZbbo7ujIy2dML9b87ddsXjuN1HpX76UdkSCFyqKNQNIe9WNDvMVpUZUC9j0MlpJy3/4jzfqnk+wXfiw2TseVvlwYmwIW5Bi5ZVXqGaavIjo4fpjjnAQoxh+8uB568nRkDIeftrOWW00ZPe5ezLtZbWnjJJ8geEPalZy12CpWpcnVUVqlfAIvwysK9yUVdhFkt0H/znL3ZiIEAluLDNVOfcNYSsOvZ9mmGQIUdOpQKMUbl3ahsLl+yaZivRtL654Sdsg6EglA1Xlz3pFVZnEeCCir2kdyzZgedI+U5ieGxv5eVhGm3eoJyZUqpqBJI/ApHWHI15jENAxISj0r1K7lfAtez/UwIozAMeefxlFogEPrqfZrXygcGx9j8Yh69hdlfiWPiHbdomEyQDQ9OvnXNbAUaSEou1pIO61T1Z4HbrrB2XQKlDpwObRLeFudFgZtYB9pXtR+6h9uovJB0reynEJYSw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38350700002)(38100700002)(86362001)(316002)(186003)(8676002)(1076003)(26005)(6486002)(508600001)(36756003)(2616005)(956004)(83380400001)(5660300002)(6506007)(66946007)(6666004)(4326008)(66476007)(6512007)(44832011)(8936002)(52116002)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?yYLUReHvHyF91ANTuYd1IKqn4zkogPbQMb87PYLQ0rcauRuXMo/Ufd7AjgOy?= =?us-ascii?Q?qdKgOlgMATOBJ0u+6xiYMc1vN3Vcq9WG5CZbZKoMHu1o9+xFyEwaaCEvSr2U?= =?us-ascii?Q?fqSl/y8uqP5K0guAt55clu93cvio54RC+rxB6xBdhT13rAJ/83ppi1VG7ieT?= =?us-ascii?Q?fqertnve8RgYB1AXffNny9/+BKzQr6JEpa66ia+e07Qv4DwboC/sb4ipmJa0?= =?us-ascii?Q?SIjr2+fNbspi6Z7eQv2dXK47DLGDV+81Nc6IeCq1bWORiTITe8gtehzTDdIw?= =?us-ascii?Q?IH7fVWZA8zuLDSubLfbeoonnLxzK+3hspylatkL5NX0vzDAHPcYMira1QfKw?= =?us-ascii?Q?uJxoub/gjW5rR+YXvb7UBBJrWtvpzIFOUeNpHXveRgl5oeIcgzz9UQRUTBwK?= =?us-ascii?Q?TWacRK3YwC4rreDjbSgSKhciK6C1cPvrgAQmJ9Oa7WtPC5AjRhY36L2VBfBA?= =?us-ascii?Q?Rg2lFCB1TEcvf3VySOpHkjUezggBWnMtrG+Jnssu59tOtzLsiElhpN5VOOes?= =?us-ascii?Q?hFQRACeRo7snjqK/3NqjtczPtDsfUKMHyc5OqqmeBH9/S4ck4u1B9omtiW4/?= =?us-ascii?Q?oZRCReI/beZrMrf2OdlVVaSJ++K2eDwc8ePazlt0Cx1WcR+e9ZypQpiOj1Td?= =?us-ascii?Q?hRPQLLYuXqlj5KWna1Tpft2xXY8QLWUznsmiqNbj8KvzGf9zywkpoRRQC9Zh?= =?us-ascii?Q?m0vRyqmckNge/UiLu31ASkSLkz8KwSxZzlePk2IESs+nvKqZhL4ZlmyH5fkS?= =?us-ascii?Q?lPuz40S/5h9KuOZnyHQzHzYfYwR9fCf/nG5kjGRhCPWY/FT5chSjoQMaCWT4?= =?us-ascii?Q?6vwmhPqrkafERw0jGwXIFpQrXlrzLvq1Ejy1Rmif4lt34MzsLO6DbOHVx53w?= =?us-ascii?Q?icIG0SDTCcfsha9Lybg94X2Oz7fjoAu4Wdw2LlTDRAyiuilxDLUWbIZEf4qS?= =?us-ascii?Q?0cbeuLX5wioNDdZlMIDRSjoD7rIjy23bsKizFB3nSGTB9ojpIdrNcAM0HcFd?= =?us-ascii?Q?jdYThCNcn2gOtyDH1DmPka6fka+1N2BVCZWHDsOBQ5D0sIaTVyO5NVcd2s/P?= =?us-ascii?Q?JGhVuOpHLOcdJLfmHWwaGAQm5WiMsXxH5qx/uJx+dk1VWDN9lNFgw+CCYC9u?= =?us-ascii?Q?ZCCeaI+i+hXKCDZKCcQMHj7IPhlyrorTnREQp/spD5xtwk+vGsBLA9ELYS/P?= =?us-ascii?Q?kWXUiAuDrsbtiZ7VEynN8Y6rnNrfF99V78FYPA+ehoOaD4QYGiZMBohQEOhE?= =?us-ascii?Q?1NiDb9HRPgMnAYpzLDNwjEfpBpHf6uRqrKVzU+aMHX9PXfU9h0bc2emRnuuf?= =?us-ascii?Q?lE9QWdZdLb9mW/K4C/zU3/hK?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1013fc8-929a-4f8a-4b47-08d98e7c6c0c X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 19:05:29.1590 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IGOWUDWMovUjhc//6crQeKcmhud8hKBCZyaOCIaiYJBM5iMuBtEmw1QlFyVU/BtncvWI7Y9xYkJFR9435b6xLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8949 Subject: [dpdk-dev] [PATCH v4 13/15] crypto/dpaa_sec: support AEAD and proto with raw APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Gagandeep Singh This add support for AEAD and proto offload with raw APIs for dpaa_sec driver. Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 293 ++++++++++++++++++++++ 1 file changed, 293 insertions(+) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c index 03ce21e53f..522685f8cf 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c @@ -218,6 +218,163 @@ build_dpaa_raw_dp_auth_fd(uint8_t *drv_ctx, return cf; } +static inline struct dpaa_sec_job * +build_raw_cipher_auth_gcm_sg(uint8_t *drv_ctx, + struct rte_crypto_sgl *sgl, + struct rte_crypto_sgl *dest_sgl, + struct rte_crypto_va_iova_ptr *iv, + struct rte_crypto_va_iova_ptr *digest, + struct rte_crypto_va_iova_ptr *auth_iv, + union rte_crypto_sym_ofs ofs, + void *userdata, + struct qm_fd *fd) +{ + dpaa_sec_session *ses = + ((struct dpaa_sec_raw_dp_ctx *)drv_ctx)->session; + struct dpaa_sec_job *cf; + struct dpaa_sec_op_ctx *ctx; + struct qm_sg_entry *sg, *out_sg, *in_sg; + uint8_t extra_req_segs; + uint8_t *IV_ptr = iv->va; + int data_len = 0, aead_len = 0; + unsigned int i; + + for (i = 0; i < sgl->num; i++) + data_len += sgl->vec[i].len; + + extra_req_segs = 4; + aead_len = data_len - ofs.ofs.cipher.head - ofs.ofs.cipher.tail; + + if (ses->auth_only_len) + extra_req_segs++; + + if (sgl->num > MAX_SG_ENTRIES) { + DPAA_SEC_DP_ERR("AEAD: Max sec segs supported is %d", + MAX_SG_ENTRIES); + return NULL; + } + + ctx = dpaa_sec_alloc_raw_ctx(ses, sgl->num * 2 + extra_req_segs); + if (!ctx) + return NULL; + + cf = &ctx->job; + ctx->userdata = (void *)userdata; + + rte_prefetch0(cf->sg); + + /* output */ + out_sg = &cf->sg[0]; + out_sg->extension = 1; + if (is_encode(ses)) + out_sg->length = aead_len + ses->digest_length; + else + out_sg->length = aead_len; + + /* output sg entries */ + sg = &cf->sg[2]; + qm_sg_entry_set64(out_sg, rte_dpaa_mem_vtop(sg)); + cpu_to_hw_sg(out_sg); + + if (dest_sgl) { + /* 1st seg */ + qm_sg_entry_set64(sg, dest_sgl->vec[0].iova); + sg->length = dest_sgl->vec[0].len - ofs.ofs.cipher.head; + sg->offset = ofs.ofs.cipher.head; + + /* Successive segs */ + for (i = 1; i < dest_sgl->num; i++) { + cpu_to_hw_sg(sg); + sg++; + qm_sg_entry_set64(sg, dest_sgl->vec[i].iova); + sg->length = dest_sgl->vec[i].len; + } + } else { + /* 1st seg */ + qm_sg_entry_set64(sg, sgl->vec[0].iova); + sg->length = sgl->vec[0].len - ofs.ofs.cipher.head; + sg->offset = ofs.ofs.cipher.head; + + /* Successive segs */ + for (i = 1; i < sgl->num; i++) { + cpu_to_hw_sg(sg); + sg++; + qm_sg_entry_set64(sg, sgl->vec[i].iova); + sg->length = sgl->vec[i].len; + } + + } + + if (is_encode(ses)) { + cpu_to_hw_sg(sg); + /* set auth output */ + sg++; + qm_sg_entry_set64(sg, digest->iova); + sg->length = ses->digest_length; + } + sg->final = 1; + cpu_to_hw_sg(sg); + + /* input */ + in_sg = &cf->sg[1]; + in_sg->extension = 1; + in_sg->final = 1; + if (is_encode(ses)) + in_sg->length = ses->iv.length + aead_len + + ses->auth_only_len; + else + in_sg->length = ses->iv.length + aead_len + + ses->auth_only_len + ses->digest_length; + + /* input sg entries */ + sg++; + qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg)); + cpu_to_hw_sg(in_sg); + + /* 1st seg IV */ + qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(IV_ptr)); + sg->length = ses->iv.length; + cpu_to_hw_sg(sg); + + /* 2 seg auth only */ + if (ses->auth_only_len) { + sg++; + qm_sg_entry_set64(sg, auth_iv->iova); + sg->length = ses->auth_only_len; + cpu_to_hw_sg(sg); + } + + /* 3rd seg */ + sg++; + qm_sg_entry_set64(sg, sgl->vec[0].iova); + sg->length = sgl->vec[0].len - ofs.ofs.cipher.head; + sg->offset = ofs.ofs.cipher.head; + + /* Successive segs */ + for (i = 1; i < sgl->num; i++) { + cpu_to_hw_sg(sg); + sg++; + qm_sg_entry_set64(sg, sgl->vec[i].iova); + sg->length = sgl->vec[i].len; + } + + if (is_decode(ses)) { + cpu_to_hw_sg(sg); + sg++; + memcpy(ctx->digest, digest->va, + ses->digest_length); + qm_sg_entry_set64(sg, rte_dpaa_mem_vtop(ctx->digest)); + sg->length = ses->digest_length; + } + sg->final = 1; + cpu_to_hw_sg(sg); + + if (ses->auth_only_len) + fd->cmd = 0x80000000 | ses->auth_only_len; + + return cf; +} + static inline struct dpaa_sec_job * build_dpaa_raw_dp_chain_fd(uint8_t *drv_ctx, struct rte_crypto_sgl *sgl, @@ -484,6 +641,135 @@ build_dpaa_raw_dp_cipher_fd(uint8_t *drv_ctx, return cf; } +#ifdef RTE_LIBRTE_SECURITY +static inline struct dpaa_sec_job * +build_dpaa_raw_proto_sg(uint8_t *drv_ctx, + struct rte_crypto_sgl *sgl, + struct rte_crypto_sgl *dest_sgl, + struct rte_crypto_va_iova_ptr *iv, + struct rte_crypto_va_iova_ptr *digest, + struct rte_crypto_va_iova_ptr *auth_iv, + union rte_crypto_sym_ofs ofs, + void *userdata, + struct qm_fd *fd) +{ + RTE_SET_USED(iv); + RTE_SET_USED(digest); + RTE_SET_USED(auth_iv); + RTE_SET_USED(ofs); + + dpaa_sec_session *ses = + ((struct dpaa_sec_raw_dp_ctx *)drv_ctx)->session; + struct dpaa_sec_job *cf; + struct dpaa_sec_op_ctx *ctx; + struct qm_sg_entry *sg, *out_sg, *in_sg; + uint32_t in_len = 0, out_len = 0; + unsigned int i; + + if (sgl->num > MAX_SG_ENTRIES) { + DPAA_SEC_DP_ERR("Proto: Max sec segs supported is %d", + MAX_SG_ENTRIES); + return NULL; + } + + ctx = dpaa_sec_alloc_raw_ctx(ses, sgl->num * 2 + 4); + if (!ctx) + return NULL; + cf = &ctx->job; + ctx->userdata = (void *)userdata; + /* output */ + out_sg = &cf->sg[0]; + out_sg->extension = 1; + qm_sg_entry_set64(out_sg, rte_dpaa_mem_vtop(&cf->sg[2])); + + if (dest_sgl) { + /* 1st seg */ + sg = &cf->sg[2]; + qm_sg_entry_set64(sg, dest_sgl->vec[0].iova); + sg->offset = 0; + sg->length = dest_sgl->vec[0].len; + out_len += sg->length; + + for (i = 1; i < dest_sgl->num; i++) { + /* Successive segs */ + cpu_to_hw_sg(sg); + sg++; + qm_sg_entry_set64(sg, dest_sgl->vec[i].iova); + sg->offset = 0; + sg->length = dest_sgl->vec[i].len; + out_len += sg->length; + } + sg->length = dest_sgl->vec[i - 1].tot_len; + } else { + /* 1st seg */ + sg = &cf->sg[2]; + qm_sg_entry_set64(sg, sgl->vec[0].iova); + sg->offset = 0; + sg->length = sgl->vec[0].len; + out_len += sg->length; + + for (i = 1; i < sgl->num; i++) { + /* Successive segs */ + cpu_to_hw_sg(sg); + sg++; + qm_sg_entry_set64(sg, sgl->vec[i].iova); + sg->offset = 0; + sg->length = sgl->vec[i].len; + out_len += sg->length; + } + sg->length = sgl->vec[i - 1].tot_len; + + } + out_len += sg->length; + sg->final = 1; + cpu_to_hw_sg(sg); + + out_sg->length = out_len; + cpu_to_hw_sg(out_sg); + + /* input */ + in_sg = &cf->sg[1]; + in_sg->extension = 1; + in_sg->final = 1; + in_len = sgl->vec[0].len; + + sg++; + qm_sg_entry_set64(in_sg, rte_dpaa_mem_vtop(sg)); + + /* 1st seg */ + qm_sg_entry_set64(sg, sgl->vec[0].iova); + sg->length = sgl->vec[0].len; + sg->offset = 0; + + /* Successive segs */ + for (i = 1; i < sgl->num; i++) { + cpu_to_hw_sg(sg); + sg++; + qm_sg_entry_set64(sg, sgl->vec[i].iova); + sg->length = sgl->vec[i].len; + sg->offset = 0; + in_len += sg->length; + } + sg->final = 1; + cpu_to_hw_sg(sg); + + in_sg->length = in_len; + cpu_to_hw_sg(in_sg); + + if ((ses->ctxt == DPAA_SEC_PDCP) && ses->pdcp.hfn_ovd) { + fd->cmd = 0x80000000 | + *((uint32_t *)((uint8_t *)userdata + + ses->pdcp.hfn_ovd_offset)); + DPAA_SEC_DP_DEBUG("Per packet HFN: %x, ovd:%u\n", + *((uint32_t *)((uint8_t *)userdata + + ses->pdcp.hfn_ovd_offset)), + ses->pdcp.hfn_ovd); + } + + return cf; +} +#endif + static uint32_t dpaa_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx, struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, @@ -744,6 +1030,13 @@ dpaa_sec_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id, sess->build_raw_dp_fd = build_dpaa_raw_dp_auth_fd; else if (sess->ctxt == DPAA_SEC_CIPHER_HASH) sess->build_raw_dp_fd = build_dpaa_raw_dp_chain_fd; + else if (sess->ctxt == DPAA_SEC_AEAD) + sess->build_raw_dp_fd = build_raw_cipher_auth_gcm_sg; +#ifdef RTE_LIBRTE_SECURITY + else if (sess->ctxt == DPAA_SEC_IPSEC || + sess->ctxt == DPAA_SEC_PDCP) + sess->build_raw_dp_fd = build_dpaa_raw_proto_sg; +#endif else return -ENOTSUP; dp_ctx = (struct dpaa_sec_raw_dp_ctx *)raw_dp_ctx->drv_ctx_data; -- 2.17.1