From patchwork Sat Apr 30 04:59:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vamsi Krishna Attunuru X-Patchwork-Id: 110538 X-Patchwork-Delegate: jerinj@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 94E51A0505; Sat, 30 Apr 2022 07:00:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 362BA4069D; Sat, 30 Apr 2022 07:00:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 645734014F for ; Sat, 30 Apr 2022 07:00:29 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.16.1.2) with ESMTP id 23U2qu40005074 for ; Fri, 29 Apr 2022 22:00:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=p4qj5P7vO8rzv8yemYph9mAD/sAP55hPPk6dk/yZOkE=; b=CyALJGFN7uG8uKOr2KwC8nXntQ9i4kgmIORmXEa01lsHn1XPor5KYC2dZTbbj8ij9RoA Hi50wdKJSNhClibgXJ6qE0iUgP/WB+7E6T17JdW+0tOg+Y1j+DXXzbezbpXWTbuvaqNp 8pO5HJPmTbbyFacykDnG2U+vzVInb4gaA9aNeU3Enx+3FuSodF6aUD5tavWDDOE9hgC4 cnMBgAb9NLqYsWNrsiJc8E4jp2n6O7r3Gx3m4yRCAb6yBsVY+cY1Mp1MY++JLxa1C9bY ICZQnKEPHm6tna5T9oosamHWFgnc9V00GFzhGT+U7afhke05nFnlExFhinyqmQNQUczv zA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3frvqf86my-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 29 Apr 2022 22:00:28 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 29 Apr 2022 22:00:26 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 29 Apr 2022 22:00:26 -0700 Received: from localhost.localdomain (unknown [10.28.48.51]) by maili.marvell.com (Postfix) with ESMTP id 77B8B3F7070; Fri, 29 Apr 2022 22:00:25 -0700 (PDT) From: Vamsi Attunuru To: CC: , Subject: [PATCH 1/1] net/cnxk: enable 3des-cbc capability Date: Sat, 30 Apr 2022 10:29:55 +0530 Message-ID: <20220430045955.1875892-1-vattunuru@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: XHixrOJJTCE52xKVAqaEbjx3nwQq2BiU X-Proofpoint-ORIG-GUID: XHixrOJJTCE52xKVAqaEbjx3nwQq2BiU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-30_01,2022-04-28_01,2022-02-23_01 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 Patch enables 3DES-CBC capability of inline crypto device. Signed-off-by: Vamsi Attunuru Acked-by: Jerin Jacob --- drivers/common/cnxk/cnxk_security.c | 3 +++ drivers/net/cnxk/cn10k_ethdev_sec.c | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c index ec808c0033..8ea0aea7c2 100644 --- a/drivers/common/cnxk/cnxk_security.c +++ b/drivers/common/cnxk/cnxk_security.c @@ -129,6 +129,9 @@ ot_ipsec_sa_common_param_fill(union roc_ot_ipsec_sa_word2 *w2, case RTE_CRYPTO_CIPHER_AES_CTR: w2->s.enc_type = ROC_IE_OT_SA_ENC_AES_CTR; break; + case RTE_CRYPTO_CIPHER_3DES_CBC: + w2->s.enc_type = ROC_IE_OT_SA_ENC_3DES_CBC; + break; default: return -ENOTSUP; } diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c index 87bb691ab4..d0463b3622 100644 --- a/drivers/net/cnxk/cn10k_ethdev_sec.c +++ b/drivers/net/cnxk/cn10k_ethdev_sec.c @@ -62,6 +62,26 @@ static struct rte_cryptodev_capabilities cn10k_eth_sec_crypto_caps[] = { }, } }, } }, + { /* 3DES CBC */ + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, + {.sym = { + .xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER, + {.cipher = { + .algo = RTE_CRYPTO_CIPHER_3DES_CBC, + .block_size = 8, + .key_size = { + .min = 24, + .max = 24, + .increment = 0 + }, + .iv_size = { + .min = 8, + .max = 16, + .increment = 8 + } + }, } + }, } + }, { /* SHA1 HMAC */ .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, {.sym = {