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 C4207A0547; Sun, 17 Oct 2021 18:22:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E21DB4115F; Sun, 17 Oct 2021 18:21:54 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20050.outbound.protection.outlook.com [40.107.2.50]) by mails.dpdk.org (Postfix) with ESMTP id 2F5074115C for ; Sun, 17 Oct 2021 18:21:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ToYwDYIEZtPDS1OLT8a6+7lAix72XASPtliwk3etCGRuArt2YFMH8Y3LUwIDNh3GTd3BFPu+eqmvdZhCBJvLRfWsKIVU6DLMOaS20OrSKwY5Y+eD7iG7r2WNqiunfaaUNxrwpJA8JoiMG1etNEFHOpavB9XXlWnLVpcPHkORClzeRXM9YJF+O0I9Xy7Vi2mif/CUKLJHcLzh7XY/1o10tX2FDdhbG7r8deH1pYmXg+j5fAbQUu6/iTbMfNAdWqpMVvl7kJSUN4FDiCzZKbEmdD/Bj2s3xKZEzWzojHTfvUs0ZwOzIhJfXrHjaqOssXoHuUSb4EQbcAoymm2SL68RPw== 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=fKGle9r+62o28erbKGDIBcHELjYFv0NKQ0LNcizGwiBkXRS4jN3HhASD1KK3raBuoLdUx2+09NHlq2KHOHrer41qUUZ8QLjtIvgkIIw3bvRmFoi1lYOieGdH7lAe9XLLWrT3HDYE8Ky4QWUgcDAUS9OjBRfZaOMb4SYEGFMoKS++Cd6iTA16e0gHY373uROsGRIAzXozZ/0Mrmxdthc7SEgs4xehbAgO2E1QHNdrLiTJyQWZZ8N1DSnnMZoxiuO/J9+aJQlH1a+sMW8bXBGo6RuBrKfbNm2UEdYVTeHOY/GqQnd7Y6BVy8d10AwXk5hg2295R4vpYOmB12BCehPqmw== 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=f5GyR6iKCzR0seXYTTBCwti7jYHfIU/VkDci1SxnuimJhcCoJh7aPK4eh55wiGaDv8yPF7X0ARPQoZpS61jrJ6lJcenMZuScNJVEZJt8DAXvnHGHNXe4GSR/PI2X18YsA6xH1rMpElf2zJC/8dvBah4j9JVH4f9U1N2XyJjZnq8= 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 DU2PR04MB8615.eurprd04.prod.outlook.com (2603:10a6:10:2da::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Sun, 17 Oct 2021 16:21:52 +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.4608.018; Sun, 17 Oct 2021 16:21:52 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: konstantin.ananyev@intel.com, roy.fan.zhang@intel.com, Gagandeep Singh Date: Sun, 17 Oct 2021 21:46:49 +0530 Message-Id: <20211017161651.9220-14-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211017161651.9220-1-hemant.agrawal@nxp.com> References: <20211013190032.2308-1-hemant.agrawal@nxp.com> <20211017161651.9220-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0053.apcprd01.prod.exchangelabs.com (2603:1096:4:193::7) 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 SI2PR01CA0053.apcprd01.prod.exchangelabs.com (2603:1096:4:193::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Sun, 17 Oct 2021 16:21:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1bf1187-60eb-4729-256d-08d9918a3a7c X-MS-TrafficTypeDiagnostic: DU2PR04MB8615: 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: THXHYpR9mqLr76n0Zl6Ipol6BG1OQw503z7poVvtNyNUft2CO1TOnTsRwXaPopPTcsnzN7/32NJFQC5nADbIukevnvlEduVYpBrzMXYr64JOJQjt7SJKxT+J0YzSwVlyo6R4Yrohbrq1ZoV4C4Lk3ZrMuNcdtJLsKSp1tYEoI2aUXX4tqvQ/VvzwkLcz3w3xEVwTPu3JWXwIMtoOpVNzKdFRzZOVEq0VxxGBKwSTu4RJX/ucptPEob2x7iRVxHIYDz3hZhks5X6UgfmAey9k53cwFQFn3XLfKcCopdMLxzcdfMJqk8ZwBCiQO7/16ypQcYRnjHJnjF64x1npVfO+25pk7vKPJv0yqpJxpqWBPVX7pvAX9c/wse4qj9vfiCgPtwMiMzZjGuasJQZtanh4eFQppZNRMreiIAkb5pafGI1rCfuEDkrIBz66LaiTP5fqbXeWZ8c7jg+CRSnpP38/uaA4FG970HA9dLPidjvmJ28+LrSLKMpk7FKSiAW9RqG+qya6pMPojvEWJhfdDmW5mYv7yDJozX5hwUH6ZjKJrZuo8XRSW3wh/xFqiLwl4KR8jBUWOwpR7lQnXQrzFTsoRrGtgcsgAkn7LfyMc5npi/Lc/lwyA9crNSj/PyQJVQ3v4nJxC2cdL/+fC7JbJPcGRv8nqscWMJ2SySgqqqnkRpidlCHKtd0QxyNimQwhPRcalk8GAYD0Zct15segGlezqQ== 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)(6486002)(66476007)(8936002)(66556008)(66946007)(86362001)(52116002)(36756003)(5660300002)(38350700002)(8676002)(38100700002)(508600001)(6506007)(26005)(44832011)(4326008)(6512007)(2616005)(83380400001)(1076003)(2906002)(316002)(186003)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zsP/FG7reAlMvEcYtChVQH4EmGC+r0rVN7yebvDXgxmtyn95RrixNVRUuaVd?= =?us-ascii?Q?JCYx6BvF8sA7LU5cpu0CizOr3hbPR2zPJ8PjA1H3YztCIh5hC7vS54aQwsDn?= =?us-ascii?Q?z6FWzS1oaks1XoIZX4TFUne7YxZ0lzu44SGuP6bKIutOXIzLLuu0sM6aaRQr?= =?us-ascii?Q?AI5MagdhVg2VRddjv/JBKAJ9x7BTbGjWybrNGjCuelRnMs1K0yRA+shF0LPH?= =?us-ascii?Q?/7Fi7BFDn9QM+9OIOUU+ZmuT/BExYsYOZf5kB7B5Ubmq2vi48bGK8khbjDWQ?= =?us-ascii?Q?XAqk+dveAxRFOpoFVd1znaJXtCMOiOEbCtF3ywwrSHeojvC8NQXy6XUgPafZ?= =?us-ascii?Q?T7vlXsOUy2awxExPqaIHbw7DExk4ETMHN8EDH5kelQEg5ZK9gsjVM0dHxh6n?= =?us-ascii?Q?eg24ZnIoIMkbmdHKxDQcOHLhmKgN2RC3cwOolFhSUTmoV96aIs6Xo10EbADY?= =?us-ascii?Q?t/SWBf3bPQo8+WZxB7UFBEHOYemERG9bIz1QPCFrovlfM8w7hpyUJChzsQlF?= =?us-ascii?Q?WSL5S0bqF6EYW5iCoNpDEVqw3IXuLLr7l8usGw9O8HigLz04DkYBQh0Zj1KQ?= =?us-ascii?Q?GdlIDBoLyicRxD7ar1bDc1HNKcvE72i6VA4/0PMXOrZI+6P3r9reSUqQvJ1L?= =?us-ascii?Q?tisz8jPysjg5gK5ABQHFGS3DPKCCqHZtT+2aYH/3Y5ON4quJcDOdQSk6gk1M?= =?us-ascii?Q?4sQsI6J11gOii1lhF7zMlnPYnWF7KddPPzrwFVEVOWvXz4QlZCjxk0gIqKPo?= =?us-ascii?Q?KEiEIFvaIjZ3R+Ik228b9xllcKnFQ00JXUeeQMxpaoocSfH4oU752K8qoOpi?= =?us-ascii?Q?8YYt3W5/W4647A8PLHHm6AHe8XJfx/mSUGihgiPtr90gl1NSw9zIbYXYxu95?= =?us-ascii?Q?DJ6pyXD/0x32+luP8aX2OpLaTda/BI7In53RQ921umZ+88aXgtCEdO3ZpY0P?= =?us-ascii?Q?tDWXipYVMTSpgelNM2u4ovRJO0LKJfrerSP9e9kl4UdcGjo4fEvnWInTqysR?= =?us-ascii?Q?UJkLSfefLua21kPuqr3XNsBfhQ0jPJMQtZvFEs+/VxFN/q2G5YwGFcUOocB1?= =?us-ascii?Q?mlewOl/zsJObKg1rim1ygQpofWgtcGVR3uVkIU9Bl4mkxhBad2mjHkraq//f?= =?us-ascii?Q?fTDI1Jf4y9TneiG40q2Lza15HbIg8Npvelb7jB7ojreE0oR0oDf8GrFCkiBD?= =?us-ascii?Q?4vZkpps5jMGVRtIRMovX3Jhty7VvQBwlBPXQ+8bG/Tkx1MRrCl+G+Qs+9jCQ?= =?us-ascii?Q?4hB4iHTlN7Guz003j7+fOPaxpMtgft1ztsrUAwQTHyuNamUWNg7qJQ6HW3U0?= =?us-ascii?Q?FW5qP55ioymqJrbrDCH/sxOe?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1bf1187-60eb-4729-256d-08d9918a3a7c X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2021 16:21:52.4296 (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: EdCk96z3vr8MV7/QQ4MfKG+p22INfSezRyGRxgIaweDvewEpdXF5nhBXUtvsnPYZ/eBTt9qLfjWZhA9hgaGiJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8615 Subject: [dpdk-dev] [PATCH v5 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