From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82528A0C53; Wed, 25 Aug 2021 10:22:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B918411CF; Wed, 25 Aug 2021 10:22:16 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20084.outbound.protection.outlook.com [40.107.2.84]) by mails.dpdk.org (Postfix) with ESMTP id EFB3740041 for ; Wed, 25 Aug 2021 10:22:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f8Os8SOIfzX82gynAc6bnztiqddIhmFP8QpTWEgG0/kdzIIUYgW6XUwoAs/cmz6GSUQXPvJQ6JYcQAWtV55I+46h9IAhRJA4U1PKMmxsZDMVFHOxnSLuPgl9WdgTbY+vUQyLLyAiaHEAMh+kByxa6FMbG1pjfae2+FxVSje6UziZV0LGWWG+zPdQ4OSowZgiKN+b+E7+VFLmIOTtK5Mzgt1SzcpMmTng+uLK2erjmD1KSRQ7vgkFjTIUGZFL0lG5Gk7YnuMXFqr+MoR37YQGsDihjAJqlAdOpNRTZYXBVRdHtt3vBLCkw+qsS2b6KRz+kNZan3F7+ZnYsPM4kYYmIg== 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-SenderADCheck; bh=b/UZnT8J2HmsjETj4Dq6CkcWTMQaOvjpqObUQkMb2mw=; b=FVYP1O4EjMLV5oamL3KacJ7zJ5zY0QrC6LdJXYcbcOLhIyOOIDYiauNnZEFVG7Ak9umRdsE8SG2bNBSlDHoewThQiBu+a3wu/I6Uf29j+75TpjvAyO2B0KMAnR1d6ucC/SSfvgHG59oARyK5A1Iz5xW0BneERJ88dQPTxScukGlKHXbYo7Sl3cvDBvQdigiI+7wMTzoN03Mo3dmGucjIcHXe0zgh8CeIlvgfVNT1VFzI43ZNyB0dz8lrCr10lj9Ye/2aw0mFNUesYXcr7FQnufDVB8iGLCzp4DehskIF2yrzAsNvggrfYMR1Ymvqw0gztztmY5cFRkdb/ERHdDndoQ== 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=b/UZnT8J2HmsjETj4Dq6CkcWTMQaOvjpqObUQkMb2mw=; b=R1S9NScnT7gXeoe7xsmiexK6ku9sMb23igQJbw1sRwZdLLEq9C7IQHM+TufABqj0Yurzm8AS2Kov6SR+LtiV4bywpA7d5rr/irgaJRR9wspBdslOtlFqKuujbHJofDywU3jZqLPjyacDjW02EmbyYqsh7eO4K9r45sIotQffWJY= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by DU2PR04MB8584.eurprd04.prod.outlook.com (2603:10a6:10:2db::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17; Wed, 25 Aug 2021 08:22:13 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::2590:514a:df1f:a793%8]) with mapi id 15.20.4436.025; Wed, 25 Aug 2021 08:22:13 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh Date: Wed, 25 Aug 2021 13:48:28 +0530 Message-Id: <20210825081837.23830-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210825081837.23830-1-hemant.agrawal@nxp.com> References: <20210721073920.21893-1-hemant.agrawal@nxp.com> <20210825081837.23830-1-hemant.agrawal@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0106.apcprd02.prod.outlook.com (2603:1096:4:92::22) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from dpdk-xeon.ap.freescale.net (92.120.0.67) by SG2PR02CA0106.apcprd02.prod.outlook.com (2603:1096:4:92::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17 via Frontend Transport; Wed, 25 Aug 2021 08:22:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 947f1df0-c351-4232-73f3-08d967a17093 X-MS-TrafficTypeDiagnostic: DU2PR04MB8584: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:229; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YffYroKvPzZcncHC/oy17+xOnPuI8LlqR6KaDUBqGMzsuMqahR8Lk4bguOsw4IUfEQQoRDxjzeqTfY9M1FINpJ0wWe6iwhSty2KYByh3Y9cfZeiws8/exgN8xJH6/gWE8Hou1paucxSQ+acSji5RI5J6MdiWGnjQ1b+OguVwDggFJ0nXaxThQNMZheodY1R4gpQUIQVxs5R8/9HjErSp6SzgM1Qds4c+YjRlPG+DyytC0tD5Hiwh1cTC6nHTsxkc5xlUkxfjwSw/8/Z71u5yV3BCerAXrus9PqLYjAWIsZlwngQ+OxqRo5W/WMwH+ua1+bowqJj991pFw+H83DTj6FPkt8kslFGl1dVq/p21134ps2NwN6xdo2dzy5D/1SYz3/mNbpln9uU0ezFlgILD1XEcZ7JZkWDHrhAoCE/WLb3xl01+WGH19K4ffqM7ctYbZDh6j93IJ3wKgvV6pK/ZvWCYOuXDIJEMM3Q87+/i8NWZKmF3CpGV1TZaWgMxPKolp9LvlJB8WAATJ+xMk/oc75TGnuyMRuHn0eFmKFYvDwijBACSNAYkD+dfKx1mVVkuj71FGjAGqXKd4e2iSSoyshEu/8jFxZuHa8601NupFaYyLkxRiTHnk0eEkIqbU21zvOgpkWXPLWmzQPQRRdc0upf5vKAn4tGftB+C8FTudoJJmLnNVrdLPXMXWwNmYsKuzH9g9gzRtkeRe0qZcAJJ2A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(376002)(39860400002)(346002)(396003)(6666004)(66556008)(66476007)(1076003)(26005)(8936002)(186003)(52116002)(6486002)(66946007)(6506007)(316002)(5660300002)(2906002)(44832011)(4326008)(36756003)(956004)(8676002)(478600001)(38100700002)(83380400001)(6512007)(38350700002)(2616005)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SyjkDLOHbR232b60mAW3eT10r8hEs0s4E6x1KNUnoGmBzV4Jw2skA9zy5KW2?= =?us-ascii?Q?ovldfx864zMD+s04n9aAC8rgmkGYpKNp2yY+LPcALeHCX/VW/FLA1ATMLwNG?= =?us-ascii?Q?ow6mwVHNFj0ashRcE13+QrpTg85hvdGSH7oQXtmr6gg/yGserR1MbxYcdiyE?= =?us-ascii?Q?H/m0DVXIyu3Bvwo7jZbuBW0vkBcvjIHTRMghbNX+Kv3aN8pAfO3MfKCV2rla?= =?us-ascii?Q?C93onNcnIT4KQOS72h6zfYh5TA1kWv+LNpiAdOP/rTedlmvpnV9uiBw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hoU/RxVdqrrvam/+wCIS?= =?us-ascii?Q?iQhGQJEEX42IdXKNNE+WvOr12HgPNXsw6FFvbc4P1Kq01QtPRBT9AIZj2quc?= =?us-ascii?Q?Qm88lawuaJYGno49dttfOy0kJtSI79COY6byaIBMIkQDKLP2wY9pA+sed+lh?= =?us-ascii?Q?8VMqNoWpppQJVWL7zPPkJbxa?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 947f1df0-c351-4232-73f3-08d967a17093 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2021 08:22:12.9177 (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: FmA5Btx7DGCjwJPGYGoxgJf2a0deZ9obVLkEVC2ZcnV7c+yyB/MLlwUzbBS85/zRMtjgCzX++H3Kv9uNuh2xdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8584 Subject: [dpdk-dev] [PATCH v2 02/11] crypto/dpaa_sec: support DES-CBC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Gagandeep Singh add DES-CBC support and enable available cipher-only test cases. Signed-off-by: Gagandeep Singh --- doc/guides/cryptodevs/features/dpaa_sec.ini | 1 + drivers/crypto/dpaa_sec/dpaa_sec.c | 13 +++++++++++++ drivers/crypto/dpaa_sec/dpaa_sec.h | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/doc/guides/cryptodevs/features/dpaa_sec.ini b/doc/guides/cryptodevs/features/dpaa_sec.ini index 243f3e1d67..5d0d04d601 100644 --- a/doc/guides/cryptodevs/features/dpaa_sec.ini +++ b/doc/guides/cryptodevs/features/dpaa_sec.ini @@ -24,6 +24,7 @@ AES CBC (256) = Y AES CTR (128) = Y AES CTR (192) = Y AES CTR (256) = Y +DES CBC = Y 3DES CBC = Y SNOW3G UEA2 = Y ZUC EEA3 = Y diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 7534f80195..0a58f4e917 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -451,6 +451,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses) switch (ses->cipher_alg) { case RTE_CRYPTO_CIPHER_AES_CBC: case RTE_CRYPTO_CIPHER_3DES_CBC: + case RTE_CRYPTO_CIPHER_DES_CBC: case RTE_CRYPTO_CIPHER_AES_CTR: case RTE_CRYPTO_CIPHER_3DES_CTR: shared_desc_len = cnstr_shdsc_blkcipher( @@ -2040,6 +2041,10 @@ dpaa_sec_cipher_init(struct rte_cryptodev *dev __rte_unused, session->cipher_key.alg = OP_ALG_ALGSEL_AES; session->cipher_key.algmode = OP_ALG_AAI_CBC; break; + case RTE_CRYPTO_CIPHER_DES_CBC: + session->cipher_key.alg = OP_ALG_ALGSEL_DES; + session->cipher_key.algmode = OP_ALG_AAI_CBC; + break; case RTE_CRYPTO_CIPHER_3DES_CBC: session->cipher_key.alg = OP_ALG_ALGSEL_3DES; session->cipher_key.algmode = OP_ALG_AAI_CBC; @@ -2215,6 +2220,10 @@ dpaa_sec_chain_init(struct rte_cryptodev *dev __rte_unused, session->cipher_key.alg = OP_ALG_ALGSEL_AES; session->cipher_key.algmode = OP_ALG_AAI_CBC; break; + case RTE_CRYPTO_CIPHER_DES_CBC: + session->cipher_key.alg = OP_ALG_ALGSEL_DES; + session->cipher_key.algmode = OP_ALG_AAI_CBC; + break; case RTE_CRYPTO_CIPHER_3DES_CBC: session->cipher_key.alg = OP_ALG_ALGSEL_3DES; session->cipher_key.algmode = OP_ALG_AAI_CBC; @@ -2664,6 +2673,10 @@ dpaa_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform, session->cipher_key.alg = OP_PCL_IPSEC_AES_CBC; session->cipher_key.algmode = OP_ALG_AAI_CBC; break; + case RTE_CRYPTO_CIPHER_DES_CBC: + session->cipher_key.alg = OP_PCL_IPSEC_DES; + session->cipher_key.algmode = OP_ALG_AAI_CBC; + break; case RTE_CRYPTO_CIPHER_3DES_CBC: session->cipher_key.alg = OP_PCL_IPSEC_3DES; session->cipher_key.algmode = OP_ALG_AAI_CBC; diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index 2e0ab93ff0..9685010f3f 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -482,6 +482,26 @@ static const struct rte_cryptodev_capabilities dpaa_sec_capabilities[] = { }, } }, } }, + { /* DES CBC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_DES_CBC, + .block_size = 8, + .key_size = { + .min = 8, + .max = 8, + .increment = 0 + }, + .iv_size = { + .min = 8, + .max = 8, + .increment = 0 + } + }, } + }, } + }, { /* 3DES CBC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = { -- 2.17.1