From patchwork Wed Jul 3 10:26:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142063 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 3879E4555B; Wed, 3 Jul 2024 12:27:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71B6242D27; Wed, 3 Jul 2024 12:27:21 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011031.outbound.protection.outlook.com [52.101.65.31]) by mails.dpdk.org (Postfix) with ESMTP id 56A9541143; Wed, 3 Jul 2024 12:27:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d2tPKghmT4P/C7gIr5fsZixt7jDfWb4pQ+bOWGsPLKggkki0rIG6IDlgROXzRy+bTPiT0D6J7YrViA6TG2BwZeQs5TM/PEiiEi2vKg8OZtPqxj7YGVVq/J8fqAH6aQLvkFJzZaw0eRXI56U3wViYaGRKy5OQvH632TLnI/qgOfC1q+cWlojARWX2T8BJJtyRLvGjluRBLHp47uxKyLErQ5KKAeHO/HJucN+x9VPJqJLCFhk3AjB5uvKRPLTPqtUgJilfSY7FPt+CED2htA32uTuoDzr7yK2iUHmLcKjNg91FoOacUE3axeDgBDosJEK5C8MWgZ4NyI4BqN8to6oTLw== 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=QQbNs/+kMHkSw8dzaljjRJfXVnQ1oQ1f4ZibFaI3OXU=; b=CWYu8J5bdt6igMm5QZEejic29DSdl07iLeFb3I2SZVdohw+yJdiqe5vAwD0X7e1q8Su8aePkgm6j5kqKS/IU0Q6iUNnbe7kzc6kta9xROfKxYokIxt5KD66Us6nedrT4kEWiX1XapUt5kqsgOToDq8IXZgVsRKRaPmjYZWPdsRvCRVI2aMhyQzT3fLg5uI+nh9furNtyvJMD6JC7GxWtbzwHy6yS+zjlgvJCj7LktcbFoYAqpcY4y+jl2SNtyIUFq92XhUxnIymFFTookvXt97KQqDjWwytH6GUgIqnG0jUnM/Be5NTuT1lJvfq6zdiAKpCN2jPYiypW3LtEwcox2A== 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=QQbNs/+kMHkSw8dzaljjRJfXVnQ1oQ1f4ZibFaI3OXU=; b=jDWnwFCNUAAsDhvI716WB+XCofDAhf1m7QrbSb5jP9aEGDQ7cyMWpKsRGdZmq/3iWmYEAaUxVedcCzldX4iE/zB3HzFbkVnfZi61k4kLEHAdXfkTeQR9M+l8Afa4LDNyBq8SbFjMacZ9guWhcTgjHR6OhZctopVhllLu77LQ5TY= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:17 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:17 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena , Akhil Goyal , Franck Lenormand Cc: stable@dpdk.org Subject: [PATCH 01/11] common/dpaax: caamflib: fix PDCP-SDAP wdog DECO err Date: Wed, 3 Jul 2024 15:56:39 +0530 Message-Id: <20240703102649.3096530-2-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 47bf5206-3fd5-4ed5-fa82-08dc9b4ab68f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: nXWsvCvIv8RxMFOa9TSv0nJRtmybMdJcKyQ1dfhxTD3D0jrPDboRMGHN31ac/MHwiOSC0RNUOQtONnhmVXe9SJ81N49qN4RI/k4OZUopyMGuOFX/lafkHeo2IenOU/2ea9dLCB78WhVW3OFwrzwLYTlfRtK+GXWbj4J0kbv3AY+gee3wXxo5YW1ckh4wdlPgSbKmnuEUDa4tkOlKDnUfPygAsdbmFQhZ4XTUw3tWlG9m4HMwsUpG8ssepDkoYItpUILTPvNq++98oRAB0hWLYC8OsW80+X/K40scXTyVVq3eTy/IQ6G5dc1xP2tSukeY43gMb9kd6wmGVdED1dU2mUnmWZl6jv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efront-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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Aye82nwz2/TqoIgUDzh5pfct3IgMaKwTPbr/o98yccggMl5ZrwFpAKOHzIJu+UjIegZlMIWi8bPyNCSzSZgGy4iLMrnYmQA3TxIda51hCNfTI1Ss4WiA/k4X78OKKXMIZzDga2Ctplxs1+Yv87AQo4M5EarZGvG8Gxuooabeovs9178IQ2gepOyk10Uetih9e3+ReAPwUX42f2OTQ3tYJyUdzCSvFxT8gP+6awXAY++qdw4VE81I8MXl3p5YgQNRu1uw1LRVg+4Z4eYajQAdaM3BEEby55k4ej0IZJmYecPj3OBZzC2+lc0u5nQIPnbYfXNbfKso8FoHEM4Hn89nz0UWZy+GHK+yOLKl7IKUT8mC8zub+gD8V/X/8bZ1MPhmGurjw+NOeftamTvHGxJegjHRNtpY+CcUXm85UJ5PGQ+q0yZ4tx4MRWNmNbzfMjQ548jmPQksy/+d0SW6KSGuJo43udtl9WZg7EG0aSNN97naPxHOovpdmlDHL2hoEsas2LHBl77E73m6p8Ce6mdKiUgYTIm7igY9y8DUM6p6JWlaUktpf0azKCS9JrHoHvkmpAurO5g4WFeCQpkuSWT2ySoQdjXwtdd1+11H3C7NHoOwrCnApRScM87XKocM/ocSqrFnws3OsTv4X+1hkd3RL+v/AKkoIQgRuGbVNNn/mdPZQtNnNR8yahUWOAVe4ZMVg28BV4ctp7kd4hLI/ImdrptY2NVB/LDxELt1TfIspBu80pZyXuUwOeEatl/RkWDEIg3+311wJPXHlGpv6tNPf4Hm7uauJrqt1697J4hHArH6BhDivS3qf9eAtqvc9gZwjLrzYUFPoCMCvMtInMq5H7Y8V+LJHN6Mmt6BZ7sufIpvrMafUgIU3H3XyAIKijIKfXuCDW/6yP/ZUTbYtwUGb6nMf+3CwInNvvnZP/pmsZZ89XxSNX6r962NFZnIpUr5KSgDbP6VDBlRcVsiuh6Dg8RHrfc/O6/8OZlJN1iiyollFyA9CMlwh/JmxCXYZF96Fx3mZy2IvUmJafnN0tKx834j1TDOmYeTUny1txBGa2FIbIzGiq+TCP2E5tsOVqKtlB4oX7CTmLfJf1i6Sgg/gNmlnKQTvb3Sv42E3ciJFu6LnwzRo7pFVqrGyCMX/YEU/UiFkOkMoqww41E4MtBV66LYWN5JFsRmgAO8zTAuDjbvbsQW0+iD9gtrOEPfhsfUq6uAfvbxN55ZgNpi5JqyJyWWPYwp7sEJq1Yp0I1nzlf+2Baw1GGPSTxMw6wr2KXFP4xuVdwk7iZEm2xGA0+9BZbuOj4boi2eNkqiDV8WZ0iO0maJ/sn4bu72eKavtu0rgm2DktxbkRRk7/lRbbCraMeQg3LoM/QDEYsobFDS4VNBvcf1bgef0zMf516dFgokzn4MJKk7IlhH/vz3xEwciL9ZZf9hNIrq+k3BF+URJJKiEQqLQYOQKXL2EC5GAfjqbLdZrEwx0MByusm/2ow2C2QUd1k69/evHRV5uBOUDDk7sdR7Sn4R1Qz5I4QHmF/oVp1qRIfloDcZLkLG0GPQ7ymXT5qi8iUK71aEt7jELewKvSjFHUVEPOeoaGMGu59B X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47bf5206-3fd5-4ed5-fa82-08dc9b4ab68f X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:17.6174 (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: rfl4aLzKQXr+6zKROELgaWxhL/3PEFBzmUsiJ+3l+WYFUDu5N7TQyuRRNboYR9BO X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 Adding a Jump instruction with CALM flag to ensure previous processing has been completed. Fixes: 3ba2e519eafa ("common/dpaax/caamflib: support PDCP-SDAP") Cc: franck.lenormand@nxp.com Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh --- drivers/common/dpaax/caamflib/desc/sdap.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h index b38c15a24f..d41bacf8f9 100644 --- a/drivers/common/dpaax/caamflib/desc/sdap.h +++ b/drivers/common/dpaax/caamflib/desc/sdap.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2020-2022 NXP + * Copyright 2020-2023 NXP */ #ifndef __DESC_SDAP_H__ @@ -628,6 +628,10 @@ static inline int pdcp_sdap_insert_no_snoop_op( /* Save the ICV generated */ MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED); + /* conditional jump with calm added to ensure that the + * previous processing has been completed + */ + JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM); /* The CHA will be reused so we need to clear it */ LOAD(p, CLRW_RESET_CLS1_CHA | CLRW_CLR_C1KEY | @@ -718,6 +722,10 @@ static inline int pdcp_sdap_insert_no_snoop_op( /* Save the ICV which is stalling in output FIFO to MATH3 */ MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED); + /* conditional jump with calm added to ensure that the + * previous processing has been completed + */ + JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM); /* Reset class 1 CHA */ LOAD(p, CLRW_RESET_CLS1_CHA | CLRW_CLR_C1KEY | From patchwork Wed Jul 3 10:26:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142064 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 5A9C24555B; Wed, 3 Jul 2024 12:27:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40CEA42D7A; Wed, 3 Jul 2024 12:27:23 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011058.outbound.protection.outlook.com [52.101.65.58]) by mails.dpdk.org (Postfix) with ESMTP id 6CDB042D26; Wed, 3 Jul 2024 12:27:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQ4lgaYpZC4Qz1bSkQs65NUHpP18ED2/g4JimNCwaXfLTi2eOimE1gcswUBrwyTIaJ0wBSjk2bGPhCzoa85LQGY35KsGYEbZDOZWA6mGLWziTOU5XHey3dTqCyu+ob2Ui+yyGefsaovw8A90o+TZNL/Doobb6hbQrmMhPJ5sA6gpFCAn5Q8IVazVGDvLb4hpqkyPUbkRY8xM8neQY9WaQUts0JQM1WucOazHKwYxD83qjx3GPzBlZ03NEfYKwfmmMl6px/7w4h4umTpIP1J/EhuZ7N1adac75Qw7j15Eta0HyZoTyuwgUlyUrysr/OMOoc26Yo2H32En0IpAoLGVPw== 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=QF9JDx15/NKxexo1xyjwgjTmSOHCFvlXo8lmRdKgi7k=; b=fsPCZpJJhHDAsSGlJlmoZdE5oH5GVDsaJe1pP4yx8BQyBvsZ5D7XLbaF6il7ZqiFvwFJd+Ai5GB3sz6kszVJ5k3vwObG0zdGZp7OFwOhKw3Ki27ZR42l29RUar7IBaIW1zf0+2tW5o/zo6Klkf7Z2GPq7JH7kB9h2O/XTd4NINfpUHy+3IkZqOPTH46CtVQ0ju40URO9nrCR/WEkssBiQ1d4Wyep2zklw5cKBkrFCYSySthBJ+SQL2Iffrk3OV7R1UhIG+LFPzB7iNB6s+tTIf7N5DPRB29E90txuAyUbQGUmHhDCvl0aetb9aEwHKfG5w/EV8OVAQIyEI4fuHdUgg== 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=QF9JDx15/NKxexo1xyjwgjTmSOHCFvlXo8lmRdKgi7k=; b=O+jLSSRs6ykQ0EhLJGFOnBABI8kPCuAdGmjwtd9Wx8M4ZY31ia3GpR02PpGXIGeIEwIb/avm/o1l/SJtXMQV3vRN/aJ3GHKsEAYCBv64PCM/mbxR4AKMiyEi5htK4m7tbvj5FokyiHRKP27hbuwcYRaV830qvL7JlDFCEc+bu2Y= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:20 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:20 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena , Akhil Goyal , Vakul Garg Cc: Varun Sethi , stable@dpdk.org Subject: [PATCH 02/11] common/dpaax: caamflib: fix PDCP AES-AES wdog DECO err Date: Wed, 3 Jul 2024 15:56:40 +0530 Message-Id: <20240703102649.3096530-3-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 05c3147c-c226-4604-8577-08dc9b4ab844 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: 3T2GktTnNFZttfLE/9BB90X4sJcxbamg4IyXW9odg5peBq0ihk3ftfG0QJ79sMIyXZKySUDkbhLlukqjjLOvi8i67PzhI3FioKd4iQHx3+/3mVGyq0wq3hsEMMbykiS1FZYCngSdhhrWthaHTco8drxD7VY9vNQJk+xYqGqfPgKSjiOn/9FU2mzNvF1PO6ZunLoZXlBFSDAuRMT5mVvMs6UAG0X0b18yMkjrEwsoOnb685N4gGWaFi1TgA7JaZBUPRCMgBN+2q2mcaS+bLr5G4Wj7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0t7H0LPIUR7LT2Cw/HK+pDEUwshFcdzi5DDQGN1oRcye+xmUlFE9rtDfB9FBepSNl+A+Wv4Kan4UFAQ== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1CQFaO+/aklzmo61NoIRbldgmVFy8tHHxYKYHni7gQ292TD+C5HjSZ8kh2HR4VsKdgW0NcIxlEX5824GtxbBc0p/QuL7zXL5pzicPFALzJvgSBcWDwGTQfQzNI62Y3my1//2UfcJiQPBLBG8bt2C3VPRy4kZtxHb/Dsf3ryMylkFkav1oN88lLk11MT3uMtKxHAM26qOmFnqK1QGmKI9t934ZiSEuxsVuCseMb5e8sFkeqXLjKRIf1D7U1D0EhD4NyjY9Z7QJjoYJMIrMLvl8iStm7CUQQYM+ocVTdS5EdONd5WHJiiJsmcWyDgzNgRMWStB8Dic9wNukVwBjD0wyiG9qGTb3LNzz7+lVMoBuF68I/Vkd+BXLEcV7Wnd97mimyblmZKHOeGgn+qDvec9QaIrsX7mnsTqJmzKN3HnHOcuq0PKNkmORYHyU0BlN+xs9O5O3XJK841HNQyt7rbE+mZQ5p/x4zoRljVnY1nEo8Nn67b6D+fmyVzkag3mL7adO0bgtYBCOfnYGaKwKfNCqx6TCwhdQ1hydtNZXUIPsZf5y/ioL747bHOFF0c9VdTx7la4Qf2nTALYCgdJv6zaWrPMIP2PoxzOdRjutXNkmF+xpyFed6LvzozlFv3ZioBMVBBJQ2+GMDDxYHajhqKx0axnEcJxXBMcDV7mGDkJO5YJ5jaA8dHz1Ha7F8D4akKdj8hVH40gcEa25pv2210TXSqFxmp2ONXBF9uPNDwlIu43fu9F/LKU0UsyleHnSz3bmGdRVCJLdJ0Pnc2O16EDkisF5Lhq93z7KUj1hfrUGIltL6uP+UU9CnLa9jiIsrnfpVWTX8J0Rk1v8ZatT3k6by4rqxiA/TLH1FzMWoIwdc+SCvjxoCimlk5KxUKrLSRUR5t/5gEcbTHpQC3At0XCcpIqdYOVGMrL+dEhIXe83fh8xUBzvCk6y3F2Bh57a963Y0i8LZQ/N8Vjo7RxT4UHZ8RFCg48hHRSKB1IZFa5JogLqy22Pi5KASLQdtavZFWpD20u0oJcYQgGvdG7lfUTEPi/3MHb2yx3PVZy0H+eO8Y+KYOfw6lBTKYrBGv3TUfVfAaWLUDfKQFAAXs/jQFpU8zbRcaeSfY9NQwZuGeLe4mAXs2kZsQN9MEL4ytAgiRNrsVtJZ7mLGa9lyBI7g+dXICS89ul3bOHp/r19uIXpZezrLq9+ksxz0G7ThY0m4MXtZBB4hpJdu5Dz5ftWNdxPYy+lj9qbHvVyie8769gMoiBwLQvH0Y9N/aJJ3pO1whOX2j6C9v+STnAIggsiDSbERBm85zJxWKWNypBnY4DKefReFYCEgWiFecgr6eUnAnZT60pVIeERXgXsV8TTIvMKmWwIZlJT/nG1E4d8lrS3AIeRi2Xd4sK2KPtTVtrv/jMWfdpv/XRn7lza57auuwJITduGwsbdo7TLNyxah7ZIBh9FobDYOW91wKm/CTARS0Eb0qAuphKPTGWt0E3wgEfa2BXXjgBnquzzUNwLR22GGeTpzfy6coa5VrPd2CVddNVyhoU3h7p/BU9LOKgVJavZORAlmIUzhoBeSe6x8GxTtHvnHitGet04F3LIktveqYQ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05c3147c-c226-4604-8577-08dc9b4ab844 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:20.3738 (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: H+5yfd4PkVfQ+fCd9L41nqPqVWVBno1akPwuF0mmOgFtK3enxjvDvJntrbfwn+mX X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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: Varun Sethi Adding a Jump instruction with CALM flag to ensure previous processing has been completed. Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP") Cc: vakul.garg@nxp.com Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh Signed-off-by: Varun Sethi --- drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h index 7d16c66d79..0ed9eec816 100644 --- a/drivers/common/dpaax/caamflib/desc/pdcp.h +++ b/drivers/common/dpaax/caamflib/desc/pdcp.h @@ -1023,6 +1023,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p, SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1); MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED); + /* conditional jump with calm added to ensure that the + * previous processing has been completed + */ + JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM); + LOAD(p, CLRW_RESET_CLS1_CHA | CLRW_CLR_C1KEY | CLRW_CLR_C1CTX | @@ -1070,6 +1075,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p, MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED); + /* conditional jump with calm added to ensure that the + * previous processing has been completed + */ + JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM); + LOAD(p, CLRW_RESET_CLS1_CHA | CLRW_CLR_C1KEY | CLRW_CLR_C1CTX | From patchwork Wed Jul 3 10:26:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142065 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 31F774555B; Wed, 3 Jul 2024 12:27:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DBA042D92; Wed, 3 Jul 2024 12:27:26 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011002.outbound.protection.outlook.com [52.101.65.2]) by mails.dpdk.org (Postfix) with ESMTP id D315542D7F; Wed, 3 Jul 2024 12:27:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZKGNZOV+czJ6a5GUm9c2eAQ4yDhqWX5dzKox6cJ9PL/Jd0nhnzTfgd8G6+3GmyikIJRICn0BBa7xz8DRaH/+w7TbVCFvHFZJxLSzuxCkNvUBGnSpqXebGgdOIbl/H014VbeTaWLX1QcldJ+1yCTlM+JnOLmWt3oMz9AC8miB+oxSHH120p7aQF2kgF1/+H+OaOwLLBmHtxpD+nFujPHA1d/miuzaABM2xGnyPQdGSEcjNhravAoryb7Vr+MDl5MQN3M+JMeDxZ29butAsPUyOFLCfsZzM+BB4VvGak2wKxiuH6s9xGwujuqwQnS+tKs/QIh3gJU9X7JABThP+MeCA== 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=FzrsO6RDG5lT0mk3EgYOzwYnRpuW5jdY6LQva8aFqNk=; b=lgrzAaqW2jjrJ1s2B+QLwZDWy7DKVzQfOvv+VAjXUo0dIwb9UfFCMalXG7BHRG9r9lqnHSJFHGnbNrMX9PD8ubKElT47/XTPpw78FysS5n8NQHhw+HM5qSw1WQV0cPGgtEglTkz2qSopeXHXAlDHezTho6PhSDfWfds9CXk8LMymphbPDp2n/5D2XGk5udTlzwQwDnFEXaEokp8a4w42yK6fHNfTDbw9FTUiNNMUj1kx9Lch+4/4IWdl0baHYPcps9sxIwmV9auXNH94D7FIPqmyk55+f9tIb6MY96N+r+Jqxg+6NWNHeIGotab71PCeHw7dHyp4/KCZp1eMjoRufw== 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=FzrsO6RDG5lT0mk3EgYOzwYnRpuW5jdY6LQva8aFqNk=; b=GBOvv8oU7Ldmpr7qKZpU2oPcu+hn/2lRzHG5Pau8WAecCta0Zl15/km4iZbFbnhjkY4IB7TZ/Yt0W973YffptOoUFigsFkTEWIf3EePKM1m2+VEjvotx2HIe6p2Rj1rhqd1vcDagIhFt0APl2wySCMKEbi/zDPo4mLlrba0nVag= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:22 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:22 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena , Akhil Goyal Cc: stable@dpdk.org Subject: [PATCH 03/11] crypto/dpaa: fix SEC err due to an wrong desc Date: Wed, 3 Jul 2024 15:56:41 +0530 Message-Id: <20240703102649.3096530-4-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 62166861-346e-463f-ea4d-08dc9b4ab9a8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: BWNfDsNelwUfL7ZerAru6KbwWGr45DrJ8GKQAtqlY2vRwnMtOTW3ffKzO754VZieS41Eg5WfF5Bzk1oGnbI3Q9Z6wkviNbCCYP0oxW27ErxBdLViuarD3gbrsJSub85rNuTYkxuxS9iincj+WzzuTpKMcrkZQx+Kl6Xs61QhT4/aFAlR2uVP9O3Zdq8qrnDJU+F6n00HrnD8BIkqNslAc2DEZ/d99oO0zr//zoOCIuJpvDZ69Pqx8rf9Rk87GntzJ06xrLC4hAi0dqBoezrsrtK8Q0f94KtZlb7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492W4O+Ku7gI0wBJ/V0JkIxodGhyFhiChhEcZ7dtDG6XqThEg== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mggL4lcZO39U5dzm4XQ9DA0ghyDubF1O90mr+dI42Q8MaHl45azdX4jwXrbEuPemcAwTxQESgh2sMY/znidl7WtyDyc5d6zd63XJEiXhTkU3AEiXEGvlamRrKrAPpegmx4oW4Af0IEf8wRD5VtenIcfIb168wAHgyHHeUyI7wNhHAeI/gyu2dN40GhTxiVcJKX4K+kYydpA/BjYzrW/zgRsn6kYGhvcQrw0yf1fO4Ho4nFFA3NcyXxysVcNha/skPUeE8uiuJF+K+w2Bcfww8zub+0TuRsYowtfFO5To3zJPYVm8Y/MD2iq7XI+s+Lq8M4NwSwrFWqioADzPi+eXM3rLBYcOQdF7+FAH9g628D1gX6EC7gmzhKDr3950tZ0GMf/BXDnOKTH1/N2DBLupb2TetFWeb9BtvuI/2DY0A7WGfRSUzXgbd8u97M83KuyMLIKR7FPfUV1fgWzCX4urAkRL5oPAzTJjE5DGYgSH9Tc69pIeLJeJsbQpZuZ2ySdgmHi83fUS6Bvrx24c3IxOrnFMjYE64N84TPhsGC3No8mANuHsvF226ZCtUzDQ3Zz6A7xa32xGlpytXFOKxbbu8I+/k13umA9i3GFKOmoivsvbT9C5nfO8bLIZwOPS0Qwaf0LMFVhOea7bLSuEs/arzs8X+hC4Nxd4aqV0ksJ5kWiC5NOeqeTYXZWmDXtpc5svL5lcu8+OYnGb4GMGHXf2HByPxvj6fv+bDplASMegcrhzmEle73jejih06mdZdGk9rfO/gcgekDcjp0MeMV0u8ofCuMIsnN4PIjXx4EN0jA37G01+v4Jr2/i3jUGi3Izc0R71AwRb/e+nmVQlY4uW3ipoYKiGRESsJa5xyC1k/UM+ncu6XgOH/ZZktvKMSFPfqA5m+VaYUQZ41ionhn/MxR5N0f4SvTe55pR+oxWcunMeOPUyyClPwNmMK0Ggdqgssjk8w2CXJ2/HYm/rW39ReNir0pW/22hS9cX5J4lxkv1zq3eFTa9Owk2rAAC26c23qyS0o0sc1g4UFkt5srcvmHR3Ubk6jlMnfyX9tDRk1p/U0u4iA/XsHfIu9tqEgVtAEcfsvmIew4TArW+g74UZkYzLc7AlN/PzVRiUI6em0VYybAAG/doSef6JZJuPu3/mSstGKkrmiDavpvoRIZ3qYljtt5RyJYvq+vOKcArwyyTww34zLoEQwvda+SKkFT8QXIcliVS/XD5oASCoM2AtNabFVYhKF7fBEU7qwFYk0nYNRkR9RigthXrQlby90Nu39X8ZOHSjXEF+FPdbWJt+Pl+67Tduzt4A3C6Xp2cldv0pGh+bmIlKhFdOoOggKY22Oj704eOH3LmSuJNq4T1ThQKRm7P+ve0NfbVfu6onbzf5YYIZtAmcXV3jmdQ78W0z9W4adzd3pDSPEDQrt5BX71WkAT9grM3Qj828F4oCXmRJrgZGRUMO9FHZhW3DtoFFyRJ7VnMuRoLeqXmRfgnjxJQ2kVLBsJe7ViJUyGuhKroVm0jAc7bEI/8wYIlKZjjfMWrjqngq7ohTk28kX1wleg/o9h8EdfREQNWDhP01G+IyeY4XozavvG4FV6rIIyOl X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62166861-346e-463f-ea4d-08dc9b4ab9a8 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:22.6249 (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: wiGp3Dre3EjFk3QZx0Tr+mIgcQWDaJoDBHeleoCFmuip+iWH3F+aKu9XMuLTdkXn X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 During IPsec operations, driver code pre-check whether KEYS can be inlined to limited size descriptor or not and based on that it decides to copy the complete KEY in descriptor or just give the memory pointer of KEY in descriptor. This pre-check code does not take care of padding required for security engine to make the KEYs inline which results in incorrect length descriptor for some algorithms. This patch fixes this issue by updating the pre-check code with proper padding size included for each supported algorithm. Fixes: 453b9593a3cf ("crypto/dpaax_sec: fix inline query for descriptors") Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh --- drivers/common/dpaax/caamflib/desc/ipsec.h | 73 ++++++++++++++++++++++ drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h index eff26f6f8b..b902873970 100644 --- a/drivers/common/dpaax/caamflib/desc/ipsec.h +++ b/drivers/common/dpaax/caamflib/desc/ipsec.h @@ -728,6 +728,79 @@ static inline void __gen_auth_key(struct program *program, authdata->key, authdata->key_type); } +/** + * rta_inline_ipsec_query() - Provide indications on which data items can be inlined + * and which shall be referenced in IPsec shared descriptor. + * @sd_base_len: Shared descriptor base length - bytes consumed by the commands, + * excluding the data items to be inlined (or corresponding + * pointer if an item is not inlined). Each cnstr_* function that + * generates descriptors should have a define mentioning + * corresponding length. + * @jd_len: Maximum length of the job descriptor(s) that will be used + * together with the shared descriptor. + * @data_len: Array of lengths of the data items trying to be inlined + * @inl_mask: 32bit mask with bit x = 1 if data item x can be inlined, 0 + * otherwise. + * @count: Number of data items (size of @data_len array); must be <= 32 + * @auth_algtype: Authentication algorithm type. + * @auth_index: Index value of data_len for authentication key length. + * -1 if authentication key length is not present in data_len. + * + * Return: 0 if data can be inlined / referenced, negative value if not. If 0, + * check @inl_mask for details. + */ +static inline int +rta_inline_ipsec_query(unsigned int sd_base_len, + unsigned int jd_len, + unsigned int *data_len, + uint32_t *inl_mask, + unsigned int count, + uint32_t auth_algtype, + int32_t auth_index) +{ + uint32_t dkp_protid; + + switch (auth_algtype & OP_PCL_IPSEC_AUTH_MASK) { + case OP_PCL_IPSEC_HMAC_MD5_96: + case OP_PCL_IPSEC_HMAC_MD5_128: + dkp_protid = OP_PCLID_DKP_MD5; + break; + case OP_PCL_IPSEC_HMAC_SHA1_96: + case OP_PCL_IPSEC_HMAC_SHA1_160: + dkp_protid = OP_PCLID_DKP_SHA1; + break; + case OP_PCL_IPSEC_HMAC_SHA2_256_128: + dkp_protid = OP_PCLID_DKP_SHA256; + break; + case OP_PCL_IPSEC_HMAC_SHA2_384_192: + dkp_protid = OP_PCLID_DKP_SHA384; + break; + case OP_PCL_IPSEC_HMAC_SHA2_512_256: + dkp_protid = OP_PCLID_DKP_SHA512; + break; + case OP_PCL_IPSEC_HMAC_SHA2_224_96: + case OP_PCL_IPSEC_HMAC_SHA2_224_112: + case OP_PCL_IPSEC_HMAC_SHA2_224_224: + dkp_protid = OP_PCLID_DKP_SHA224; + break; + default: + return rta_inline_query(sd_base_len, + jd_len, + data_len, + inl_mask, count); + } + + /* Updating the maximum supported inline key length */ + if (auth_index != -1) { + if (split_key_len(dkp_protid) > data_len[auth_index]) + data_len[auth_index] = split_key_len(dkp_protid); + } + return rta_inline_query(sd_base_len, + jd_len, + data_len, + inl_mask, count); +} + /** * cnstr_shdsc_ipsec_encap - IPSec ESP encapsulation protocol-level shared * descriptor. diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 44528eaf7f..679f78c4b9 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -395,10 +395,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses) cdb->sh_desc[0] = cipherdata.keylen; cdb->sh_desc[1] = authdata.keylen; - err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN, + err = rta_inline_ipsec_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN, DESC_JOB_IO_LEN, (unsigned int *)cdb->sh_desc, - &cdb->sh_desc[2], 2); + &cdb->sh_desc[2], 2, authdata.algtype, 1); if (err < 0) { DPAA_SEC_ERR("Crypto: Incorrect key lengths"); From patchwork Wed Jul 3 10:26:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142066 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 5E3A94555B; Wed, 3 Jul 2024 12:27:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66DFC42D55; Wed, 3 Jul 2024 12:27:27 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011032.outbound.protection.outlook.com [52.101.65.32]) by mails.dpdk.org (Postfix) with ESMTP id 5F72D42D45 for ; Wed, 3 Jul 2024 12:27:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FK7pEUcLs8UYZNLmJPMqqpjXkl4/MBOV4U2eEViPKVVfas5vC2kZvKxuNVomTDYFpTbpxjkLuNyTwB1suz4ZBS/7P64kGA+HQ9ZVVfT8VV6CU85zU83qSc1nPwfyG6z7wD4N4A/vnqrL+eyNgGObVgCMdSnbO/n8D7h9cNCMY7hVJWY+2+7dZk2hjYW/2F6TZdEMp4FXrVysvktqCzCJmY3KgjV+0hU6pfTozbJmKQPbD/PXneqsDYQyN5iOjQGyYfHqQdi9xA5aZZUkzzl2H5BWjJvBWnjAQzpoWXbq2WiNdgAQESFKfJSrNrE/vBdAlkiWQV4O8kAYfgQY4FUnPw== 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=pDUe5BkZS7X26x7C+lgHkl5f1gEbV4l37+YZInk05lU=; b=oJkNiMROOVVLmgZ0Bbhcod/BFsoRELt4y7qwTmtxfiJi2ek+H8+73pMLd0lo2SqQtY2H7s0uJWrF5Ph+0R0rrU/bEYfnrjfxg6sneGk8vtKYytquQD5wjTKL14vlUl5usrzvSNRETJdvjSTN7a8ypfh2/Oyw80PBh1K/l/lzy5ye77vzIQU8zPEupoc8Mp+ZpKoDZbzjumzbPbMF77vMGlXA6ie9LPI0UZsqWn8Eo7T+8OblyoTmcqN8k3+jRMHQz2+G9nIgrDP9UzwKX4aH/8SYjhrEgeopD4olt9h5qlhq8S7OstMW3zG4C440T7StZmloaidD2MZQOVZ+I80raA== 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=pDUe5BkZS7X26x7C+lgHkl5f1gEbV4l37+YZInk05lU=; b=Ug99zIUcu+QaB2pmx76/kd1hczmu7UGH3un51mE4hmDO573hP+QqWSo1aRgAaP911rl1KXFHubbZ6EkKrTv0K+Qhg7mBDTJfJ4J9b9tCTTa/EoV577/ow20EhZPbeb5RzgQhv+sBEAhUV2qKODz2uzOrH7d0p29ia98nh9ju3l0= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:24 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:24 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Subject: [PATCH 04/11] common/dpaax: caamflib change desc sharing mode Date: Wed, 3 Jul 2024 15:56:42 +0530 Message-Id: <20240703102649.3096530-5-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d55219b-3da7-4631-dbab-08dc9b4abab2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message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Iposg4MsZGhz4BFqQGoNf8c5q6RtnJSAJf+Q1vT+flWCcf+UzFiZ/KJe7134dBraS2BktHVIzBI1N55iuB6QX8FqPahaZTctctuelWuj56Kjz6goK84tOJo9cg7rTnD/3oQEOrUnNXh6CdgHAk5hTSM3XA0D9V4u+wzlmfK6rqgaUaj5hZPnH8/HTiWISoSyIa+LxIL4tZ3/3Eb+XmtYw8YOHUoLYiXWtZnlaigz7sq7U341YRjPFEi2dB/5YMxgvOxWimr4NmskvrHQR2y3gfbyKJtVNfahoA1MSHulTFTqaFHU2Fz2V88aXScgNm5Xy++UsKHb72svbrwiqXU7TmJi5iW83QZxO4j6AAFSzdDLA== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YDxitbOGS0iyc5rGRElkI+RqIhed9gFPJ8xNBDzHAVlsg4ZVJiNtQjw0BwuNf8idHHfN+C5VTJbtqykltmTm4cWSYmYO4pVF8yqmX8xY77PKovY7yQ9xcxxHkdeQg/sMxRrLx35DGGJOPLKx0xj2l3W18bIeJVFYsbfdRAE6M29ASIWGHjqrXyklmJW6jkT+BqXh2UJBPtb3YV5b5p1dtL+1Y/vo/LQpBHTTm3HHCnuHiLMvuMOTs/JA2Hmxjc8A0r/xvZ547V9cOu6HtsLUpCPbPjgGLfguQ/JXko1RDd/YixFxZ+FMk4EYawwVAOuc36AcY1trXDNDAG7pUPt6s1jvu4DW9PfdnRIBFuHcUr10mDbLfRE+FLE0Yg0qygXSmAGpqs0VzkK+EhyBvuUNdhEfymXUUmCfzqsB/i3do250e4fkVj4BWIEf4/pLqvJXA9x85l2qyKaI48wX3NMbWubyrJvZP/aNLLrEkm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zqH7dTRINBsTnuonxB31atSBbWVV712 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d55219b-3da7-4631-dbab-08dc9b4abab2 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:24.3491 (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: 8ixHyRn4WussWr58KgL+UPvJXZsH+4QOeHT6OFLHJWqCKQagdj1Cn0iBovEUVAvs X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 Updating sharing mode for aes-aes and null-aes pdcp test cases to SHR_ALWAYS. This patch avoid Invalid key SEC err issue. Signed-off-by: Gagandeep Singh --- drivers/common/dpaax/caamflib/desc/pdcp.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h index 0ed9eec816..bc35114cf4 100644 --- a/drivers/common/dpaax/caamflib/desc/pdcp.h +++ b/drivers/common/dpaax/caamflib/desc/pdcp.h @@ -2349,7 +2349,7 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf, { /* NULL */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* SNOW f8 */ @@ -2361,7 +2361,7 @@ cnstr_shdsc_pdcp_c_plane_encap(uint32_t *descbuf, { /* AES CTR */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* ZUC-E */ @@ -2489,7 +2489,7 @@ cnstr_shdsc_pdcp_c_plane_decap(uint32_t *descbuf, { /* NULL */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* SNOW f8 */ @@ -2501,7 +2501,7 @@ cnstr_shdsc_pdcp_c_plane_decap(uint32_t *descbuf, { /* AES CTR */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* ZUC-E */ @@ -2654,7 +2654,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf, { /* NULL */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* SNOW f8 */ @@ -2666,7 +2666,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf, { /* AES CTR */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* ZUC-E */ @@ -2839,7 +2839,7 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf, { /* NULL */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* SNOW f8 */ @@ -2851,7 +2851,7 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf, { /* AES CTR */ SHR_WAIT, /* NULL */ SHR_WAIT, /* SNOW f9 */ - SHR_WAIT, /* AES CMAC */ + SHR_ALWAYS, /* AES CMAC */ SHR_WAIT /* ZUC-I */ }, { /* ZUC-E */ From patchwork Wed Jul 3 10:26:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142067 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 1FADD4555B; Wed, 3 Jul 2024 12:27:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3407342DC5; Wed, 3 Jul 2024 12:27:29 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011009.outbound.protection.outlook.com [52.101.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 2097942D55 for ; Wed, 3 Jul 2024 12:27:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RrRtteS7Uv1P4Ygnp7UR4DNdNynsHQ2gD9QOTQV5p/YAeFkOYa3qERu71SKdUbXD2y1P7pJCFFqjmqKP4sTsi17unBgd6veA80aQHftvoLXVrveEDhk6Chile43457qolsGpEX8gIcVCiolBg9UXBv33TO4dGeFxaDcVy9jcxP5SHfHwMnMpRix/LSAOqgSiQjTBUnpNAsRy6kAqtG+oc3I31MWVh3fADVoDz4HM0BbR6y+h2lNYOuPJWPT+rleocKzexcco+W7zHpDU0KAS+TTMVLcuvTuiT73er/jx+UAgeCWLoWXjeBhy7DDwwEUkjAcZLlJaszrRkkaTBD0YJw== 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=/s1pa6AQ98q9v/Tf9HIjqPprCiOAgF64CxH48HwVMqQ=; b=eHMp2/W+06oQy59cgWPiWXpGtrrFN4Dgmq3f9aOzwfPIVSgMJyPFp1KaSxwhHWSe1E5uNuefkHdZOQxuT0kqYo//LOEbXPyL6exKx+xpJu1NIF3fCIzyKgM9Mj734elTjL4KemD95ebB19ih2xkGfo8je+/3SaRDMPervygktT3LJ0toWF0GaQJkwYE3fGzx9A0B5BZi1/kFAPEcRMfSjuGmYbumYd8UzZSEr4cDC/av8DEDpnjBKg88NcZ8en9tmJ+xw+bQPs/JnWSUZrgPpbV4PAQisyRImdomu3wfDfOhQcVF6fL1AHpBOB8GB4I0hh/aJ3YvKe48X29VSDkgUg== 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=/s1pa6AQ98q9v/Tf9HIjqPprCiOAgF64CxH48HwVMqQ=; b=TwkLKzyqzDGL5S5ARc3D/uDPsRyLeKpvMqxaVDgOhbDyCGlVUXOUqqPb1l6Cbo7DXQqHyO4c7+uzy4aouaSqnXnVLQqnL1d9QifWSFUI2LMnbUHhmhSr3CUvk0goGbt0u1uHzuQtLgtYRqMWMQk9tdZ6c8A7SP1KEGgdMqRaaMk= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:26 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:26 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Subject: [PATCH 05/11] crypto/dpaa_sec: improve return value for retired queues Date: Wed, 3 Jul 2024 15:56:43 +0530 Message-Id: <20240703102649.3096530-6-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 95ca5a03-1729-4f99-c765-08dc9b4abbb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: s6wTE1nFhXSSsh+dcsiky4TwDFJQkN+k+umSRy9W2Utwwslv14Lf62VmG/J0v51AHm3qA0SML5ePQWBVofBOXBupRC4jLQDzKzV9MPZYFBEenaGcwsTVE2Nax878rA7GKQjZkiX5+9ItK0TyA/OAMY8Bsr01ekwdaBdKiVrQH7puVYtcxHdvWhga3QkDyTCCssMp/L3ra59k6TfzqLGVK9sf8JehPx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VEkMajhJJNaB2W2JMMUjlJoYbbNbAec6ApLhFdYKVCGWqM6RD2gVBpZSCeREnJcXVkeKbU9gXK2J7jcBQD6NH1cB+Kq2fCpaBfZJ6lsBEQHs1G4QpZyfb/yo/U3PgA== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /z94KPNSrTLvgjqoXn9/cCB8Xs/lTO+ZCNTQKtP/N/6+hunQ0SwzqqciKWgKQE6V+TOFdNli219CXx+owD/CFlWNTWO0ttiMf9e4ZaDWF+MpdgCdjHqEPs+45bL6Aw3MEpFhMgBL8pXekw570xf1kfd20MXMAJIkmrEfMy2r+mOpsaBf15k2nsWmGnrNHkuIFdkQmqhZJnrTBnh3WKaUTLTeKmaM7BTM5dHAvxl86g7AQtP9I2HPLqHCE6I8spQfEV6m41/HNJyUQ/U0GB+fNSHXMFLaHZ0ch5N4ttZrJ10plYvhR6jJA7187a2vgP1XuGFKzj+xjZGlOPtQVmyTm+11UEx+g+JqbSn8wwptLcPr615dA6RzKATm//5PV4qXWtm0JZizyre+yAVUOnZXWBL3fz6FgNCaaxui3NwS8ZKJflI6808D1m1FuoofvjeYUP4uX78WnBLXmD4X6WnzeVdmyhu0VDr2+vGSbKS4Qx9vunycq9VwH/eQoFK/7cvtb1GIJ3BIuRg1IjFYM1a8viwDSXquD2D0nx27+cj90fPVjvQuIwkD9/VSIsEIQiq9dJQb/gkLlFllnMS1MH+8PHYdSWeBFW8LMZdQUD6DCo+e3jZFi5GRgHeT+3Z+EWmndZzM3UN0ZU9/WSMvjg0hbJjhsdgMQwdDkzUzm+s3zlo9ZfGiy+OoNNLJDTSNKMypmg72NuuUvYiljfg1u4871vU4VFKKN2pN7W3YRuy79213Ych8RTKpt5fn9XlsmdoByb8/p1Ry4NOEx6A5JCwEgk9RopSd5kQ8zyOCROrZxiLO18EDi9M2sqDSscO0Zpq4zTJSjnPEfR5hWZe/swCvoDMOo3e1rN2dcNdMRpbbVYVb55axg15v5352UmU9ALrmRB+swKe+fhibtBWuGb0Ew5LaPsJD56X4gJzwuWvTnpa80YodPGVM+kqp0+cQUCNPTbep3mbVZuOYO+gwmv0u+XJ1BzILIo1d750eBHu/6PF5jDg2Y2Wpjw03TAgYRHqAYU3oD7Kp6EyS/9g4GaFNSWXgcK8IdFd85ST4dCs09zTvZ0b9gtttHeSyOjs25JCnTp0ShFv3QBtWeTMEkMl7FgjAoVWunNX4NevU0zzcMsBfHRblAme9WrjUqVhsb9WFiySoCFdf7V80RyGYOI3QtvX2Gx3CnVCUQvb7AUdoS/Kv3L9qdasxiesAD6Q2Ji3JpS4tHgN8ZSpfgVcZZSzWEk/7YW54wKUidMoZxWspdSuxbx+MdYIgfFsZ1X4lDvD+7EldOMRu08XiIpobfZp+TxiN9349mMi1DWN4F3VZ/HhnXwax1W6zM4L3eESx9N2u/CzWSB3WM1/qpE5vyRgJF3gRklFYxupnKKyKwUCLFvNg6YzQC31yF2j/WL4eN2dzKja1BFj/xBodPI1bSCfNT3fC8bPb+LD/SQl88FM0K8/IEJlDmplAl9/x4G6+XpNOUU+qOOpmc7GOasHojUNSueTUlaC8OjuGiHNIxN3kOGAb+ZHIDmk+Y2ofRg0Zu6rY10RrKOAp1XKm3m/bl1TC6ehf6ryF3x5TJu/21JlQ2qauwpKtfIw1kTzPMCJW2ISs X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95ca5a03-1729-4f99-c765-08dc9b4abbb8 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:26.0591 (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: Kl/ysm5mB9k7UBb07wNNMB5OYO0TO7sNku5THm9u9koqUbnshFEzugeX5vzyQFKt X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 This patch improves the return value for retired queues to enchance debugging prints. Signed-off-by: Gagandeep Singh --- drivers/bus/dpaa/base/qbman/qman.c | 5 +++-- drivers/crypto/dpaa_sec/dpaa_sec.c | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 6d2fbdcf02..9975271ba2 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * * Copyright 2008-2016 Freescale Semiconductor Inc. - * Copyright 2017,2019-2023 NXP + * Copyright 2017,2019-2024 NXP * */ @@ -1746,9 +1746,10 @@ int qman_retire_fq(struct qman_fq *fq, u32 *flags) int rval; u8 res; + /* Queue is already in retire or oos state */ if ((fq->state != qman_fq_state_parked) && (fq->state != qman_fq_state_sched)) - return -EINVAL; + return 0; #ifdef RTE_LIBRTE_DPAA_HWDEBUG if (unlikely(fq_isset(fq, QMAN_FQ_FLAG_NO_MODIFY))) return -EINVAL; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 679f78c4b9..105274e49e 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2017-2022 NXP + * Copyright 2017-2024 NXP * */ @@ -2504,11 +2504,15 @@ static int dpaa_sec_detach_rxq(struct dpaa_sec_dev_private *qi, struct qman_fq *fq) { unsigned int i; + int ret; for (i = 0; i < RTE_DPAA_MAX_RX_QUEUE; i++) { if (&qi->inq[i] == fq) { - if (qman_retire_fq(fq, NULL) != 0) - DPAA_SEC_DEBUG("Queue is not retired\n"); + ret = qman_retire_fq(fq, NULL); + if (ret != 0) + DPAA_SEC_ERR("Queue %d is not retired" + " err: %d\n", fq->fqid, + ret); qman_oos_fq(fq); qi->inq_attach[i] = 0; return 0; From patchwork Wed Jul 3 10:26:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142068 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 993204555B; Wed, 3 Jul 2024 12:27:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9780F42DD5; Wed, 3 Jul 2024 12:27:30 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011053.outbound.protection.outlook.com [52.101.65.53]) by mails.dpdk.org (Postfix) with ESMTP id 2C2DD42D9D for ; Wed, 3 Jul 2024 12:27:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZOCnIkv6S1kRLf39ErD92C1wktwloPQg2JpzsVqyh4+D2xtXCGtJJ7nUo5LrH/ggxts7fh0EU2jWncsQAEZ/6yU9k+gWy0HRVKCMGvqzdeRdfD7XStgpqxDwwLl49kE6Ox+n8mgNPi3dyj/8snRLMB+2ciY3/3PACu1PY39gRr+0HoHSYeqrWahCA6sNP8pv7tbAqE4qYtxXYScMX2WdEKs3l7Mub954Z5+/eyvVXAoPcA19v4lOKxKRJzHpNGF+kRdbxQmjUDZ7SI86ofIRuGna/CR9xmUBfY0XQ28ZzMcXQKO4bivfIeE1FwF0/oVgl+F4qq/ELN3Zi/Y6V6kiLw== 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=Ggo1883vIx7C3aM02+5c0vFs6mhCkAo8hGQv/0c31sM=; b=IFCBxTdUX6KZrIesTVDeNLeL2EWfnC1QqY96T7Oeo7LKxH0lcrlXixlUg99dvsMB6dc2GOVD54Vc0cxOJ0vMcgE75ByaKMV7dfYFxA6877zNUVGGnDyw69HWI/ZMul7GOs2lTpHTgEZPY4uWe36COm4zGyzuPshOmEPZlyvylLv5KnzzDJtPYxlRQCw5SuREX5sCrFXh5oLZ8L+jv72nUEcYNFrQxpTfehdxh/xkw1se+ZrSq07Z2mAFIbAK+fqXUP88p/AT+y4Umw2ADOw0xqo2GEnOr9XPA5ghZrHKgJG1ZQ5S+XgohQsEq5gbjJ4cnM6rf/rsviYeJZQgPNQLBg== 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=Ggo1883vIx7C3aM02+5c0vFs6mhCkAo8hGQv/0c31sM=; b=a5TgmCOG497ogivh2SEJPKnCm2+ULqVBFMYrT3IF906lueq3TkOhtwowSKghQuGkuFO7Iw/lXvSJhS9895KWPVaFP7sVgWIcuVB9TklT/q2Iaz0fMr78R7eJTDzgO2V0V+WbMGSMwY7zY2MK/HtPb4Bv1Xrb33hU2vnlflP+hSs= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:27 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:27 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal Subject: [PATCH 06/11] crypto/dpaax_sec: improve non-supported algo logs Date: Wed, 3 Jul 2024 15:56:44 +0530 Message-Id: <20240703102649.3096530-7-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e4d0831-e4cd-4b04-3d5d-08dc9b4abcbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: RjFlqkw83GdL9wmH1CCwCA74smF+XELxv3Kjntf00rLGfu1hg/q7nttzv6WuB3dy+VPY8grorsTgcNPIeAC67vgJ4Um9sOgEf3AToPNQ1QEzFACQ0IhG3vx36mNITltZoz3e5PC3eDPHMz/mI7emUuX4vHJq2lzxhOVyxwrzhQ5cy39NonuA1a44AyxbuYzyAYjO8W4lzSCPTiqdJJSZ3BFohyoD2KT7KbfGpre3PpuJvFL8oGoVXede+5n8tUFVbkR4CiEpeJX19C3taz0zfSryvTf1fFNiL50M3Og4LX9MpCpNuu/238J5Efw3tKcK0mtyoFuKPvsDSPSxBWqDfusSsrEgM3wGdVZluAyJutSm62dCe/siRqYxhplY7FI+5zExuGHXgwJvd01LegqVACVlWk/7IMElueoSjRbY1ay4WvdE5Pm7pnU5Zh1VYW3l6sgespCHDUMoc/uIdKTHDbuWgiizGWO3aPrIaI5Wu2o9t4a+YxV6/gvf0a5Tt9cn3jv77IASXRdJV3D9Z0x8AVsNEskbQnYd9e2V3eIm0WnwgjSvl1qLR8K0m3s6GSWr5cf1KxmxUPXAEb4KP787zIRz5Oc0Lsm8IU8+llhVJAAQGMV9TofRwYTvaHLq98myAsftV0CCC8yLv15HhmaGVuiZNV4sEfIo4wKcc3SFkLSfRP6UNgLe3hS7Yn7hrV4MZGW81zxgi+8V3HmhRLkxu2JzKt9ZUJed0zNET+aq6trTFOvwcbzZq9aTlUSEoyZFDJkJnSwII/mbqiJKPi8YRLSZ8JViehuIQ+4KzjS6wYdLSzWPoH67DMvuHDtqz+Xb5Bo29O6l3cT66ziMB9Lm7V1Bt5fNPFO5dpaaIKx5nZDkwETMxKRSRYqPOWCedNrYC0N5LjU6QRVJq4cBB5CWjpJey/4QGFUJLttvriW+lxiuh0cEaa3boNp2dWaww58jFkdsYCD5GOKr1aimicIFDAYcb+8dFtvNBvlgPzkfVdlQC4p9b4/Dc1Ba3HVOZ8u4nJQk/zQEUAxbslynx4DgFTqShZJg5GVZAKA0dHjRgz0vDxj5y93XH/yioE+avFoBGLM6qHPkT0MufeKYUUDjWJEtka8XF345gQnvHZBy4gMQzCIHqgiyCkYF9+FNBaVy1FB25w9G4INc5RVWu76h9e4ae5j7OAZWIF25BII3Q1AozITdjACPVG7jcNU9zK/ZRx10APBX+ZvwQaTG1aBQsxHqLVYVidA8WCmzaSUgYxaY+OvwlMwcmsYiK6Wc23YHjdM1spPvgIjSlEOOoqKIkJTfbh8+zLyyEJxFxptaEuklizhA8Vk+ibzPRUFTf87KjNFQHfo5uRL7rImDuT5dmnJF7s2M3aH3RsPBy7F9hZxJ9b/UUo+pH6EAaxxlmf8Bc2T/OCD0abI9K6TQy8LdCQ== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Q0AfxOB3fPqP39bFZzCOXM6GYfqFPvkYprHFaagnHGUMhWXehnH8u9RgmV8sztkbC9BK/SYRTE0Rq6sKDNCmJSl/iXJ65xG1OLoUDEtpRUZcJwE0PzB4GqOGNuA4Ka0//1kWmYI+pmin/hkF+kuy8SZnmGw4uQkyVIt8HE57YQ7UMySpgb4m9xbPIRhogiuieOHqEEU6/WjEesqATyvMb0UEUywHb0h+gUzfwIEY4mosRuafAzOLhoVGjkM0vlGhjSeVQGnshH2PW6gCYmbsbhWEA4b+oza2zK6qXjqwGMYcRiptNv+9J1nRVY34juiLhlMcEJM0CcL1p6aJPFLFrJTnbOOkM9jhUC5xpFFxJLdv2a6q+nBtJ7Q1ymfw7e49wSetXlGonJqMkwKtAmLWjAoyIJq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gx+t2sn4ONMlQfD4oXO1QdNz6fKmBXMY+exuNeCuBsYB2bQjA5aJ/hIoqxTWbZVngt9Ku7eQQbptYpUUZZzU6IuKjGjevBIOoRoDqdw4MSiXoYjn/KW4RzJAnE X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e4d0831-e4cd-4b04-3d5d-08dc9b4abcbb X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:27.9023 (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: 7IRggXqqOJVzgxLMounZ2+c1CBeHB7GFa+GKukHaIEU3KGVuoDjTe+F74kAfJSOt X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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: Hemant Agrawal This patch improves the debug logs for un-supported algo sessions. Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 128 +++++--------------- drivers/crypto/dpaa_sec/dpaa_sec.c | 56 ++++----- 2 files changed, 53 insertions(+), 131 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 1cae6c4505..922a35e3ee 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1378,9 +1378,10 @@ build_sec_fd(struct rte_crypto_op *op, case DPAA2_SEC_PDCP: ret = build_proto_compound_sg_fd(sess, op, fd, bpid); break; - case DPAA2_SEC_HASH_CIPHER: default: - DPAA2_SEC_ERR("error: Unsupported session"); + DPAA2_SEC_ERR("error: Unsupported session %d", + sess->ctxt_type); + ret = -ENOTSUP; } } else { switch (sess->ctxt_type) { @@ -1402,9 +1403,9 @@ build_sec_fd(struct rte_crypto_op *op, case DPAA2_SEC_PDCP: ret = build_proto_compound_fd(sess, op, fd, bpid, qp); break; - case DPAA2_SEC_HASH_CIPHER: default: - DPAA2_SEC_ERR("error: Unsupported session"); + DPAA2_SEC_ERR("error: Unsupported session%d", + sess->ctxt_type); ret = -ENOTSUP; } } @@ -2169,20 +2170,9 @@ dpaa2_sec_cipher_init(struct rte_crypto_sym_xform *xform, &cipherdata, session->dir); break; - case RTE_CRYPTO_CIPHER_KASUMI_F8: - case RTE_CRYPTO_CIPHER_AES_F8: - case RTE_CRYPTO_CIPHER_AES_ECB: - case RTE_CRYPTO_CIPHER_3DES_ECB: - case RTE_CRYPTO_CIPHER_3DES_CTR: - case RTE_CRYPTO_CIPHER_AES_XTS: - case RTE_CRYPTO_CIPHER_ARC4: - case RTE_CRYPTO_CIPHER_NULL: - DPAA2_SEC_ERR("Crypto: Unsupported Cipher alg %u", - xform->cipher.algo); - ret = -ENOTSUP; - goto error_out; default: - DPAA2_SEC_ERR("Crypto: Undefined Cipher specified %u", + DPAA2_SEC_ERR("Crypto: Unsupported Cipher alg %s (%u)", + rte_cryptodev_get_cipher_algo_string(xform->cipher.algo), xform->cipher.algo); ret = -ENOTSUP; goto error_out; @@ -2407,23 +2397,16 @@ dpaa2_sec_auth_init(struct rte_crypto_sym_xform *xform, !session->dir, session->digest_length); break; - case RTE_CRYPTO_AUTH_AES_CBC_MAC: - case RTE_CRYPTO_AUTH_AES_GMAC: - case RTE_CRYPTO_AUTH_KASUMI_F9: - case RTE_CRYPTO_AUTH_NULL: - DPAA2_SEC_ERR("Crypto: Unsupported auth alg %un", - xform->auth.algo); - ret = -ENOTSUP; - goto error_out; default: - DPAA2_SEC_ERR("Crypto: Undefined Auth specified %u", - xform->auth.algo); + DPAA2_SEC_ERR("Crypto: Unsupported Auth alg %s (%u)", + rte_cryptodev_get_auth_algo_string(xform->auth.algo), + xform->auth.algo); ret = -ENOTSUP; goto error_out; } if (bufsize < 0) { - DPAA2_SEC_ERR("Crypto: Invalid buffer length"); + DPAA2_SEC_ERR("Crypto: Invalid SEC-DESC buffer length"); ret = -EINVAL; goto error_out; } @@ -2500,14 +2483,11 @@ dpaa2_sec_aead_init(struct rte_crypto_sym_xform *xform, aeaddata.algmode = OP_ALG_AAI_GCM; session->aead_alg = RTE_CRYPTO_AEAD_AES_GCM; break; - case RTE_CRYPTO_AEAD_AES_CCM: - DPAA2_SEC_ERR("Crypto: Unsupported AEAD alg %u", - aead_xform->algo); - ret = -ENOTSUP; - goto error_out; default: - DPAA2_SEC_ERR("Crypto: Undefined AEAD specified %u", - aead_xform->algo); + + DPAA2_SEC_ERR("Crypto: Unsupported AEAD alg %s (%u)", + rte_cryptodev_get_aead_algo_string(aead_xform->algo), + aead_xform->algo); ret = -ENOTSUP; goto error_out; } @@ -2545,7 +2525,7 @@ dpaa2_sec_aead_init(struct rte_crypto_sym_xform *xform, &aeaddata, session->iv.length, session->digest_length); if (bufsize < 0) { - DPAA2_SEC_ERR("Crypto: Invalid buffer length"); + DPAA2_SEC_ERR("Crypto: Invalid SEC-DESC buffer length"); ret = -EINVAL; goto error_out; } @@ -2680,24 +2660,9 @@ dpaa2_sec_aead_chain_init(struct rte_crypto_sym_xform *xform, authdata.algmode = OP_ALG_AAI_CMAC; session->auth_alg = RTE_CRYPTO_AUTH_AES_CMAC; break; - case RTE_CRYPTO_AUTH_AES_CBC_MAC: - case RTE_CRYPTO_AUTH_AES_GMAC: - case RTE_CRYPTO_AUTH_SNOW3G_UIA2: - case RTE_CRYPTO_AUTH_NULL: - case RTE_CRYPTO_AUTH_SHA1: - case RTE_CRYPTO_AUTH_SHA256: - case RTE_CRYPTO_AUTH_SHA512: - case RTE_CRYPTO_AUTH_SHA224: - case RTE_CRYPTO_AUTH_SHA384: - case RTE_CRYPTO_AUTH_MD5: - case RTE_CRYPTO_AUTH_KASUMI_F9: - case RTE_CRYPTO_AUTH_ZUC_EIA3: - DPAA2_SEC_ERR("Crypto: Unsupported auth alg %u", - auth_xform->algo); - ret = -ENOTSUP; - goto error_out; default: - DPAA2_SEC_ERR("Crypto: Undefined Auth specified %u", + DPAA2_SEC_ERR("Crypto: Undefined Auth specified %s (%u)", + rte_cryptodev_get_auth_algo_string(auth_xform->algo), auth_xform->algo); ret = -ENOTSUP; goto error_out; @@ -2728,20 +2693,10 @@ dpaa2_sec_aead_chain_init(struct rte_crypto_sym_xform *xform, cipherdata.algmode = OP_ALG_AAI_CTR; session->cipher_alg = RTE_CRYPTO_CIPHER_AES_CTR; break; - case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: - case RTE_CRYPTO_CIPHER_ZUC_EEA3: - case RTE_CRYPTO_CIPHER_NULL: - case RTE_CRYPTO_CIPHER_3DES_ECB: - case RTE_CRYPTO_CIPHER_3DES_CTR: - case RTE_CRYPTO_CIPHER_AES_ECB: - case RTE_CRYPTO_CIPHER_KASUMI_F8: - DPAA2_SEC_ERR("Crypto: Unsupported Cipher alg %u", - cipher_xform->algo); - ret = -ENOTSUP; - goto error_out; default: - DPAA2_SEC_ERR("Crypto: Undefined Cipher specified %u", - cipher_xform->algo); + DPAA2_SEC_ERR("Crypto: Undefined Cipher specified %s (%u)", + rte_cryptodev_get_cipher_algo_string(cipher_xform->algo), + cipher_xform->algo); ret = -ENOTSUP; goto error_out; } @@ -2784,7 +2739,7 @@ dpaa2_sec_aead_chain_init(struct rte_crypto_sym_xform *xform, session->digest_length, session->dir); if (bufsize < 0) { - DPAA2_SEC_ERR("Crypto: Invalid buffer length"); + DPAA2_SEC_ERR("Crypto: Invalid SEC-DESC buffer length"); ret = -EINVAL; goto error_out; } @@ -3041,22 +2996,9 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, case RTE_CRYPTO_AUTH_NULL: authdata->algtype = OP_PCL_IPSEC_HMAC_NULL; break; - case RTE_CRYPTO_AUTH_SNOW3G_UIA2: - case RTE_CRYPTO_AUTH_SHA1: - case RTE_CRYPTO_AUTH_SHA256: - case RTE_CRYPTO_AUTH_SHA512: - case RTE_CRYPTO_AUTH_SHA224: - case RTE_CRYPTO_AUTH_SHA384: - case RTE_CRYPTO_AUTH_MD5: - case RTE_CRYPTO_AUTH_AES_GMAC: - case RTE_CRYPTO_AUTH_KASUMI_F9: - case RTE_CRYPTO_AUTH_AES_CBC_MAC: - case RTE_CRYPTO_AUTH_ZUC_EIA3: - DPAA2_SEC_ERR("Crypto: Unsupported auth alg %u", - session->auth_alg); - return -ENOTSUP; default: - DPAA2_SEC_ERR("Crypto: Undefined Auth specified %u", + DPAA2_SEC_ERR("Crypto: Unsupported auth alg %s (%u)", + rte_cryptodev_get_auth_algo_string(session->auth_alg), session->auth_alg); return -ENOTSUP; } @@ -3085,18 +3027,10 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, case RTE_CRYPTO_CIPHER_NULL: cipherdata->algtype = OP_PCL_IPSEC_NULL; break; - case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: - case RTE_CRYPTO_CIPHER_ZUC_EEA3: - case RTE_CRYPTO_CIPHER_3DES_ECB: - case RTE_CRYPTO_CIPHER_3DES_CTR: - case RTE_CRYPTO_CIPHER_AES_ECB: - case RTE_CRYPTO_CIPHER_KASUMI_F8: - DPAA2_SEC_ERR("Crypto: Unsupported Cipher alg %u", - session->cipher_alg); - return -ENOTSUP; default: - DPAA2_SEC_ERR("Crypto: Undefined Cipher specified %u", - session->cipher_alg); + DPAA2_SEC_ERR("Crypto: Unsupported Cipher alg %s (%u)", + rte_cryptodev_get_cipher_algo_string(session->cipher_alg), + session->cipher_alg); return -ENOTSUP; } @@ -3380,7 +3314,7 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, goto out; if (bufsize < 0) { - DPAA2_SEC_ERR("Crypto: Invalid buffer length"); + DPAA2_SEC_ERR("Crypto: Invalid SEC-DESC buffer length"); goto out; } @@ -3679,7 +3613,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, } if (bufsize < 0) { - DPAA2_SEC_ERR("Crypto: Invalid buffer length"); + DPAA2_SEC_ERR("Crypto: Invalid SEC-DESC buffer length"); goto out; } @@ -3739,7 +3673,7 @@ dpaa2_sec_security_session_create(void *dev, return -EINVAL; } if (ret != 0) { - DPAA2_SEC_ERR("Failed to configure session parameters"); + DPAA2_SEC_DEBUG("Failed to configure session parameters %d", ret); return ret; } @@ -3781,7 +3715,7 @@ dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev __rte_unused, ret = dpaa2_sec_set_session_parameters(xform, sess_private_data); if (ret != 0) { - DPAA2_SEC_ERR("Failed to configure session parameters"); + DPAA2_SEC_DEBUG("Failed to configure session parameters %d", ret); /* Return session to mempool */ return ret; } diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 105274e49e..453066fded 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -495,7 +495,8 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) ses->dir); break; default: - DPAA_SEC_ERR("unsupported cipher alg %d", + DPAA_SEC_ERR("unsupported cipher alg %s (%d)", + rte_cryptodev_get_cipher_algo_string(ses->cipher_alg), ses->cipher_alg); return -ENOTSUP; } @@ -556,7 +557,9 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) ses->digest_length); break; default: - DPAA_SEC_ERR("unsupported auth alg %u", ses->auth_alg); + DPAA_SEC_ERR("unsupported auth alg %s (%u)", + rte_cryptodev_get_auth_algo_string(ses->auth_alg), + ses->auth_alg); } break; case DPAA_SEC_AEAD: @@ -635,9 +638,8 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) ses->iv.length, ses->digest_length, ses->dir); break; - case DPAA_SEC_HASH_CIPHER: default: - DPAA_SEC_ERR("error: Unsupported session"); + DPAA_SEC_ERR("error: Unsupported session %d", ses->ctxt); return -ENOTSUP; } @@ -2221,8 +2223,9 @@ dpaa_sec_cipher_init(struct rte_cryptodev *dev __rte_unused, session->cipher_key.alg = OP_ALG_ALGSEL_ZUCE; break; default: - DPAA_SEC_ERR("Crypto: Undefined Cipher specified %u", - xform->cipher.algo); + DPAA_SEC_ERR("Crypto: Unsupported Cipher specified %s (%u)", + rte_cryptodev_get_cipher_algo_string(xform->cipher.algo), + xform->cipher.algo); return -ENOTSUP; } session->dir = (xform->cipher.op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ? @@ -2323,7 +2326,8 @@ dpaa_sec_auth_init(struct rte_cryptodev *dev __rte_unused, session->auth_key.algmode = OP_ALG_AAI_CMAC; break; default: - DPAA_SEC_ERR("Crypto: Unsupported Auth specified %u", + DPAA_SEC_ERR("Crypto: Unsupported Auth specified %s (%u)", + rte_cryptodev_get_auth_algo_string(xform->auth.algo), xform->auth.algo); return -ENOTSUP; } @@ -2412,7 +2416,8 @@ dpaa_sec_chain_init(struct rte_cryptodev *dev __rte_unused, session->auth_key.algmode = OP_ALG_AAI_CMAC; break; default: - DPAA_SEC_ERR("Crypto: Unsupported Auth specified %u", + DPAA_SEC_ERR("Crypto: Unsupported Auth specified %s (%u)", + rte_cryptodev_get_auth_algo_string(auth_xform->algo), auth_xform->algo); return -ENOTSUP; } @@ -2437,7 +2442,9 @@ dpaa_sec_chain_init(struct rte_cryptodev *dev __rte_unused, session->cipher_key.algmode = OP_ALG_AAI_CTR; break; default: - DPAA_SEC_ERR("Crypto: Undefined Cipher specified %u", + + DPAA_SEC_ERR("Crypto: Undefined Cipher specified %s (%u)", + rte_cryptodev_get_cipher_algo_string(cipher_xform->algo), cipher_xform->algo); return -ENOTSUP; } @@ -2849,22 +2856,9 @@ dpaa_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, session->auth_key.alg = OP_PCL_IPSEC_AES_XCBC_MAC_96; session->auth_key.algmode = OP_ALG_AAI_XCBC_MAC; break; - case RTE_CRYPTO_AUTH_SNOW3G_UIA2: - case RTE_CRYPTO_AUTH_SHA1: - case RTE_CRYPTO_AUTH_SHA256: - case RTE_CRYPTO_AUTH_SHA512: - case RTE_CRYPTO_AUTH_SHA224: - case RTE_CRYPTO_AUTH_SHA384: - case RTE_CRYPTO_AUTH_MD5: - case RTE_CRYPTO_AUTH_AES_GMAC: - case RTE_CRYPTO_AUTH_KASUMI_F9: - case RTE_CRYPTO_AUTH_AES_CBC_MAC: - case RTE_CRYPTO_AUTH_ZUC_EIA3: - DPAA_SEC_ERR("Crypto: Unsupported auth alg %u", - session->auth_alg); - return -ENOTSUP; default: - DPAA_SEC_ERR("Crypto: Undefined Auth specified %u", + DPAA_SEC_ERR("Crypto: Unsupported auth alg %s (%u)", + rte_cryptodev_get_auth_algo_string(session->auth_alg), session->auth_alg); return -ENOTSUP; } @@ -2896,16 +2890,9 @@ dpaa_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, case RTE_CRYPTO_CIPHER_NULL: session->cipher_key.alg = OP_PCL_IPSEC_NULL; break; - case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: - case RTE_CRYPTO_CIPHER_ZUC_EEA3: - case RTE_CRYPTO_CIPHER_3DES_ECB: - case RTE_CRYPTO_CIPHER_AES_ECB: - case RTE_CRYPTO_CIPHER_KASUMI_F8: - DPAA_SEC_ERR("Crypto: Unsupported Cipher alg %u", - session->cipher_alg); - return -ENOTSUP; default: - DPAA_SEC_ERR("Crypto: Undefined Cipher specified %u", + DPAA_SEC_ERR("Crypto: Unsupported Cipher alg %s (%u)", + rte_cryptodev_get_cipher_algo_string(session->cipher_alg), session->cipher_alg); return -ENOTSUP; } @@ -3181,7 +3168,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev, session->auth_key.alg = PDCP_AUTH_TYPE_NULL; break; default: - DPAA_SEC_ERR("Crypto: Unsupported auth alg %u", + DPAA_SEC_ERR("Crypto: Unsupported auth alg %s (%u)", + rte_cryptodev_get_auth_algo_string(session->auth_alg), session->auth_alg); rte_free(session->cipher_key.data); return -EINVAL; From patchwork Wed Jul 3 10:26:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142069 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 224A04555B; Wed, 3 Jul 2024 12:28:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ABC9A42DB4; Wed, 3 Jul 2024 12:27:32 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011055.outbound.protection.outlook.com [52.101.65.55]) by mails.dpdk.org (Postfix) with ESMTP id 69FCE42DCB for ; Wed, 3 Jul 2024 12:27:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M9KnrzB1MJqLFLIOsnameDoQPuYUYMB7O94R7JuWD4aQMeAl69VclduQMIiUn90RxtGPCjDj6zDmPmC2MlW995G3jwUcXrr8aVAW17OeZ2dzvs55wlCUjb9Qx2e/vEZrAs02rTaEnxZFUCtnBOPTndY2Kg7naDITZ36X6pWKo7Q6eHGmhIrMN3u5oLKtCDakgUVVnLjjGXJhxxmBi67hcEPM3SKilGqPMytXhK4waYFqK24jM62g9GZW8E5ZY3ORmQ2bhfVCpA7zxn20mUC1iMoTHPPlV6XQBC0/mn+/OA0yjJeWGS11pYnLCzPc/1LAIN+6u2MPgtvgsToNyxCucw== 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=mYsXYPtHamcCV8/7TUwdHGOhH5PWjWdF4tJC+18b9i0=; b=X2VS3rJchNiDBRP0HWFJJUi3N24BA5Slt6zbco+yiyCN7JL6Jt50vKjEmhJFq6CJYkRb9Q2KIcRavLzUVAeqN0bR71q77HS9iDZobjmNMD1k7S39+4k+wFG2LNCHSGt+v22egmobZCp/aoFGHAD7jigCdXEisWV9LlosTmcBmYvuWd8hVoidfSZCjqDuJXC+MUg5KRq5QKdqT0duHmYPdAnnnpMr3h603iUbPZAdbW3qTgEGcezZkUouWb/hsWcQZj0JlqvXxQWsUcpODdql8I27akfagYXh2ZEzWyshTUR/JEyFDUGLkLlHg1XI9MWrXym6vPaemkLZXTPKa9OB2w== 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=mYsXYPtHamcCV8/7TUwdHGOhH5PWjWdF4tJC+18b9i0=; b=LcYXjnhOwJD5svMBTTJ4b9xPCSDiD7E3oC9yR+z+yhmDh1IPEsfCVUotrkn2DPKo3K3Wk+LUdrRFWhCde26fFGtYi6QI2UPdbC7yNZZ5+5za9u01uD0v+IGEU/KGrKxGTIQwb+EVMAFlJZY4F3GI70+rxelcweV8mOuNQl97YAs= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:29 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:29 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal Subject: [PATCH 07/11] crypto/dpaa2_sec: adding session update API support Date: Wed, 3 Jul 2024 15:56:45 +0530 Message-Id: <20240703102649.3096530-8-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: be23bc9e-d60e-4d28-bfe4-08dc9b4abdb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: cwhHN87I8JuB7Ha7SzA0JKIzc02bND3qBOxfJnDJ4toK2ARk634JloFY7KbJKdWHKPGEEDjeztIOg4YkIQ20GygkFIe6VtX+YQUQ3y/RZeMbEyS6LFO3nGYP8WjrHTF7NSaeQmDFC/A45oyes+c242/RZlWZTj+bCY9bfEHzvQGGX2tJvXz9KyOiq7Drztb+T/9av0iuC4BIvsDvflmY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suOLuWDGUSd/CHWM9LKnUXw0plhywCLCGbvf3egbJlTiaajBlI4KVDe5i40lon5SpFaGxoSWpxvkmCMfv9EpMt6mWuWFgEdL07YyhaiaZtotwUnnMybMM5yZWB2AiDIGEiM3k8noyGI3+OtHn9jWFp81r9g== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GcsokC+ysmIbD2Y5C8QMVmxDzr7yRZQ4idN9SDwe5UkETUT7K9mUSCphkLUfc35nG7tZZYOrZHkMDEA9o4GAxbfPKF0z2HyXSgxLlsqLLDqDPBoiHuHzGVf5WwnhPizluUmIJhOqPWGpjQa+qohvLLz6DdSm4k/7zHnnTm8NYxgi53+Yt9/S7vVJfORZLgX5okjT+8UrhVoC3wrSqp2NjRwFd76ZAi8lMXTYs3B0RbTnH5fO0+Pk07ZmwaoZ7PrckUnVEaTWdaikUSJ3kR4QsvppgpdY7dw6YKjjGcA1P8U3zXo1EIq5DG9kz+1TX7bF3Ph+pEdXcRML385h40yAbvUBEnw+veNzC5YhfvMvtrWJLkHbgdwVCWDXfcwVsWPPSeUIpTrSAluzf0kjIKWH+aZQZ2OqeLuQB5xjW3ZnyHr75X8PrvIQ3oYARpn2ywGXTEA5rxA+0oI5Fg0g1ICiBSGmqZrnN6dkThjCkvfI+yb/F3/WDIUYUWCrC9ikt40HE9bIcMkUKlqcRLOoN6goZbAlaRAS7c8tBem4cEcF2Dl6aaIzi1a/HrD0uqZ6hz8/GENJDuURHDMTcD0zqDqzF5Xc6kuHA7rPigqfJRkYuQWRjYPwSqvuNyrZMDwFA13yGGtmSAlH/WfTDVBoNvn2In4sANlTkajk8500rH2sKKuzAHH7uCIImas8qpISBD/WE0M+jXZmteIIPiskr0jcbUFfC/rKMGqdR760ij2r9XFTl2yiQZeNltcC7JaH+WpOTmwYPYBMoYD5oDYexix3Huu+lvz8HmMkA+huAHkgFjiBF3Aka3GKy9qKSomRotdttBNDt4bQIUwQF7wCT1B8egZz5+i7NArC8MVkFch1JIj8hZWx4ygSkh8szog66fHQcpogERa9D0LG+KowgDgCjNjUNT/3Gf9u84vU8nysacbI+a6SRJomvFyfe7ZtbWso+a/AgmlNRAk9/MOLZEp+owwW2JQBPNfcynLWx7zrvIBfEd8Ca+h9roabjF3bvTCIeFpG6Z1gzgrYR8xWaTXbRjIHDQZKUqYVjau8hjUrkqEen3lR+hDsRTe4N3rFsoGa0mVtkEZrxEtR6w+gCEV5YvTDAvIrzZ0FtZYMEEtk/87iM+JIbc69IGa9jRsMmxsaViAKlFwYDH3ED/38U0Ios6t6xrS7UCffUokUdQWOf8lsAe6qamF3wYRm9GrDOrqgCoYUPpw+pGOc6MJr6CUKBULf+m3yeh/89O4/3C80YtL8O6T+iN/EkcsRut9mhuUFpo0mm+45RrJWnu52Jd9Pabe8saKINTX3Pqh/ISs6PDOi8ujWtLW7d/wNQeIwPK2BQU2lfzEpxMqLuGlmI9zYDBw0Jl/ydpxCtjke4VzSLlUHK/auT9AA9IaInZofjvGvrESP6VjfVDRgROS3IG/osLDzHM4s/w0QWzsvNQSbjoUcLNvyFyW21r+H0A2xC67s80mVhHZVEdA2ObAH9MquqIZ/CibbPXttAfn5O7KN7mNOfGq8Mt5k5m3Js+uiuiRVXB0nY38eaGrzvwG6mknv8jnic1Tx9V6HJ23veeGt10KoogSBb3vYqEw7KpEbuGo0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: be23bc9e-d60e-4d28-bfe4-08dc9b4abdb4 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:29.3857 (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: 5MSiRDzjceXYswrgtLGY+GTVpirSCiGGNTgKOWAdR8HaWhqIyWa+lI2u7cv8CVMR X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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: Hemant Agrawal This patch add support for Session Update API for RTE Security sessions. Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 37 +++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 922a35e3ee..4f80cfea5e 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3134,8 +3134,11 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, if (ipsec_xform->options.iv_gen_disable == 0) encap_pdb.options |= PDBOPTS_ESP_IVSRC; - if (ipsec_xform->options.esn) + if (ipsec_xform->options.esn) { encap_pdb.options |= PDBOPTS_ESP_ESN; + encap_pdb.seq_num_ext_hi = conf->ipsec.esn.hi; + encap_pdb.seq_num = conf->ipsec.esn.low; + } if (ipsec_xform->options.copy_dscp) encap_pdb.options |= PDBOPTS_ESP_DIFFSERV; if (ipsec_xform->options.ecn) @@ -3264,8 +3267,11 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, } else { decap_pdb.options = sizeof(struct rte_ipv6_hdr) << 16; } - if (ipsec_xform->options.esn) + if (ipsec_xform->options.esn) { decap_pdb.options |= PDBOPTS_ESP_ESN; + decap_pdb.seq_num_ext_hi = conf->ipsec.esn.hi; + decap_pdb.seq_num = conf->ipsec.esn.low; + } if (ipsec_xform->options.copy_dscp) decap_pdb.options |= PDBOPTS_ESP_DIFFSERV; if (ipsec_xform->options.ecn) @@ -3699,6 +3705,31 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused, return 0; } +static int +dpaa2_sec_security_session_update(void *dev, + struct rte_security_session *sess, + struct rte_security_session_conf *conf) +{ + struct rte_cryptodev *cdev = (struct rte_cryptodev *)dev; + void *sess_private_data = SECURITY_GET_SESS_PRIV(sess); + int ret; + + if (conf->protocol != RTE_SECURITY_PROTOCOL_IPSEC && + conf->ipsec.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) + return -ENOTSUP; + + dpaa2_sec_security_session_destroy(dev, sess); + + ret = dpaa2_sec_set_ipsec_session(cdev, conf, + sess_private_data); + if (ret != 0) { + DPAA2_SEC_DEBUG("Failed to configure session parameters %d", ret); + return ret; + } + + return ret; +} + static unsigned int dpaa2_sec_security_session_get_size(void *device __rte_unused) { @@ -4153,7 +4184,7 @@ dpaa2_sec_capabilities_get(void *device __rte_unused) static const struct rte_security_ops dpaa2_sec_security_ops = { .session_create = dpaa2_sec_security_session_create, - .session_update = NULL, + .session_update = dpaa2_sec_security_session_update, .session_get_size = dpaa2_sec_security_session_get_size, .session_stats_get = NULL, .session_destroy = dpaa2_sec_security_session_destroy, From patchwork Wed Jul 3 10:26:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142070 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 656E54555B; Wed, 3 Jul 2024 12:28:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FA0642DB1; Wed, 3 Jul 2024 12:27:34 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011004.outbound.protection.outlook.com [52.101.65.4]) by mails.dpdk.org (Postfix) with ESMTP id 1333B42DB4 for ; Wed, 3 Jul 2024 12:27:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K4y7zPFp5DmugqBRarYeZh+D/pbpA+qvZPhT0vyxNrAB+sLFrfTcafnknnsKUQL0Q0ntLhFMKn+pDeq81uKaKcDrSFOFjVmsrYG1oFB2kjMO9B8YvuaLpYDDbHkOPhzaq33SMuII1hAFmVpHEwO5q/Lpb3aFn/fh0K5CKAABVR/EOKWgFKyKIrVFC+TwG6Ec02yzkpDtct411bW5s50gBH9Pxw8zdxS0obPO+LMjrvauld4V+cnBiOj+hbDJmgbv3Y47eVZgcf5dF7bIK0FHaH8JozMhMIwdGkTbtxwDDsBzi4ELelo5eIxMf73M0yiWkKEQRtf3L/lUN9NMzVGCFQ== 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=G/p1LCw7B3cPTUOTlw8aDS5k+LR8zZcM5T0otQBZx/g=; b=ecVkAAwVS2KApnfZd9IaL0peIzFQg7A92sEcHXRPgUtPFAQtQWcisilyImv6/8Q4jKu6a4geR7HG9uIfN1xV74d9C475Ex2tdI9js3ZWYYZ9SZOiSwZfy/+173//YznMnOdhCDE+zZjZlV66DqN+2vYn1Wn3R9lLjRpyRfsrwfr3e+sYkPHR8aLKuNEfn3/FXlvr1cCBVxmlhaXAG1ayFXtRQqhP3Z+9MvTsYaHgqx0PCQbA0bamidZHnleYQC9CjNV3wZ/P0jv6xM6gA3RpQyjnGHKwlXqL2/COi0ObR3SqviFstPNa15l4wBybUgETztOi6kqUly5Y30VRJZ9pVw== 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=G/p1LCw7B3cPTUOTlw8aDS5k+LR8zZcM5T0otQBZx/g=; b=R7BDG5teH7KjEYgIpg6oTHDfWlOBvm8/4P3urzEW4JqE87PK351gEuqeb+NIAPfSm4IXobSzdh78uQXvVnN7QLHes77nXUot6oy+5CSab3s5eevBsm+DXSxUD6PGBVO/l4x8QE7pClFVUSoRwXbUGL8/rG2Q0kS29STjd6J8pOE= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:31 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:31 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal Subject: [PATCH 08/11] crypto/dpaa2_sec: add a check on nb desc Date: Wed, 3 Jul 2024 15:56:46 +0530 Message-Id: <20240703102649.3096530-9-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: ad1b6b42-8544-4a33-3299-08dc9b4abe95 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: NgIlogyzd99dBWGZ1m8g38dRx4LA4WNjKeg5orcbcDWUFrAZgG+bUHEFoDDBJQyCu4bNvjvpAley/IuHuFeCA3vssveFa6W48LwL+iF4Q82rBJHdklr5SrdhFknG1keojSUqn3ZAa7XhNSnnUIudtf/UE8ybDcYlGI2UAkNqGBu53awTXiL6IuIrRxy6cC7/+TeYG0M50ZkXTRDpJ4ilVY5x9twPCJx0yZv7xphWSQ8CHNVW5ZcAu7UFfoqK5aqyu2OZpTJOqA56gxDvs39B4QlzZKsJXqAjs94r+MLjbX6IvMEMUZuymygnSFYnEEdBeRvIlTq6h86vfry4PvN/9wbkL035BVegb09dKzOkLIQAHI12qGC4n9SREGjUsYBAkrtoTzLHIwZVhCQhcB+O1QIKJglL0+eUR9pN3FndYqoR0BOd7MWUYqlTc3OBz8jrQiawa6Ew5qDUPgDA7ON+fZlQ6b9UZ8kXY4h3CUd68FvM1r4OJ7MJfCfEeoEImNEwaj4Tir6R54QdCKzqDM0vS27pgtviDgoNkFML92zX1NRWTlpK0whI2dsjLReTlGJ7RQcRMeWvbOOrUj2kMMSZkuQpQeI0H6sdrwG6gGMkGbOPNwimcOk9WJde+8G07Tv4ZwGBSYJwVgIzY5XaDEtO92zxYRCA8xsX1XXlNGX3AD+axDCdBKaZC46eq9uyoxNEDUyoqCsvrQulB5UaQk05MsAVwdWv5fozt6yIj2DMCfmkVsB5veTqn+4MNE/kp41kv7ghw1IhY+Nq8z71Y1L1bubqWzEODndcMr7E4DslqXbOmzIzDtootkmoCQZZFjLVkK9/Jg9BXU1v6hbBCUYigskyUsdTiM1+iw5QWoMHdBpMAwqtwwm3AgMJrUNAzDe6flv9hJyh1/82dIgx8dmSoPsdqzqVYJt/SVArd78jrb0gO1G6Vlm1MRzBiwjd6ThgUcY2MmN/HiC3HNwI13tzdgXGdLBlAIRj1qS4jOm94SmVP65me2Jl6h/DFny3dWU6PPWS+q6RuYJkUAG7Bn84b92GxlqUKrdOxXBJNYibGatJzQiwCTpkh2haM8R2Vf9oydM2MqvDzlMjF4aBco3b/lc8WhO8vW/tJOWP0waK/PwU9VclO3MQzy5gWj/BaFpCb1QXfq+PPz8HT+fOL3WGO/pgetz0yGaTbkRgDPCYT6zcqVmA/jLKyAq6aUo8qE2Duma9OSMms2SRPVpv/zlkCLzJN81FJkG5EWIQHsJbYfKQSUTCKxBEAE9kYK4OgAbAlu+eX9bHCSt9g72y3Mm3dPQZ+duav81LzQwY5hsjjx4ibXWgyBY4PO4S4UTxEAJ4TAOENAhkpKP/Xdn7WWtzrEqZOZDmVud58kfFlLOvVdRsKick8RtoPppNMjJe9HD6fzI3ruVC69PNXUjD4aPFUw== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: te40GdHFH277dZAnP3vnYJo+TReIMJGnMumoJnQBVATzMUUN77LVQI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2PGEJhBTLb4BaJt3FLsddWj28WpLAsS3so+cA+uOvErw/7veve9sxdVB3vYtwrFyeMayhloVdXiX096GWjXLh0tT4wq9L1xD1CzuPz6p6hVxXHYaO2QaRcY86ihK79cf3JhyKnazTpfzqzN8Zf/8T5jx/PxXCx5BHzjcNi93GLlmNIzZUjpps8wEIOlt8zZ9IjJonP1cnhMOIKlrlodxEGtSvqX//7/oSThYFY+8mVKJ52H1/ijjZ03LCYJeI+MvLnPe3T7o+Lj0p+8Anvzcv99+/avsuCje+xvFwQl5rfwSlb5mzhR3VOLfhGlec0Ra/65XPNc/tRNVKVNIsfncdigH+NhlHp5928OCav53oBt4dMcniyccD8DIzjpiFlIgktGOHXPCHAIhTd40AHau1qyDAlPff/Oyrdla+PUgwBkKWUpRlDQe838w6P5EH34yH+zVXapLdSs8FXOfERZ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad1b6b42-8544-4a33-3299-08dc9b4abe95 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:31.0275 (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: 5xE7oC3GSIOw3AWnD2cb8cdvmJNHbROLNfNxviXS0MBsvVpccLR47Tnp13aq+6rY X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 This patch add preventive check for the validity of nb descriptors Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 4f80cfea5e..88cca1b429 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2015,6 +2015,13 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, return 0; } + if (qp_conf->nb_descriptors < (2 * FLE_POOL_CACHE_SIZE)) { + DPAA2_SEC_ERR("Minimum supported nb_descriptors %d," + " but given %d\n", (2 * FLE_POOL_CACHE_SIZE), + qp_conf->nb_descriptors); + return -EINVAL; + } + DPAA2_SEC_DEBUG("dev =%p, queue =%d, conf =%p", dev, qp_id, qp_conf); From patchwork Wed Jul 3 10:26:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142071 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 BB4734555B; Wed, 3 Jul 2024 12:28:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7631242E1D; Wed, 3 Jul 2024 12:27:35 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011053.outbound.protection.outlook.com [52.101.65.53]) by mails.dpdk.org (Postfix) with ESMTP id DF9E342E02 for ; Wed, 3 Jul 2024 12:27:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fBYraNjMS5H3O4YQrMO/FVbR8XJgQKel0EXNx/xrvQXmaqE4tNm2TZg2D/XPxpHACbEAnz7Ia1F6Tihj7gg7/DAo0pm2XU65HGwBklJQ8LQxAWc7kvT0/VFshFqcbTqK7yBU6Y8+cUomZrr6MQ2FoKoJG49umfibms78GuntokxM+GeA2ojNaD39uPBlWoCdIpN178NJvvERPashbGzK3GJDZmSDZ+y7T7lelgIwD8t/RpedWwMvwfhdz1IL37Da+lwaRzq4LPcvC3Pg+VTGpBRkHDOn87FYt71Y+YCtooAn5UzItTNeyS+bQMYfkk3Nb0cgsbMREnVO3afZGSwwwA== 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=VIbi+gj7pdNZr+cALrYwG1euzs6G+t2NJrXHK3W4Wd4=; b=Wjx3ucAOR2nyxwIJNTwQYlNLWis0B2d2ynx7fBaxcy05vkSJxSO3MKUafsbPUS/5ICFIRYjnHc5lpE8omK8/fq5a04kiHIuKO6k5WmRTQFzRGhvg+vp+1AFTjI+Y+icFDQtF94gnmqtvzwBjCE0DJLKl9p5ZIEr/BX2xwVy6w7cxnUUu+C4UaUbd+iPTh3MoNANlLBtwLUnGLee7cbkncwCNl+rgEQX05LBwktZIjhDgYBVkM8Ef/FNi5kzWUBxrLekOtxYzcJrhk+czOwnkM8hA6uU2IvRKgaUcqUM6QPGBwbKBL2rxgy+fb9vFVGegXFwGdxQsYEIcZ7SGGqs65A== 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=VIbi+gj7pdNZr+cALrYwG1euzs6G+t2NJrXHK3W4Wd4=; b=p/WwbovuCipa1dmqniJAwvXdnz/67eCdcp7MGoqA+EptScZ7LkRbQGAG2jFVzVqSn7QoFhvmSC4YBTDufb0rpW0IxaWdIZA8eV0RsX8v2l++ToY0/2zBP3eQOrkxiLiEzM4jH9RquUlWXLaK//VvS3iEHOmOZEJDQ4a1ZPIicfc= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:32 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:32 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal Subject: [PATCH 09/11] crypto/dpaa2_sec: initialize the authdata Date: Wed, 3 Jul 2024 15:56:47 +0530 Message-Id: <20240703102649.3096530-10-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c4a0f46-b84b-4c64-6923-08dc9b4abf98 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: 0eXS3Krzxd30MG15n0TBwmBiKQOLRa3J+WqP9FEgCiTzcH8xg93WGRcuQqMVoA8HsSiR/6mhCPU8RxCNcU9RxI45aZxF6fuLjmDKWwR45tKSy4eYLcQggFr7b3faILToPlenL/uE7YobipW+WwzUPp7VR5MLKtwc51AI347cBUdNXCkjW24VJZGXh+JPDTYB1enH6RrOxLEbuA1/T1gkhrS4TSovusTQByF00AzQuWz+tC934rlZZ0Un5nrvcFcWJ2aZoaPiVGfSLw5jUD8hCmikkvPzfCw97GSixGStFNvFK2nnC6ER/dlNLR46HFoJ239wiTcO20rVSW4DhBu2wuIiR3wRs23MRWdrV/uvAP+MMEGyeSEA5zcjFJ6rNYzyhCGUvqX46SoXqOSea9ONI1qK1tHu1RQZgTb0BcYyqsyyaEDmnSFS0ekEc30z/8POiAvXiaI7D2D25cjnIZx/Ua2824k8IjKm5F9oZKhs3HGpSJ9XUQ5yCW4TnTk9W+pFYN0BFj1CET06uRs+cBgjS7lxOvrHdc7zrOxlO7JydyEAi0zE57zjhNYMnd+ktkRYBm0WOPMEiZEbWffv/1gGvDxQdb1ne2rs02xeW2rx09ou2utzL0x5pA2sV0SrsblKCsePUBJbPkM+Lae6a+vs9GOofPmEDlV7c9Exm8T5wQund7wlJmsPyFAxZ+VEs9rjIqRc0LdnrGc4tuC8KElGwoSxarxWRNijyedJllw4fVLRPwvJfEE5snFVCPQ6nRat7K9M4/vWSlce6x02/FkNkxUKoZ32647BRfV0wD8jHWPNsNYWITjdi7Mw1kcFtNmuJF1nAVxe4TQZANQ+BbPiAC1LYxUb7mXHfZr9Q/9ciGEiL2JpG5hWA3sIcwMwqcbuR0tu5SzQ5UqT10e/WFKpB6mZtKSMyVgtErnqsdUOozNB6t3Oz2HGDd+afKVfIIGwWD6LX8ACXc+DLLeAHP/UOGOKOGXnEGj/JF1FEhBjTGq7VfIcD6Fh64xxeS4qHaTFSHFqnvHMjoVGmq0Uo+lJotidwoiPXHOOfCAeVu8HPKoyMOBR7P5Zy2NBRsP8LOfWznGfld0NY8N60inWoKyu5H2Hrp5ebgtkLvzmNKM//+VdzKZSbiUihuD24XUI3PvJJODcX016XtFH/og4dyWZwne5qVX/0gWML/Ulnhfbs+eelb/9f1l8SVqJ2HgS9wBiEaJjDoOryl7i8QX/UOUgFqQ/DHlpJyCWs/CIrw4aToU9U3U/1z0gYMx2+By3VD3jreNLu+GYC8qM7PhgezqU4wczECg+20Lr+c7RaNV52PRVjq4Lnu5XO/CLevVngqb4Rgwo8tLBtlPe4EpLSqItYBrmcTz6zPH2YbV2jai3Ss3msxkImqz6yvjAySWMZPFWJlD2hmRKw9WSnFhjIDgHuQ== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: big/KUjBeP69zhRtLRljYWeeQiJwE3RLvcpOEItOB/O9Z9l8FPZt3A+hNnyLkbpE0JCiVtTc2icZZ8Esnly+K1A7pVdJ0+VGRCs6mZ83ufbRKatMHJe4SIuwFE6IMlBfcIdAg7HHu2uMUiNeSnn2kcEj+qmyUXJ8AtTkli1JnyyM9R8ZTxDDhLIfK3Nw4l0LnUUVRHvtl/8WJUe21H4/iGvGt9JkacmoA3c/GSYzf9DOXCs4moFSrGXZsWuFhzb2+428PMHea1tEDMcCcNuIFfasDc2rOLZjDcq2bIrgmoRpq55JVqebvKppjoKeLQj49T/KYgOEnmDhhAe0XWxi05AET9/anWB3oMMs9llQm0NxiH3KS7LEdhw7PNeLXDnxN168Nqeaj2MmGqGpwmX0K5TK6FFOac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v9C51JYILWaZJyP6SRdTlssiK0xBdMuVVzNmsEi8YlJ+GjIs0JASh743VQZ+91B+S3chte3EHrOI6/B8Nzyiy0hKs1s6u/keUpYLzE8Ds X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c4a0f46-b84b-4c64-6923-08dc9b4abf98 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:32.8099 (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: GYTatHtkslRYIPQr61Aw6ejeW9SodmO2gYIZj11IJcY9hBpr5ftJqwofLoZDM+Om X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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: Hemant Agrawal This patch memset the authdata to 0. Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 88cca1b429..e115007cfd 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2218,6 +2218,8 @@ dpaa2_sec_auth_init(struct rte_crypto_sym_xform *xform, PMD_INIT_FUNC_TRACE(); + memset(&authdata, 0, sizeof(authdata)); + /* For SEC AUTH three descriptors are required for various stages */ priv = (struct ctxt_priv *)rte_zmalloc(NULL, sizeof(struct ctxt_priv) + 3 * From patchwork Wed Jul 3 10:26:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142072 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 173104555B; Wed, 3 Jul 2024 12:28:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51F0D42E50; Wed, 3 Jul 2024 12:27:37 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011035.outbound.protection.outlook.com [52.101.65.35]) by mails.dpdk.org (Postfix) with ESMTP id 7111542E1C for ; Wed, 3 Jul 2024 12:27:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W2QnD/RuwJgs9/EW8W0UeXFgcbzk54Y/WUh24PpZ1mSncogbF3lUEmLu5RmPISpiAZns8F8lgFi4+5BlcsMp8CaiI62RVRAruuXeJgDh0xS6Dq+wpELmhUHx6OGQoB9uSUhz/CyVgrSh0TZyC9M1ku1Au2lVftptVKOXeU6HuIjKGJtK22fyCo/4CsItSJW0Ftgyoh7Uwu41KX0z03QgdhpZkHGDxJteIz9xAgutra80j0N7To4GxVN29zOVapynt+rC+JDD24BMDPusyG3A4aq0wB3LRyboc/pn+12L7zeglnaJR7K/xzOcqiNNdkmPq/UOHa1vHdLsfXRbfWK/MQ== 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=ARe9GZ7AKUSQ0ekREZPXHMBO2QTLn/u7DSxDfehikXU=; b=JFaj3JSC0g+OnL5dMek3+179XUrQlf7QLaWgygSi6WyAJaBDwue1OLQHLHW036V2JSg1PvYsIEI5lS1UOzkS687F7aJWaWXGeBfGTJgApXFtmr1H4sQYW6+Addok6A0vyE73YK8y0Ixi6i66jOK0EKltjfQFQdPWPt/Gq+PmfNwkf2RRWSatclyVGFBDm9oLzDLHx4+KCIw77EPGVH/nGhLLTLeLnZ5gZh3RkuhDQn2gnsLnscgN3zBe3EL2kQdIOOScWApvra9A0Zb8gficBj00WYUXG0opznO39nUqqnqsWnAxH2ILcjiQJ12uwZc6YtTTtyPImlpewy7CW/Ltkg== 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=ARe9GZ7AKUSQ0ekREZPXHMBO2QTLn/u7DSxDfehikXU=; b=T5m1TIXsXMBRL1fiIfwzFXqjKW3o9qnJ+bi4ysR0zGcMZgFcPhMXcvXfZM0GtXIrT/EnlgRhDThArbZFvDeRHdYg4NEx2NQuFDt4cwuaGYvo0b2++Uox2ab4/tghI8ieqDKfxmlVuHkbuYCGpmZv7tRbJ9oJE5Zttf3T+sQJMuo= 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 PA2PR04MB10238.eurprd04.prod.outlook.com (2603:10a6:102:404::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.25; Wed, 3 Jul 2024 10:27:34 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:34 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal Subject: [PATCH 10/11] crypto/dpaa2_sec: initialize esp sequence number Date: Wed, 3 Jul 2024 15:56:48 +0530 Message-Id: <20240703102649.3096530-11-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|PA2PR04MB10238:EE_ X-MS-Office365-Filtering-Correlation-Id: 48e98fc2-6523-4074-b6fd-08dc9b4ac09f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: QY6EVvzTO0RI3Eo47ouMH0UVAd3QARIwMsljQkyLmO5f8jY7r8KSrRbFEC0jFQ3llj3rU6CBVVheXA1p8yifNL9N/sMzXHfHtAYxhkZ0MqDUc7sV7yARnlH50Ejhhb3BtE5NCM6PWqja2m/i2lwGD0x1A7TenGhQlCZVeKR+tvv5/Z6lhQvAPR0NqAXL6/x1stDu05ypiUjgUs5hV+Od2aahSUDqlp51WUJVU0+PcACSOcGdeapSokczTFeHRcKRfd9u6zyPcRLy4Lyd/r5xKU+bcqYEjcaKirTeeaQwgTHJESErNuwr6ZcsZ3ZNIUxHSD70Q+PP/0g979xa6EeYn5I1fuyb5b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Hw2Fb8nL92SK4KZVA== 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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3YHDeVPX8MBXekpvaNsBvS2YqI56G8YtZ/vmaQu5DbZNRGr89LVZ7emeDUx0ZjSiERaN9KJse1Oz/0FJhdqSe7RT1n7fhHeYlGlL5Cps/ekgerMpQSCEV4w8h4TOqZjZRDQZ7i1b2Cx29DSF6if9A5bup4lLur82/nF5YnJn3HJKrKSpBpqE8qLbHSOg0waHM4O8coxdFlrjQM/z6aj1Aj/F0cmGzHERCLg/ZOqZd7qDJLK0feivYu7/P9Z0mQd35uDvu3d3DgsE5MUDaVhr+hs5i5r7HwNLCSgm7ZdbqTyxOpNqB4zjQ5N2kFwrWdeS5KVJM8ZvAVKK0xjCRt0Ln8ChI731TmHeSav060rWSoYvFHaymRC27tMA3LXW8YuqP7yCwGkfz8WWjatUohCNyMdr8S4nvfa6GJCrWyAc3vQXlnANfRhrdcuOPv4XaYvvp9737QisRPsIOD2xFh+67LAOI/Fx8VT45nJgs2bJ0fPLk39MKAHkeeNkMv8uBtnk0VSxM8mHk8j0ewr6vYx13Y5IKWpGhKJXb64fXCsFcIujIsZ5XkhawShSkpk9ZwDdREZw2Z7+Ggf6uVjW+jr86uVYoCgr+X9lN67/E7Z8xyIbkYiasOc0MJ2u2Fi3gkfPAZmz8lWLKFcrt+gPzj6C+clOG6MwchK2V3F6n50tCDR7ImwsndOOy9a2ozikOFTiUQNs4JBHew4pX4/xSg29pZgiTBWVVOuZYiqMoBpRLpYgjlsT/9klIRWndbTHyUUO/hVGDiyKTiViroffGdIsRe/nCeGGESBH2JpqB29/VWUD0YCeKUuhfth+I2NlVWn/uPTCdp3tGKVEoG5bPBD/RvS617gW40Kgz+yPGysA58VYrTVojMz2jCyw3LxEBMvOdVC9l33bLhiPnfuiK3UtBb8WoKy6W+z+WPpNX/zwJ+GOjaR2HSvtneJu3scCmvNW4ONtzRf/pQW+tnCplo1udr0fZZUvIqP2JRAtirMeczecFSZ5sJim0aoNIoYGIbOP2gsOreYAsocBa4MKbZ8R2RFSRgXT1m3Z8H97WgdpTwiddFBEnXxuvIu7BmjRJGQakcq6VoHqF2yIZMvCn3Bj8yAoH72+bwjRgPD5g1aXTC4VmgKttsIUtXuFNPsfEvHdzm3T0JDzaHCwNKK4W4FQGCpX99yOxr//AoaOwLsrfLM7ioPr/qzUpqh7z9mMtmkM3htLcpx6TMMVPCz6mdj4ALOvq+B9Mj4/MG/zpS4CtGt9D+gIAkSE2Cf/lq7QL8ZeAA/Q7V8FjAlB3ngH6HXeu1iHGn01oO/Yg8bYQN3ekQkVxwEZA1/TqPo+LSRRHJ301G6HwYKXUiUbSkl48WoJZRAi4Hg4NTmbFLLxdoOZlw07oS6nqa223KpsCVSlfkRPZy53uq9vyir/Q+pxCIAJNQoAl2xWrsisRPK2+8EPIRlcT3MY8UTeptR8VyB7kiIJSQsfclGUo7GR+SNkGa12xPaIkb6fCdqQLMQ0NbtQ/lMhhKRYaziASV1Xk+AGswbmPpwaqlNxE4kmctU3NjsEgzaRTYRe4S0qUyV3rA1sV785mWHIVUaQ2nhCVHEc2I+U X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48e98fc2-6523-4074-b6fd-08dc9b4ac09f X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:34.4315 (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: Ffu18f86DrEGUyNiH9DBOjX+FuFVl4QSSoLRxQMtEpjlrDY0+DIaYsBoI5ofbzDE X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10238 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 Initialize the sequence number of ESP to 1. Signed-off-by: Gagandeep Singh --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index e115007cfd..eed66d721f 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3143,6 +3143,11 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev, if (ipsec_xform->options.iv_gen_disable == 0) encap_pdb.options |= PDBOPTS_ESP_IVSRC; + /* Initializing the sequence number to 1, Security + * engine will choose this sequence number for first packet + * Refer: RFC4303 section: 3.3.3.Sequence Number Generation + */ + encap_pdb.seq_num = 1; if (ipsec_xform->options.esn) { encap_pdb.options |= PDBOPTS_ESP_ESN; encap_pdb.seq_num_ext_hi = conf->ipsec.esn.hi; From patchwork Wed Jul 3 10:26:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 142073 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 190B94555B; Wed, 3 Jul 2024 12:28:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDDAF427E7; Wed, 3 Jul 2024 12:27:40 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2042.outbound.protection.outlook.com [40.107.20.42]) by mails.dpdk.org (Postfix) with ESMTP id C24AC42E51; Wed, 3 Jul 2024 12:27:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FCBwAhmqzy09vuWITvkTnx5+e6b90hCdFl5E7lNj0f/NHEsYg65weopvvHTKKZzS2mCdlp0w4gfK35RWgHX/TGxAUIZX++moMrjEgMhfh63orGrPHIEAHlbBe/NX42mkuC7FECZZ0mAwcyWRv5yLRTciiYw/i1ZaBS4WBXljsBrdpctH4+kFvLCf9N9SIY/N+wUdibDQJt019Tm+sn43n2TaGypR0LlPuFYfgDlBFCW/1tHDXnq0i4OeFc9Xy+K8nwSIiUXzcsnOlQIK5ab9nHHrmM3LGLKqXwo+BEq//xW6AeVlmk57KtUKYkgSG3ryrMgF5QDlqxScDBSSA6hvwA== 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=QXhoMO90NKBXWna/cGVsxCENdlaAllzWay4di4HsQUU=; b=XCgryQpxtiN9Ljqs4Pv3EJn6ClJeRbm+8LGAckMk3BKWrmEtTAtZvXXpjix5nG8mnol7YWVDM0PdsaS+sR5M2HrcPlWk4CXH7xruAGZ34CPki45NkVz8gcg527g4FByJKrzF9VwK4z9lHvLHIyPi8Rb/hTfQfYz0EB3S8B8//muLZK2begPHTJ0d/MnuZjP4ZaPsBEOYn7AQ+lTeCnaOQ3mxPDyvbWzUSSkX/reR7M3mEqmI4SxA+elloDYU3Jv5WpYCCyExrF0fD0atAIG9aY8v6UO0MsXSkjvcZ1kmIWbkVm6scVQHWjWmWDHcUUQ063DjE9pI8/ckefu+/Jbdag== 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=QXhoMO90NKBXWna/cGVsxCENdlaAllzWay4di4HsQUU=; b=sGoNSDtgliLtuuZ7mUJVDpRYAwDz0VE5TX8IFMz/ZgWk+Ui5JamQipt1SybxMoxIKjiqaaFw40livmWQJa56ROLfxT+464Dj86mF2zQ+P8zm9+1fuVOuiAqvYU+5JNdV6u2ASx/VbAnABA658GIEeJ3mvsCgIKXztzYyAp/ZQh4= 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 VI2PR04MB11001.eurprd04.prod.outlook.com (2603:10a6:800:27d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.34; Wed, 3 Jul 2024 10:27:37 +0000 Received: from AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325]) by AS8SPR01MB0024.eurprd04.prod.outlook.com ([fe80::c634:479e:8f8a:a325%4]) with mapi id 15.20.7741.017; Wed, 3 Jul 2024 10:27:37 +0000 From: Gagandeep Singh To: dev@dpdk.org, Hemant Agrawal , Akhil Goyal , Ashish Jain Cc: Jun Yang , stable@dpdk.org Subject: [PATCH 11/11] crypto/dpaa2_sec: fix issue of user ctxt for Event queue Date: Wed, 3 Jul 2024 15:56:49 +0530 Message-Id: <20240703102649.3096530-12-g.singh@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240703102649.3096530-1-g.singh@nxp.com> References: <20240703102649.3096530-1-g.singh@nxp.com> X-ClientProxiedBy: SGBP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::22) To AS8SPR01MB0024.eurprd04.prod.outlook.com (2603:10a6:20b:3d0::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8SPR01MB0024:EE_|VI2PR04MB11001:EE_ X-MS-Office365-Filtering-Correlation-Id: 8072c28f-ff5d-4e89-02d3-08dc9b4ac227 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: eL87xVVTgy+ufM2ZCXIY1sNwiyLodVZ06CGI1ey0/8DxxLe+DW1YL8Wkj207XHz8z49ucNiEWHjoEd8EHOygh47xVi0VWcJeQ4iatbeo3ONGbwoA4LRIz0GAS/ZP+Cci72cyPdFgiGeRUAE0IZZ8n4bo4MxttBy/yR1zFQ/nc3/qZy5UgxCWcdT0CEi2zCXf4Dqhib7dJ9q4MREGFNV4i3qQqGB0oUCbxogqTFo2dK1PpEY1n7qLlrNgaiMZV5QPes/Ul4VZ+j+QSqUaVb3PH1IIcUVsVuZkdXYTYwwxb2DSItbUwh6yiyDXgJcMD3IqxiNxMuLqgth0yzHHVykVWt+Ho3gpcW4kFlmdWxdYY0Zjfc2NhqruD5/i/VFLc4jIXkblMLe+NBH3xv9lKfcs9bFXyVs/oCd5AyB9oSPJAax/WjT9jwJdDcCcEes0MDEUiWbXT9vjVNNStaweG62cb6hG0b0tXsMERlA6Kg0GJ1MoZhVYIDi5dgghKNszuZ3kXydlK1yt7kn0ZKlItoHtyM+KxNMb5SARIPEFvjsqYAT4eSKBucTQs/9RpVYRfS07ktZD+Dc3tfCdNX3jfHGpwRtqlWOFgmZpvpb0VlTR2cb+0KmTYNrAcu2kdzetVq9jkRxlUdtZuA6tr7bLwBGMcBezEIebbaxHPcqxUOG/FCkX8h982HyNHphKTEzCB0rJ/H3+zFnI5cGaBsDNndi35YvOHEtMB3ipv/nsuut/N/Dv+EtynuhqlX7TpyZM/gKF207QrC9/PfifI646/u48F6wQP869c3yFwXP0CQX3W87WAyRlrVVLGpIp4IWP0LfUSeJutJnSWqVdT5eKDpgbUTdEw/Zk/IydaNLEnWUB8DKWo6iAFevnmv6PfYbbEcAOj9ZY6GbTHa6j9nKxQlvM9qZNXbytGrXNQ/5FtKMRmz1Moe9dtD+gwWUGSOXoOP7Uk6pZrQKrW7DU3w6DeeRkdT/4xEwxIe1Lhpfs0GX51zsIRiR0tHJz9e2r9KkCLXCREquXQvANAlEPPGKTrdAxi4NsmE8k+5XldkC6U1UX46bwJJMjdwaNHVvc6uW7WYnCEAuqlofsGvv16TAE6COuWnyqB+oc5diQqH5ExE/qQIGnRQfxY5nnGcSemiUUaW6Jp0kImt8GiHsN+0lOyK2+fIY7rS5LiCmMf2kNnj0Au+zk32AOKqfHW5Iv3AAvgaXn/z1A73/IRzVARD5CD/In+WJGw/gxXbNAYZYqnNuvodz0CzcAGdm+egQ+ZnBb3KMysHalc8IUJt98iEzO78qsLG7VO2q7vPX2aifeVqAh1lLJzPTW82xv0QQKy0cHk/Zj+QXe2NKe4hTZ0GBe917/39G0w2GLpgM/sKw/e/zdAJY2Edh+5QjByA4+zrKvIBsByGWjyEx87MDofVwTrJbYhg== 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: 7X5b5MgTiXjY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Y92D+p8yVghDtRWFdHMX8PpbVqwGPi0I96oHbLfTnu90P4/VWNlQU+U6J50syyD4xKvLbpkaIt583lPck3Ko/gQiEa9UXapj/w6TdEiGWl15X25e1SwojTFxQQUI/OVqWVUS21tP0XTTC3+bMxOZx9p4Pou80b2Xl7+RPoxltv0M1wYFeBJCLlIsuyCvpg98vJB9CMxFZuMTGNnkVCzF4O0x8yQLgEJ7Sa8Fvhjg8I5ksorKdMdmn9Beks4cF3HoNALZl6/zRZsVPw/gILA56/lgNniCPMGr3ptQuja4jA9ADg1Xa6rmsQPHYr4kDoY1zgnBrWSCFs0+0o1fH0NFLnXmxwOjnn7PCapcID6bIrFDVduaJR2dWNboENDb3woBNZQWNghWWalOy2FQZkZ17nEEgUeptG7/5dvNsHgZrCtHFQBIUoBB966NUFcM0rDx0H1hkuiymt/n4XlA0haRS13+cHqLwObxUqsGt9gLz5qM8IbLYDeOowzworCPUoAH3CE4JOT7/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8072c28f-ff5d-4e89-02d3-08dc9b4ac227 X-MS-Exchange-CrossTenant-AuthSource: AS8SPR01MB0024.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 10:27:36.9890 (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: eNnNZqPM9woWT8i5Y83fpWaGPekAOsu56YMhnV91QF27xpmMpkyN+5WU6OzYZ6jL X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB11001 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 Context configured should be aligned with context got in dq process. Here the rx_vq is just the first element of qp which covers the issue. Fixes: bffc7d561c81 ("crypto/dpaa2_sec: support event crypto adapter") Cc: stable@dpdk.org Signed-off-by: Jun Yang --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index eed66d721f..b35bba3bdd 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -4103,7 +4103,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev, cfg.dest_cfg.priority = priority; cfg.options |= DPSECI_QUEUE_OPT_USER_CTX; - cfg.user_ctx = (size_t)(qp); + cfg.user_ctx = (size_t)(&qp->rx_vq); if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) { cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION; cfg.order_preservation_en = 1;