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 70BB5A0093; Fri, 22 Apr 2022 05:52:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C86442838; Fri, 22 Apr 2022 05:51:59 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20089.outbound.protection.outlook.com [40.107.2.89]) by mails.dpdk.org (Postfix) with ESMTP id 34EEC42823 for ; Fri, 22 Apr 2022 05:51:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aVXac9pmayuGpGne/Lx/YrJHIGFDMV7u55/zcv5xr0FMXhOVkc10mrbcxwH8jc0cMEzAVTMZgbkMq5tgOGUABB4056gHqCdBmBYHFT5D5b48116jsBu9oH73DtZfwzjH/leWSY2t5HmccDfo1gtdTD5mhZo2pFxVG+Zcsa4l11ePmzaVG4q8NSTSCORmPcAtr7sBozSgb2s3k4MT+bsIcFWL743w5gnOSEVOaPs3up8GLg86D3mujb0qz9JuG74xvnPx3GIDWcE8zlwTk1lYnedlP4Ko9sihop25GOyKPw7Nc/nIWvfY/MyiVOnhAI3FTCF1LOse2GG7uBZ60TnSGQ== 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=v7A5lZGMQDeo6t/1R76ZVLIQdOLukmNqUlw02dfpBhk=; b=HLJTY9cTTOmN33akbVNkai8wrnlq4DohT28+3HBu5zqi6PMNtsc+doW//lOQtiD7lQs/dlsHtxXjSKZftZwh/LZ5NP58AdIrdfHw2NfN/VY6wX7piuRWl9PCAOALASvnxSH5Tnw8U0ILq68vQaVUc8L5RrWn9hjSKZaHxc2jL+lmtpVetRNQfydTWyBWDMgrTMwtvNHlY1ElpRl1rM/myJa+0WaFaKCuAAzOhE0ry9LtkupzJXfyGdT7sPAk2ykUxbHbgqDP1/diPNO//3oE3/myKafImXxYxrzBSuy5X1WRotsyslGj0QtfKKGyqianqYnzQKIGIZrmVoJgE9a2Zw== 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=v7A5lZGMQDeo6t/1R76ZVLIQdOLukmNqUlw02dfpBhk=; b=BgvOTJZ/VRylH6ZONsqbZ3TZidr2NHNxXaFM+EO2jMlSwGyeBslDTAB8RTnOPItt6keKpoP2bFqb3AN08Oh6ORYFK4pEHXVZ5A0cfEPAQWv5XPVz/qE/liF0z21+7wq65fUkYS/azLu0uEXHoWX7xFr10uaoUx3t1oodS9YlOcA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) by DB7PR04MB4393.eurprd04.prod.outlook.com (2603:10a6:5:32::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Fri, 22 Apr 2022 03:51:57 +0000 Received: from AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2]) by AS8PR04MB8198.eurprd04.prod.outlook.com ([fe80::8cf1:93b:c340:3be2%7]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 03:51:57 +0000 From: Gagandeep Singh To: gakhil@marvell.com, dev@dpdk.org Cc: Gagandeep Singh Subject: [PATCH 13/14] crypto/dpaa_sec: move cdb prepration to session create Date: Fri, 22 Apr 2022 09:20:59 +0530 Message-Id: <20220422035100.3180870-13-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422035100.3180870-1-g.singh@nxp.com> References: <20220422035100.3180870-1-g.singh@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0127.apcprd03.prod.outlook.com (2603:1096:4:91::31) To AS8PR04MB8198.eurprd04.prod.outlook.com (2603:10a6:20b:3b0::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 806f9e5e-30bc-4b42-ff6f-08da24137273 X-MS-TrafficTypeDiagnostic: DB7PR04MB4393:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JkL/fRpR8iAqsN7uYw3FfcAXjOCpj+us1hTVXmbrFSQalX/LtYYvW01X68ZzbWtCGNIQ5OEQq6jZqKS94fqWeU5r9glJRKvzYtP57Z9N+MOvLFATAr/7yeQxZRP9QucP7Qh0l64aueDo8ySvRAd7ZHD4lW1zfqh3QQPi7jGC2qgGWo2f4TsBbwmczqFf5vtu1HZuITBYK7MB6PCvya5fve7H7+EO7WZw1pBIWLqQMA0+dcF+tzGcNZU6oiijrmJ9botHk8GBJcEsAZi0ODn5KIpluBgZ0lqr7fEdp4SaeWylrMG5qtFkHiQ6m/mdOQ4/tUSNrQZQdD8rrLUm+VIL2bskS1BIk9Gn1L0KAoMNGPoBy5j8wono3A/Y9FrKGlZ+qSTuvgKyjyQI1LvOwM77/W7wtO/+/MJ3S7fQsXTMHuueY9Bev61VFcJHUNT/IllEj4YgZPIPiyHi7b9QHdY7MV9Q7g/VLKiD88fzSoq3Ek67T+1kiTVPwEWa3rhgqCdMZ5rv4w+Zdh2GQOqNbx5pIdvFlCenYiplJmK1KtX9jm3vIRqTZugBmrWqYZkpyxSvLp2/pP1rvK/msyjiwdpx9kEFZdjmLfnKcZMYEHVjO560vM8NQ1gw7IoLVqAk1pb7GRZFoXoZMZTG12+AoiojGrhZkjT5uO5D4XIj1sk2tYKNhGnthispZxPwI1q6bdYvobe2mZJXJY7egiJPU479dQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8198.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(36756003)(2616005)(6486002)(1076003)(8936002)(86362001)(316002)(52116002)(66946007)(26005)(6506007)(6512007)(186003)(66556008)(66476007)(83380400001)(38350700002)(38100700002)(508600001)(4326008)(55236004)(2906002)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3JoTS50SKdXX4PRJCrJe8PrHfeqV2sQQzxGKfP9nWFQLOczvX7+kQmyi9pDy?= =?us-ascii?Q?g7+PJHHMrhN0ScJ5kVc2NxySH8kdLTOCj0nnd49wFR/X+fThgxhevluLykSm?= =?us-ascii?Q?FMARHI+mpWTL9z8VHGPE6dVrt98JjAnIVFByfwXvgw0kKcPkQ0KBcYoqWN2F?= =?us-ascii?Q?M+/ZE6goPpFTxThKSUH7tMV5YylOyeEAfX0WMVWfYn8mVqfdTdY0U7h73OO0?= =?us-ascii?Q?lCfw+xRPJa3HD3xcfBKXVB9IHQFGKYFP+JIkVRCkAVsIZ1VdUdRbZKza9A5i?= =?us-ascii?Q?xHbngpypAoS34LsWGVmPKbCnMGG8uineWiTtvkIjUBSJtdS/7cpwAIbYvR/r?= =?us-ascii?Q?1e6TJm+CaDYc0/t5nHqZR6R6gX7OcLRu+Qbkbo8kAqFm3VJo5x66MqpWYVw5?= =?us-ascii?Q?CCuye/Hja9Gor70i4rETCcFStkm9UAO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us-ascii?Q?v8qxtCuLK/TDRpgNA/k0lOCVdNEc9Vq15VnxCDjMVtA73Su3AXHUbYgSPtqw?= =?us-ascii?Q?WjPGfiuw1SWGnlQZzevtBhVDWkvYzKADDEg90I8oZ/jnjOdiW5vuqHdtazY6?= =?us-ascii?Q?pIvQbuWGJgEVCp9ouWfl16KvWMClVyRWOHoKT+49F5yahvDyncJr33F0vfPx?= =?us-ascii?Q?0jl0AxXFpYn0lDwGc0Ny6Zh8EMYGicMBzSCK9qq9sI4TWn2TcdlvDpFDp2dm?= =?us-ascii?Q?e21f0c4LlaqVuktOTlPv8BTzNLaTmyCNXQNdHPS8ExEe1QaMsYzA6slq++Pl?= =?us-ascii?Q?KNBSG/pzNyXLB1jAQssDRXAdpJboqvpaSbuYM7ZwqA6vQfJJAXjUapRwD1Ty?= =?us-ascii?Q?OLFdgEVpS6V6ptddhwgByadumlS8X16PgaVVBA6ZwbQwPB/v/TnW2JeX7yOL?= =?us-ascii?Q?q9FGaoc7wA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 806f9e5e-30bc-4b42-ff6f-08da24137273 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8198.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 03:51:57.1729 (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: a1XplyGKFWDUkqC7TawAlmueA4Z1Jy+8EW4RnBipX8iXUs+i3NaPosN847eKr7xH X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4393 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 Driver is preparing the shared descriptor of session while attaching the session to a queue pair. It should be prepared on session create. Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa_sec/dpaa_sec.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 875df0bfc6..05415dbf3b 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2548,11 +2548,6 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess) int ret; sess->qp[rte_lcore_id() % MAX_DPAA_CORES] = qp; - ret = dpaa_sec_prep_cdb(sess); - if (ret) { - DPAA_SEC_ERR("Unable to prepare sec cdb"); - return ret; - } if (unlikely(!DPAA_PER_LCORE_PORTAL)) { ret = rte_dpaa_portal_init((void *)0); if (ret) { @@ -2706,6 +2701,11 @@ dpaa_sec_sym_session_configure(struct rte_cryptodev *dev, set_sym_session_private_data(sess, dev->driver_id, sess_private_data); + ret = dpaa_sec_prep_cdb(sess_private_data); + if (ret) { + DPAA_SEC_ERR("Unable to prepare sec cdb"); + return ret; + } return 0; } @@ -3304,6 +3304,12 @@ dpaa_sec_security_session_create(void *dev, set_sec_session_private_data(sess, sess_private_data); + ret = dpaa_sec_prep_cdb(sess_private_data); + if (ret) { + DPAA_SEC_ERR("Unable to prepare sec cdb"); + return ret; + } + return ret; } -- 2.25.1