From patchwork Tue Aug 6 10:27:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142934 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45D654574A; Tue, 6 Aug 2024 12:28:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2269342DDA; Tue, 6 Aug 2024 12:28:02 +0200 (CEST) Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010065.outbound.protection.outlook.com [52.101.69.65]) by mails.dpdk.org (Postfix) with ESMTP id 5574842DC5 for ; Tue, 6 Aug 2024 12:28:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fbcZ78cf7y8kMzs4amHjCiPznAytEly0HM8RZdFiWmHMW5guUj6rPqPSIAMJh/jrcU2YL6CfCOhlCRMuoetcoRjr+01+s4Pm39XQWT/4Hp5H+eiOj0hyiyAEHgTGGPgc1fbV/YIvFGwDwRGDMReUrMRs4u08KgHW1DKGrLaoJpaR3tV/6EZ5gGHRIA3oSvISTqrCDwfskssv7doHxKo0A0bvZd8FRGLh4Ywz44pCYNyPqFSIcOmwE5oIGzaIQCxYkIPdvtCiq3gl19+yPYa2Kr5O1EG84JcWpEANpSjAnGkQpMfkuhGSe+OZXbJpcC5Z9OdP8HE3ebVJjrSlGqXPRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=bODl4ZK8aK10cNKWt5lSSDQqKYObtRERxpUaA3xaK6E=; b=EzVmGMi+aXLDjN0nzblYEcrB8ZbMGlVl2raX3HKTUtyz2Ir3XASlrmLY8ICTpuBvwALDPLFkf4URbbN41Nl/ab+1FIMIGzPlHMXeSimTOokFAy7bJCBR4iAdli6IrYSXuqpLOnxjILYfdYKZ65wbH2UY54sFecel4qGuYVOmOWqDqRzS0XyshLsAiev0yEqH+ZUKM3yW+nR7Nmxzw0Gq+CaYgcL5jOvW/pUmMIcL4jOvPPc5AgR6HQ2DknbpXju53qSDuPF23GnE02gXwn2KV4wNx/KWSWEKU35mVTBN6mFYedYEWzroGsmi5x1bVZHYXKd37PdkS3H5kUs9lfuiwg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bODl4ZK8aK10cNKWt5lSSDQqKYObtRERxpUaA3xaK6E=; b=Gs6xCWzex4n71ud5+lC106BwQ0ewicMiqw2pjX9Z2+Mb3W36msuNcFg7+dTcf8Lf1rRRw1LHlDsRiRl+tByRkg50rVuOWQ0x5kD2tC6XGmhvR1OYN3plfgwC8uNSgfb0QqMFIomCMcX9y5hOKjhjqz3ZTgkzpKEqTQrAF+AbRpj1WSS9osCb8PdVMOlD/9okMoWRxuM1aVob9gUqhjp+KmylEj/NoujvUHfJ11QliwGUg75CrA57AdCBXhwLPB3yTZIGMqzTQWdXie/msBNWTq8pbPMzVtjoiFLWsH3FD9pu74627qsBwGp4xwQc4GjQmEQXgwqfnoiCWw+q7Y2HoA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) by VI1PR04MB6974.eurprd04.prod.outlook.com (2603:10a6:803:133::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Tue, 6 Aug 2024 10:27:58 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%7]) with mapi id 15.20.7828.023; Tue, 6 Aug 2024 10:27:58 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal Cc: Jun Yang Subject: [v2 5/7] crypto/dpaa2_sec: enhance pdcp FLC handling Date: Tue, 6 Aug 2024 15:57:30 +0530 Message-Id: <20240806102732.3225536-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240806102732.3225536-1-g.singh@nxp.com> References: <20240806084136.3212615-1-g.singh@nxp.com> <20240806102732.3225536-1-g.singh@nxp.com> X-ClientProxiedBy: SG2PR04CA0188.apcprd04.prod.outlook.com (2603:1096:4:14::26) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|VI1PR04MB6974:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ba94f26-de23-4a09-88ff-08dcb6027136 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: M4zmMo36r7z9cdnxlvs3JLRhlbCHfiWe3Rny9Mf2T0n36D2u5Z69mCDhESfSBZ67j9yB7F2iWHYi7hmJ7eDcJYR2EfOgEFZBJDt8Nqi46ghxZuDG82HUZ5MoaN4M8FD5pKtKVXWnpj2QJe9BeNIAHb58Gm8M13omWdqHSceoAgMz7ex6Qqlc0L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xb5+xKcbOXFWvbg+Ln6AbvGWRHL3R4oBDyp47groBMhOzO/rWp+/WPaxWA9REwzz6GyM7ehRMSgxd9ITkAfcKJDuzH0idcE9EAVVo8rMJu8xp1FpPpDnBCgfSaYK28onGjewvvl4DBF4JJMwkAMYakprqTeIPYY5tKfxkGK0PMsnF0ZNGg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8SPR01MB0024.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cvpJvZCXFo2aE09UuzoPvTlLFSI9NWg177vnxRvZ6/z9ZO0253vi8/PcSkVkwwop3JOSqVPxB+9f7RYjW6OTxpXZoP0dKUYZ9//q65hApVgwuA4FaBOn7EUOeeSWPnJpKi9o2RpYBX17va0ICsUTCMbw+cNprYDo0PnwSRNHOHEzr0P/aywsKtArFwxG7J+Li7n/fVzM3G0+AixiPFltSFSKBHb5cvoCdpxJbbUfaA5d8HAxJWw9GhLhBVcTWfOl0aR8AkNb5Ky75dz0lfJnB3t8YyP3Kh3jSqrLEoG9cezT6oJr10ebEr7WF6wbx1FgW6JrLjFGLrL9vS7xbSJ2YQpX6FRQfkh3NYMoPRx9hdL1/bhqspmVseqLVuyk6bueXnHmbmNrdz/Duu26X0rDL3LsVxZyJ6TFmNOcNgZ4i6UeIPpuL7DdLYLqG7hPPA2sN3lESfessDEfG4Wwq2V5qLQr/5LQTiqNuXZsKrLh6ejbRt/ZuTkcID/W+7GL+MkyndWY6U05GpIC1HH0U+aFXG4kKlbHUrhYARv+zp6esBu2tcgrbeJxdgc9rraOd8NA4f8Q2bUML+bZjz+JxbHruWsKNkb+TDoCwltH52RhO75MkF9VrzQ1rfUPPRnQKA/7fH/o0V6wdOTkStH68AIvVG53G0VjX9ARSLXqfJB3GY1zEK4IA5fST/V6fqdW2H+yExoAJoCKEmrCYLkwv6ehJwxkTaYgkyPLPO8mRF4Ujb6Fmb5/rlbl8eQQVKvbbY02OdC4YU0nBJNMGmdSJoE2eJTqbb5yssw+hWUTE2ovb/uuVnmGWzZnTG6Ad/+3lEGNn7nFidpyjDJn90tOsC+fI8PTsPBnyFXS1xa4G5gqjIGD9QGZ6I4xAukE+zxWA1t0oe5IlODMOmn1TJamQUgKSW9uz5Cx+BIf1T9P0/++2k2EEe1qaRLpYcDrvHhV1mJ/L1VYG1y2gpeeCdgzm/RVV9chlAVaFZjgx9+quImYSydYfTXpz9XcSI7/HIg6tlcIGJpUZr3uXEgwAFB/PltVPt+AGef/PzLfn66HU5ygYMxKnWs7LJgJ+3uwVO5jGgJShnYstefBYP0zLaa5N8SXQZSmeCfRFlwLqePlc1uOhFw3X/QfpwWRK5Mjmw7v+WH5xb0QPTRI5Vp8wt3p872zcVdGre397He4L4Kais1vbfSadFSrPYf7zYwVeUENWs8VZW2VK1DoUDv6ywKfB6k165YRKbuk0tJqdxP6IdYs9wD4h9NpXbAoGyH+mcFtJzZPz70HnJq84oBY7wV687eIcL5GaB5yYwoQ2PXOMRESbORihw+PzprYvc0vYRZWcFOgdoKQDod2AoufKObfa0QQSGD+qa0zpHBazk5gy4mmpBeubdJuORfq7OnqBrm/kwXLZb8M6QdEtFSu8MGDATESHjV8cBpqJc3TyRKD1HCwbDWY+S5rDFn2R0x5dQ0PxWZFWRtSJdvDK4PVfOq8nwtRy0le2M9BaIvgk1QTqAFVfTECJ56NMvL+CgiPDyCoLNF+fiVNHbZ7SP+xU0phhkNPAnn3p0rzDiqD5191CUyiaQMVub0kKLGfU6Ji6D/uU027 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ba94f26-de23-4a09-88ff-08dcb6027136 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 10:27:58.6859 (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: H1g5eaJkZ6TIKec1VS+2ji3jmFDnPttFebqsFhC/9RONFPmREaAd49/dXchXDx8I X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6974 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 From: Jun Yang Set RFLC with FLC IOVA address and data stashing only. Signed-off-by: Jun Yang Acked-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 0e30192b30..ff24a8919a 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3389,6 +3389,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, struct alginfo *p_authdata = NULL; int bufsize = -1; struct sec_flow_context *flc; + uint64_t flc_iova; #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN int swap = true; #else @@ -3397,6 +3398,8 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, PMD_INIT_FUNC_TRACE(); + RTE_SET_USED(dev); + memset(session, 0, sizeof(dpaa2_sec_session)); priv = (struct ctxt_priv *)rte_zmalloc(NULL, @@ -3646,14 +3649,13 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, goto out; } - /* Enable the stashing control bit */ + flc_iova = DPAA2_VADDR_TO_IOVA(flc); + /* Enable the stashing control bit and data stashing only.*/ DPAA2_SET_FLC_RSC(flc); - flc->word2_rflc_31_0 = lower_32_bits( - (size_t)&(((struct dpaa2_sec_qp *) - dev->data->queue_pairs[0])->rx_vq) | 0x14); - flc->word3_rflc_63_32 = upper_32_bits( - (size_t)&(((struct dpaa2_sec_qp *) - dev->data->queue_pairs[0])->rx_vq)); + dpaa2_flc_stashing_set(DPAA2_FLC_DATA_STASHING, 1, + &flc_iova); + flc->word2_rflc_31_0 = lower_32_bits(flc_iova); + flc->word3_rflc_63_32 = upper_32_bits(flc_iova); flc->word1_sdl = (uint8_t)bufsize;