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 16075A0C40; Fri, 25 Jun 2021 07:58:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B287B410E2; Fri, 25 Jun 2021 07:57:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id DA6BD40E25 for ; Fri, 25 Jun 2021 07:57:58 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15P5nxS4007984; Thu, 24 Jun 2021 22:57:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=shSzJGIN3oed0O5mff4QENaWF13YOvGsUnsvB8B+uRo=; b=cJo0JemTPEyl1mT4TPuS5nY7PE0VG7WjJ5q9P2RyKl0p3uIPeIT/tbfTtY4oaxpoDu3O IS/DQcn0rpyaL8kOOW/y4rIfHRQ8uGkNa/hP8uHxw9TyYPxQgUGxbfMfAkuGPlqCJfVA HziiUciJtvGP90zaJwnwQ1Xw8o+rovrqkce0OHQ1H9K20bg+K6Ipjlkhip5CPeyn/Rm6 puPG2wpi66hdMeN2gUSkvoqRWQKKsmwJHXaMSFlVvxkeyfmIdM9UPiWcgOltN3N9EIbX 0FzMBpVqKuKT11+WzgQ605cnLVOUCW3kFQVpaTwYLcEFC+5+7BpIOLgn/lYH+N7ELkOf HQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 39d24dhk3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 24 Jun 2021 22:57:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 24 Jun 2021 22:57:56 -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; Thu, 24 Jun 2021 22:57:56 -0700 Received: from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218]) by maili.marvell.com (Postfix) with ESMTP id 5BC193F7041; Thu, 24 Jun 2021 22:57:53 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Thomas Monjalon CC: Archana Muniganti , Jerin Jacob , Ankur Dwivedi , Tejasree Kondoj , , Anoob Joseph Date: Fri, 25 Jun 2021 11:26:22 +0530 Message-ID: <1624600591-29841-12-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1624600591-29841-1-git-send-email-anoobj@marvell.com> References: <1624600591-29841-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: uqNrgs-VRXejsynHrzeLuMmRg7QCiHDt X-Proofpoint-ORIG-GUID: uqNrgs-VRXejsynHrzeLuMmRg7QCiHDt X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-25_02:2021-06-24, 2021-06-25 signatures=0 Subject: [dpdk-dev] [PATCH v2 11/20] crypto/cnxk: add chained operation in session 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: Archana Muniganti Add support for chained operations in session. Signed-off-by: Ankur Dwivedi Signed-off-by: Anoob Joseph Signed-off-by: Archana Muniganti Signed-off-by: Tejasree Kondoj --- doc/guides/cryptodevs/features/cn10k.ini | 2 ++ doc/guides/cryptodevs/features/cn9k.ini | 2 ++ drivers/crypto/cnxk/cn10k_cryptodev.c | 4 +++- drivers/crypto/cnxk/cn9k_cryptodev.c | 4 +++- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 14 ++++++++++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/guides/cryptodevs/features/cn10k.ini b/doc/guides/cryptodevs/features/cn10k.ini index 7f433fa..175fbf7 100644 --- a/doc/guides/cryptodevs/features/cn10k.ini +++ b/doc/guides/cryptodevs/features/cn10k.ini @@ -5,8 +5,10 @@ ; [Features] Symmetric crypto = Y +Sym operation chaining = Y HW Accelerated = Y Symmetric sessionless = Y +Digest encrypted = Y ; ; Supported crypto algorithms of 'cn10k' crypto driver. diff --git a/doc/guides/cryptodevs/features/cn9k.ini b/doc/guides/cryptodevs/features/cn9k.ini index 9c9d54d..c22b25c 100644 --- a/doc/guides/cryptodevs/features/cn9k.ini +++ b/doc/guides/cryptodevs/features/cn9k.ini @@ -5,8 +5,10 @@ ; [Features] Symmetric crypto = Y +Sym operation chaining = Y HW Accelerated = Y Symmetric sessionless = Y +Digest encrypted = Y ; ; Supported crypto algorithms of 'cn9k' crypto driver. diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c index 31addc0..8a31290 100644 --- a/drivers/crypto/cnxk/cn10k_cryptodev.c +++ b/drivers/crypto/cnxk/cn10k_cryptodev.c @@ -82,7 +82,9 @@ cn10k_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_HW_ACCELERATED | - RTE_CRYPTODEV_FF_SYM_SESSIONLESS; + RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | + RTE_CRYPTODEV_FF_SYM_SESSIONLESS | + RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED; cn10k_cpt_set_enqdeq_fns(dev); diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c index 7908896..6b5c9e3 100644 --- a/drivers/crypto/cnxk/cn9k_cryptodev.c +++ b/drivers/crypto/cnxk/cn9k_cryptodev.c @@ -80,7 +80,9 @@ cn9k_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO | RTE_CRYPTODEV_FF_HW_ACCELERATED | - RTE_CRYPTODEV_FF_SYM_SESSIONLESS; + RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING | + RTE_CRYPTODEV_FF_SYM_SESSIONLESS | + RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED; cn9k_cpt_set_enqdeq_fns(dev); diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c index acb9f1f..10bb191 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c @@ -469,6 +469,20 @@ sym_session_configure(struct roc_cpt *roc_cpt, int driver_id, case CNXK_CPT_AEAD: ret = fill_sess_aead(xform, sess_priv); break; + case CNXK_CPT_CIPHER_ENC_AUTH_GEN: + case CNXK_CPT_CIPHER_DEC_AUTH_VRFY: + ret = fill_sess_cipher(xform, sess_priv); + if (ret < 0) + break; + ret = fill_sess_auth(xform->next, sess_priv); + break; + case CNXK_CPT_AUTH_VRFY_CIPHER_DEC: + case CNXK_CPT_AUTH_GEN_CIPHER_ENC: + ret = fill_sess_auth(xform, sess_priv); + if (ret < 0) + break; + ret = fill_sess_cipher(xform->next, sess_priv); + break; default: ret = -1; } -- 2.7.4