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 E868FA0C41; Tue, 7 Sep 2021 10:05:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C62A4116E; Tue, 7 Sep 2021 10:04:11 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2063.outbound.protection.outlook.com [40.107.21.63]) by mails.dpdk.org (Postfix) with ESMTP id 7EAAD4115E for ; Tue, 7 Sep 2021 10:04:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n1PPJPiTAN7n4wAMdx90csHHXDhvua8iBHGCaO/PoLIHXg/IQdZaK4qvAr3rRDy9s95zalTCeF4WDR0kde6X3anlvBcg6vxUhpCYuqJP0OWMges5XcL15ZnhAOkvt/WRSpueAvwgTFOhrijH+ztgC9j0f0nRxccvuFVxM4BcndtG4N9GXFFw5uwhkR733qHf9yJIIVTC1JTHBK1jMQnidF6JzFgOb0jJ8w124BdjbNYHwvOgU++mLEadQawpN0so/48wxEBjATuLYrP9ZNCDhbQkWoE6aa8AWLnCXHYxafb/RAykfowYsZ4ZdY9yy2hDmDcGGck02EW0Z218DbXZ4g== 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; bh=zq/eobDY2eB2ryq5gJ2E3KzsNjSc+flFIMoI9kSMeuU=; b=We98fIkCZKOODKQdNPwFmQ6/KiEIcCTslkPTLMrrUbl/mUAvKQcbExni1G0CF+CbnpI7/8fOdjrXvX2QIdJ3SGtjbN3piZjAETUkWqFf0WH+LXjr4CFK2S7FRRClA3eShDt17lMvR9YdxTcGAqGKcPGBhUZlCWoljra+nOSCBns24nNgAjLkDi6SwQ+9AjhZTJw76ctyIwzIgoGZEBBVUfts9KGu693EnZitQ/y5S84uBVBBL8ULRWS8lKaZ2uSAxKNRU2AMG1cRxwKsG7Rkfukai7RHn112i2fV2MRINo08JUjgpvJoHTnUkFYXSLWNC9unRf3nKDVjb+9Adrw4XQ== 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=zq/eobDY2eB2ryq5gJ2E3KzsNjSc+flFIMoI9kSMeuU=; b=OoVfBCEdgOvbU/1mDDTwjMiEeNKzJZM4vb7/rvWk7h5JNCPySS84X2JYlnxUwnOOQhjF+IHnbi3vWbm4IeTOsHAG2tZySj7OWaU2zJBGeEdvWJ5n5y0CwKT/yzLDmPa6SK47qoCluj/e146bjl53E93U/WEKqWzlS6mwOIag9SA= 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 DU2PR04MB8709.eurprd04.prod.outlook.com (2603:10a6:10:2dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Tue, 7 Sep 2021 08:04:08 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80%4]) with mapi id 15.20.4478.025; Tue, 7 Sep 2021 08:04:08 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: konstantin.ananyev@intel.com, roy.fan.zhang@intel.com, Gagandeep Singh Date: Tue, 7 Sep 2021 13:29:51 +0530 Message-Id: <20210907075957.28848-10-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210907075957.28848-1-hemant.agrawal@nxp.com> References: <20210825071510.7913-1-hemant.agrawal@nxp.com> <20210907075957.28848-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0068.apcprd02.prod.outlook.com (2603:1096:4:54::32) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR02CA0068.apcprd02.prod.outlook.com (2603:1096:4:54::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Tue, 7 Sep 2021 08:04:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1caf4b5b-1c17-4fe9-d9ac-08d971d611d1 X-MS-TrafficTypeDiagnostic: DU2PR04MB8709: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:534; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GbHTYIwb20hqfNs3Xvc8qoEhl6DCCff513Gp/fp9tgn3ku3dzGB2XfAiDGln0xwFB/bRh2CLl7Ut08IRPSuucKtYJaKlhw331JzW6A+CpuTpNOWhwu+j1Xii2UaVLrRx8yCrU059JhfekAHVh1gyRwKEChQT/VWKCE843mqsAfRtDnMFBml80gl8xUkICZhUhpEMVUNvbVoGS44D3rGl1CcgsLgoUkDHo353BSLUdvWoY4EZdQ4zy7CzOZ/Tw0VRxZ3r1vFqRtc8nqXbDCrCPsBR+A/mCAxoar97IYPJB08zyW04ntRdhr5po7pTh8LL7BbRtHioWB6aHEWj6dn3LddNlHg+4f65drwGTmaKxmn+E/c1lX89DD2MTPZ8GmGL8Mui+FtlJLg2USwPbxBRKz4zaKNYfGXg3rNcW38sDsg9EaxrmAbCnAxxNY+1xJc8uavfUyDkA6zquUPMfRLRanK0JGhIMg3yGPViEeWh1EC8Rw8K+cQdg6jyf0REPG7tIm//nBj47X0pITZEdOdPzt4wKLCmPMh2Nhuq4hKTnrNEC01kS4PZbWlFGP3Z4IRlKsQyVlHsd5dAcpZq8skqgQMyiFPwhWKgteGJuSclB3+qbs9ChKJmyg2r1GSPf38mG0qaRsiiXfBDBoFJywjB5WRHXaDLrueGlMvhABvg5j68ZndRkDZiSZMqlqgiEVE/Po5h9LHJ9EwP0RDfvVQ2kg== 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)(136003)(39860400002)(366004)(396003)(346002)(376002)(2906002)(956004)(2616005)(86362001)(83380400001)(478600001)(316002)(6512007)(4326008)(52116002)(1076003)(5660300002)(38100700002)(6666004)(38350700002)(36756003)(186003)(26005)(44832011)(66946007)(6486002)(6506007)(66476007)(66556008)(8936002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?BIKwMj663f9Jys18cYMgs5q+etO4z9spKVFbPPssNmvnpcF9mN5QPdCJXWmB?= =?us-ascii?Q?fcHjj9csDaHWV9as2bEnQ9HO7VGqipk7S7oRN/jiW6Kcmu134AnvmknfUdrm?= =?us-ascii?Q?rzgBR/9R67lx40N9RkIG93ftEmxvVzgfI4NFRw0Y9izcHt9Upb7yJNOlekDO?= =?us-ascii?Q?Z3gAuDnfImOSKnqAdUoLivr0wW1U6Bd0cxBUWyji613K5fiARC92bWiqljXB?= =?us-ascii?Q?9zqRggVvmrIBf7QN+wnvjFM76FMVfhiSNr4u/crRWL3a8S9F34o73K3Qck08?= =?us-ascii?Q?S9uwUhnC6cb6haVn7u5LbVq6GDudchtEXI4zYiECxtdqmTx2rh4NwxTppA4c?= =?us-ascii?Q?8GWV3PbKkubV5WwddB/Lve4U4tk2kmrOxdtWoHmrjQakpQH3tFlLvuqUVePp?= =?us-ascii?Q?a1+tYtVR33VrS+4mzGesOG6tYtJfcPfzKtgNTdxZ77uGUAZZtGs4rJUIUXM2?= =?us-ascii?Q?Ltc2oSzX+j499g8GwUcpIaW+mQL/9N+Go+FsT4G03CsA8VIa/miHmgaubfsh?= =?us-ascii?Q?MXwDuL2NFbwvsdBe3/nOX5n+ioHdEeKCCKLHAQfP2jOLXr7GeHsbHTkNyzeC?= =?us-ascii?Q?XM5y0nwNVITsieQKXX+lvNeV2ViRG1cebM4lxQW/8js0UGvaZFAWN2OOlKyE?= =?us-ascii?Q?D95w5oGWSf3ribtI0IioB4kCwrUZ5YCIQ9OhkCltZTrHoqMTULkxOt2/SB2p?= =?us-ascii?Q?0ptCcHEexxA6sgAslqu0usjpP9bQweVX+K9j+yqkXyq1TviXGZfJDy9PMxuG?= =?us-ascii?Q?0mS5BJQrmRCj17W3FKOAEWXh7LHjiHz0gDcfKiLCLkebjUgC8LR4228W0fZF?= =?us-ascii?Q?XqmWNToGzGBXkZrK905rbpHHbODzUpNcbHvF8XP7W6oc8vjIIq9mgmEHKRwG?= =?us-ascii?Q?TtNcTc0R/aqJXPUBpmoZ6yANlL9NsNSaZ8n70CVD6p1rEtaTFRrqZCR6be8K?= =?us-ascii?Q?P+U/rw6L0hxVao21FQi9fqMOcmGj+UnTGe5VtrkWJNbdl/HZqWDnUjEWirU7?= =?us-ascii?Q?pj3JIwNhC7w+tTsEgDzrtk13nu5WJXrayC4vbv87hdqUIz+HzX6BfIr8QHDX?= =?us-ascii?Q?16Pm91iSTUi9+hlz/rW3ESfNRQf5RZi7guTs9UO9nFGezx9b9clAnoxDjIkK?= =?us-ascii?Q?ilEG5i/STS4KdkvsSZ1048wRnCcr0CKQ6HDj2mxi/OGwKm6ptm3T3/bfIeiN?= =?us-ascii?Q?b1h0TnuICoYaLQZ9mwH12AW5/SF0rsgmCZ5UfERR9veUkjqhkP1Q+Kcys28Y?= =?us-ascii?Q?oFd5Dmh2uIDL/XI08C0K3MpmdLghCjaaYBk9GTlTIRu3gGLgiXEPWd7vxeku?= =?us-ascii?Q?/W7GAbgUxMmdu/bwqAATKvyB?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1caf4b5b-1c17-4fe9-d9ac-08d971d611d1 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 08:04:08.7731 (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: VvsEFiqH4v4ofjJ5s0tuETTbS4LIYd+kQaKb1Exg5oF8RPtbwN8LC31Jh17I7Kt8vJP/yU3A1Nshp2dFO4bRmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8709 Subject: [dpdk-dev] [PATCH v2 09/15] crypto/dpaa2_sec: support OOP with raw buffer API 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 add support for out of order processing with raw vector APIs. Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h | 1 + drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 156 +++++++++++++++----- 2 files changed, 116 insertions(+), 41 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h index f6507855e3..db72c11a5f 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -179,6 +179,7 @@ typedef int (*dpaa2_sec_build_fd_t)( typedef int (*dpaa2_sec_build_raw_dp_fd_t)(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, diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c index 5191e5381c..51e316cc00 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c @@ -24,6 +24,7 @@ struct dpaa2_sec_raw_dp_ctx { static int build_raw_dp_chain_fd(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, @@ -89,17 +90,33 @@ build_raw_dp_chain_fd(uint8_t *drv_ctx, (cipher_len + icv_len) : cipher_len; - /* Configure Output SGE for Encap/Decap */ - DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); - DPAA2_SET_FLE_OFFSET(sge, ofs.ofs.auth.head); - sge->length = sgl->vec[0].len - ofs.ofs.auth.head; + /* OOP */ + if (dest_sgl) { + /* Configure Output SGE for Encap/Decap */ + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, ofs.ofs.cipher.head); + sge->length = dest_sgl->vec[0].len - ofs.ofs.cipher.head; - /* o/p segs */ - for (i = 1; i < sgl->num; i++) { - sge++; - DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); - DPAA2_SET_FLE_OFFSET(sge, 0); - sge->length = sgl->vec[i].len; + /* o/p segs */ + for (i = 1; i < dest_sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = dest_sgl->vec[i].len; + } + } else { + /* Configure Output SGE for Encap/Decap */ + DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, ofs.ofs.cipher.head); + sge->length = sgl->vec[0].len - ofs.ofs.cipher.head; + + /* o/p segs */ + for (i = 1; i < sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = sgl->vec[i].len; + } } if (sess->dir == DIR_ENC) { @@ -160,6 +177,7 @@ build_raw_dp_chain_fd(uint8_t *drv_ctx, static int build_raw_dp_aead_fd(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, @@ -219,17 +237,33 @@ build_raw_dp_aead_fd(uint8_t *drv_ctx, (aead_len + icv_len) : aead_len; - /* Configure Output SGE for Encap/Decap */ - DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); - DPAA2_SET_FLE_OFFSET(sge, ofs.ofs.cipher.head); - sge->length = sgl->vec[0].len - ofs.ofs.cipher.head; + /* OOP */ + if (dest_sgl) { + /* Configure Output SGE for Encap/Decap */ + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, ofs.ofs.cipher.head); + sge->length = dest_sgl->vec[0].len - ofs.ofs.cipher.head; - /* o/p segs */ - for (i = 1; i < sgl->num; i++) { - sge++; - DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); - DPAA2_SET_FLE_OFFSET(sge, 0); - sge->length = sgl->vec[i].len; + /* o/p segs */ + for (i = 1; i < dest_sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = dest_sgl->vec[i].len; + } + } else { + /* Configure Output SGE for Encap/Decap */ + DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, ofs.ofs.cipher.head); + sge->length = sgl->vec[0].len - ofs.ofs.cipher.head; + + /* o/p segs */ + for (i = 1; i < sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = sgl->vec[i].len; + } } if (sess->dir == DIR_ENC) { @@ -294,6 +328,7 @@ build_raw_dp_aead_fd(uint8_t *drv_ctx, static int build_raw_dp_auth_fd(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, @@ -303,6 +338,7 @@ build_raw_dp_auth_fd(uint8_t *drv_ctx, { RTE_SET_USED(iv); RTE_SET_USED(auth_iv); + RTE_SET_USED(dest_sgl); dpaa2_sec_session *sess = ((struct dpaa2_sec_raw_dp_ctx *)drv_ctx)->session; @@ -416,6 +452,7 @@ build_raw_dp_auth_fd(uint8_t *drv_ctx, static int build_raw_dp_proto_fd(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, @@ -466,20 +503,39 @@ build_raw_dp_proto_fd(uint8_t *drv_ctx, DPAA2_SET_FLE_SG_EXT(op_fle); DPAA2_SET_FLE_ADDR(op_fle, DPAA2_VADDR_TO_IOVA(sge)); - /* Configure Output SGE for Encap/Decap */ - DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); - DPAA2_SET_FLE_OFFSET(sge, 0); - sge->length = sgl->vec[0].len; - out_len += sge->length; - /* o/p segs */ - for (i = 1; i < sgl->num; i++) { - sge++; - DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); + /* OOP */ + if (dest_sgl) { + /* Configure Output SGE for Encap/Decap */ + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[0].iova); DPAA2_SET_FLE_OFFSET(sge, 0); - sge->length = sgl->vec[i].len; + sge->length = dest_sgl->vec[0].len; + out_len += sge->length; + /* o/p segs */ + for (i = 1; i < dest_sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = dest_sgl->vec[i].len; + out_len += sge->length; + } + sge->length = dest_sgl->vec[i - 1].tot_len; + + } else { + /* Configure Output SGE for Encap/Decap */ + DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = sgl->vec[0].len; out_len += sge->length; + /* o/p segs */ + for (i = 1; i < sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = sgl->vec[i].len; + out_len += sge->length; + } + sge->length = sgl->vec[i - 1].tot_len; } - sge->length = sgl->vec[i - 1].tot_len; out_len += sge->length; DPAA2_SET_FLE_FIN(sge); @@ -528,6 +584,7 @@ build_raw_dp_proto_fd(uint8_t *drv_ctx, static int build_raw_dp_cipher_fd(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, @@ -593,17 +650,33 @@ build_raw_dp_cipher_fd(uint8_t *drv_ctx, op_fle->length = data_len; DPAA2_SET_FLE_SG_EXT(op_fle); - /* o/p 1st seg */ - DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); - DPAA2_SET_FLE_OFFSET(sge, data_offset); - sge->length = sgl->vec[0].len - data_offset; + /* OOP */ + if (dest_sgl) { + /* o/p 1st seg */ + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, data_offset); + sge->length = dest_sgl->vec[0].len - data_offset; - /* o/p segs */ - for (i = 1; i < sgl->num; i++) { - sge++; - DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); - DPAA2_SET_FLE_OFFSET(sge, 0); - sge->length = sgl->vec[i].len; + /* o/p segs */ + for (i = 1; i < dest_sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, dest_sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = dest_sgl->vec[i].len; + } + } else { + /* o/p 1st seg */ + DPAA2_SET_FLE_ADDR(sge, sgl->vec[0].iova); + DPAA2_SET_FLE_OFFSET(sge, data_offset); + sge->length = sgl->vec[0].len - data_offset; + + /* o/p segs */ + for (i = 1; i < sgl->num; i++) { + sge++; + DPAA2_SET_FLE_ADDR(sge, sgl->vec[i].iova); + DPAA2_SET_FLE_OFFSET(sge, 0); + sge->length = sgl->vec[i].len; + } } DPAA2_SET_FLE_FIN(sge); @@ -706,6 +779,7 @@ dpaa2_sec_raw_enqueue_burst(void *qp_data, uint8_t *drv_ctx, memset(&fd_arr[loop], 0, sizeof(struct qbman_fd)); ret = sess->build_raw_dp_fd(drv_ctx, &vec->src_sgl[loop], + &vec->dest_sgl[loop], &vec->iv[loop], &vec->digest[loop], &vec->auth_iv[loop], -- 2.17.1