From patchwork Wed Sep 8 06:59:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 507900 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp334851jai; Wed, 8 Sep 2021 00:04:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrS5agI9kyRBXnQGGDV7/LM4yvd6MwpY8jUGJvUpZAdo388CXPjbPc4qbkWlTVcelmfQp/ X-Received: by 2002:aa7:cf82:: with SMTP id z2mr2293687edx.254.1631084642754; Wed, 08 Sep 2021 00:04:02 -0700 (PDT) Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id di4si1403717ejc.505.2021.09.08.00.04.02; Wed, 08 Sep 2021 00:04:02 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector2 header.b=oZFevfux; arc=fail (signature failed); spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D2B64003E; Wed, 8 Sep 2021 09:04:02 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60070.outbound.protection.outlook.com [40.107.6.70]) by mails.dpdk.org (Postfix) with ESMTP id 00FAA4003C for ; Wed, 8 Sep 2021 09:04:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D79qZ00XimtCeOoP9Gd5vtEkGVTwYJwyqvQqAMOxvl21xCE7rSBfQ5pVCjnglZm84gfA+KwrvmjK28EwIDohlsMLDpvuDOdkoJr84FCTmyBvVSH5vz9DzYU1MLrMdCgTNyV5UM5vIWxJymqPr3o0IVFLk6DEpLjzF7Vv1BXjlz+lv1RezxaPA/PYjnC2kSku2aN7q+fgidsMRiaIv4uHWCIjpWjxrYC9uP/1wi+MTm062ElOtn1XYLapMtmYhAsLL79cJtHSZ38h8AVAOp9HuMxGdpR/y9KKYpM59lreiLUkXS4wQjavlK09Cfn09jPhuFiH8eXkNeH9oWMHDeB9+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=10gdtS94yVcrg9wJnrkev88ZZBCwFK65gIprnf4EQkA=; b=WG3KotUTx8Uk9cae1o5pyb+gjummCM4M46/BzohSrfuA7+4uNuAgdHSEhHVVC7jKdtcJ07/XARAL6lnTvbPi3Fef3RN8HQhwwyB27llkOaEh9UBBetWx7aPfrtXYc3PkcaZIZTDZ0+tnb1kZ6xLADedbhz8Zl9mGmZma1ChcP4BJLzrpwei+J9x9t4eV67NRbfJlviIbA93yx2pAGogj+79ZhfJtP84UZoBbcWV/MtGPw6QR9CnPYy5W4uYiyL95ZcVEcKhCUVKckDLZJN5+oHMmTkX1Bj8h2mhkcavVbHGdfdX4hbjgiN6tw6bZ1MzF30bFL7mnoAr2vVtTHCXsCw== 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=10gdtS94yVcrg9wJnrkev88ZZBCwFK65gIprnf4EQkA=; b=oZFevfuxctbVVuxsjVglUjTYaQX28yOaVP4H6uLPf+tiU6DcWWQMVGwT9wgcDT09rMyfcTR91irN4OkHHxOD4/x96Thb9oShcxZKS8fXF72KdyTvsSZCu3AtXTTw7FXQ9aL9rPNvwtD3Qp6/KXbe1GqkzM4PBgCxmukH/CAz4bk= 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 DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Wed, 8 Sep 2021 07:04:00 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::945d:e362:712d:1b80%4]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 07:04:00 +0000 From: Hemant Agrawal To: dev@dpdk.org, gakhil@marvell.com Cc: Gagandeep Singh Date: Wed, 8 Sep 2021 12:29:44 +0530 Message-Id: <20210908065953.28349-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210907083953.8948-1-hemant.agrawal@nxp.com> References: <20210907083953.8948-1-hemant.agrawal@nxp.com> X-ClientProxiedBy: SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) 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 SG2PR01CA0087.apcprd01.prod.exchangelabs.com (2603:1096:3:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Wed, 8 Sep 2021 07:03:59 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72e5004c-60eb-45ba-27ca-08d97296d592 X-MS-TrafficTypeDiagnostic: DU2PR04MB8903: 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: jUW/SKWXzy43ykx8Cgnt+2CdRYWUnYZWet+gtNFvfTdhBApy5HJH2u3nRV4M4bmP3YDvo34+gRKl6zEFH0NMGVT3PvbsBNCa4tl/OR+4iIhMEV7D5CwjmLOfaLqPZIVdKm2PN1J3AVnEy84tIV8qcQmZPgwwhGXOmHr6AWJVmENknUihE/Ojvp/NyTP6lCrttwaEDz8Ta0U7Vvqv4JtzYG4yQdqcZQp/vWim2Ql9vqj/KJXOMHn35mO5ye76/aDO/W2Uf5tlvjAY/vdwyvqc/JJ0bZTurfbEBHjPxOwOz7U4Gg56Q1HuNZC4ss27IAPDx6O3TzBHznqaOL8llNQ8gggpZiS4Ro5iuC16H2digNa5KFiXpWasLKUCDdylwVs9vml/DxN0kffzoewtyl8uSTE2GqGiNHMgWEstCMQGlsoh6b62ioQ1yX2ZY+XeJOXwgZsI1ycWjv+MZ0SGyDZWNBfLbt4RBstnxteMimn3ElPxX+kGBk2tf/SxjIpNKaGvGqgDHw4nA2F18pPJ/LxgxIBDrnuXjeJf5dcpU/x5hMX86ysKHp3a7Lc/4Tf5E7CfCqcvIxJiMIR5i2uZe1tvfT0JrIZ/1ARw3Z551teUzKl8iuM29UsPxSzadFPsUr7KKdMgQ9IGxhtBYGQXyLnpayPHseBFmJu/S+i4p87NGbRpr+ZfXseFg70Ikz3TdnO30fJSKNw+z0GZRhBLxjlpKg== 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)(366004)(136003)(396003)(39860400002)(346002)(376002)(52116002)(38100700002)(956004)(478600001)(83380400001)(86362001)(5660300002)(38350700002)(6666004)(6486002)(316002)(1076003)(2906002)(4326008)(44832011)(6512007)(6506007)(2616005)(36756003)(8936002)(66946007)(66556008)(186003)(66476007)(26005)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /xFQrLa0TZpu/OE6vG/3vfX2oLHHcYh4thEU3LFYfCLWOTeIxQhlUCo1Aj/lXXo5smZBn4paUiX8X+WH89hbVvdsK1N2xMCuHkiiVJax1ypfnuGMNIJkH3Az/HD61lD7ey2PqIvIBjYK7ze9CHio88DQwpV/bwvO8Ai1icDKMYycWywdacyPZIdvIYonQbORKTEuP5D0APOG2TYDQE32FhysRGBnfxeyC9P7HG5Dnu5Bh6m7D5mvR6HEMIpao2W1P+dNNhdGXGWEkn2n7l+RJCd8AqqrE7LWu2XEbt3oJqq8BDfIwiqAJgTkQKisQfoQCXPyOs+Axf8HGSdEWfk6vqHzCwJUCAJAa3r0uP441/gM//efOhk0cnV+n18ZW4MxGslRxfDW+L8rpGTVlR/jA+YHp5Zd2v3kqkiamrzT0WQ6JX2BK8AQ+zN465yARIvNcAXUVBdIg4QuwWrZtK9h8NbfoDJF9Tmdqtzy6p4wPiTrpUnQgcZvty71QrKEHLJltymp17rpt8Yfjp8eQfDCi9IxUNO9zj4XplXNjnRCarr1LFgimG0JYP2cXW1F96X+Pz13HwAvbH2Qa5PuMN9rWqW/aOtQvqrQ4vbi+NXlH/c5Hhoz6erIRWg3dV+gBWAPS2bHhdq0A7pq/wiuikquus+XYVQPfm47S4r1F3wlwITAIg4wNpARFi635CkhLnPTFBd90+YlZX+dAiyYycWiPSHNa2Tmb30dtBNKpb6HvLK19TPVJ3anhkqp+VRZIW43ikTqd7LlehtAkCOsgr95y0AA6JS1m62aAnVSsktqMeap16reCOPyPaHqt2b2GWoNInrL/GaU36TI995ukiFvxO3NgKdiXgzYnZzVIp2GenqTJCz9DpJG7WVX91GO2o7iD6XUOAJEEyav1H0EMIAidf9d6taWneqZHYuBUPHcbRgIFNJ1eQDnsq645ucbC1AvTY+PUsmQQwCUr9eccCt6jkjMJ4LjXRlSy4c9OFw/gO3SqgUK6v7b+K8NoVR1QE/vP7s4TUTDNGkPzD0pxW1rZBC7X/qrTxSD1fj0eeHcWdxvDvRZ2NQySntHzeMKfsMdXKkTs3EldZqfjpbl4NTKGkIfHPaDv4T3OM3ZCf1H5WX/ej/wwu3DgB1OKSBkjL2VJuzdwWKJ0wttnf3oJa+n6teZqWXbb8tOE5tFGfjm+O6l028ycjS/VVf7ZZwyL8n6AJcBKmeK6vEXy4F44DerIAwqcTcqooEnqpCsfALGY7uoWNojpLd/Im7BMZQNpSfnwT2c2a5Xg6U1237bCUtV6Qzq2DRib00CwGYvfQWy6/5gYGd2UrUTp/j4ENBKunii X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72e5004c-60eb-45ba-27ca-08d97296d592 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2021 07:04:00.6209 (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: 5aPoSD0DmQmaeRXwuEYU+blUEfzmBtdN/fHPAB72kMk+N1LsF6fFxTJ8OTuma3S3OyTDJ+Yg4PRJhpTeJxm6Og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Subject: [dpdk-dev] [PATCH v4 01/10] 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 + doc/guides/rel_notes/release_21_11.rst | 3 +++ drivers/crypto/dpaa_sec/dpaa_sec.c | 13 +++++++++++++ drivers/crypto/dpaa_sec/dpaa_sec.h | 20 ++++++++++++++++++++ 4 files changed, 37 insertions(+) -- 2.17.1 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/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 411fa9530a..4aa16d6915 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -73,6 +73,9 @@ New Features * Added event crypto adapter OP_FORWARD mode support. +* **Updated NXP dpaa_sec crypto PMD.** + + * Added DES-CBC algo support Removed Items ------------- diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 19d4684e24..af5c7c499c 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -454,6 +454,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( @@ -2043,6 +2044,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; @@ -2218,6 +2223,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; @@ -2667,6 +2676,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 368699678b..216e8c8b6f 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -456,6 +456,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 = {