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 D0FB84263D; Tue, 26 Sep 2023 07:59:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1FBC40A8A; Tue, 26 Sep 2023 07:59:10 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id B671440A8A for ; Tue, 26 Sep 2023 07:59:08 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38PCsuAY032209 for ; Mon, 25 Sep 2023 22:59:08 -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=KVjtbX26p4MQsixchNqsW5UT6umSdUIhWGj24cZ3ZFY=; b=YRjAthOPSVxm4ys1vUOrKT+/H+tpkP5jaQmIcw21FmKM3qpCYPjI+Cc00P7oOp3y5OKt spneFgJacBxjrUriyV80bG0xGLZJYdqs06cZjs7kWMSxXxeF9eLu0vOjLmrEVsDmyWqA x/R8UJr+118trDyQuLxoXDMrfRDkXPNYVuFFBlrtAGxh9QdzfhJ7m4pID2bRb6H2cT9P WtMQGspmIfJe64biy2gg0F3FuIRfzYREFPilPHRMRCSPhJ5QDwRZAnf6HOh5T5wIphCi 27KXDMoP/gA8zfhPB7jwNLBcWpqIc9WqgRXQ2kvnEaw4SLSXKaaHfHnNgC4kDPvmipM7 bw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t9yhkynkt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 25 Sep 2023 22:59:08 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 25 Sep 2023 22:59:06 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 25 Sep 2023 22:59:05 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id E9A2A3F7070; Mon, 25 Sep 2023 22:59:03 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal CC: Anoob Joseph , Aakash Sasidharan , Gowrishankar Muthukrishnan , Vidya Sagar Velumuri , Subject: [PATCH v2 06/15] crypto/cnxk: remove pdcp chain bit from capabilities Date: Tue, 26 Sep 2023 11:28:38 +0530 Message-ID: <20230926055847.2707473-7-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230926055847.2707473-1-ktejasree@marvell.com> References: <20230926055847.2707473-1-ktejasree@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: kNEJUeFOSMh_NV0Cmi7DS2GnV_8f0g53 X-Proofpoint-ORIG-GUID: kNEJUeFOSMh_NV0Cmi7DS2GnV_8f0g53 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-26_04,2023-09-25_01,2023-05-22_02 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 Removing pdcp_chain bit from capabilities as it is supported on all platforms. Signed-off-by: Tejasree Kondoj --- drivers/common/cnxk/hw/cpt.h | 3 +-- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 15 ++++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/common/cnxk/hw/cpt.h b/drivers/common/cnxk/hw/cpt.h index 5e1519e202..96a863322a 100644 --- a/drivers/common/cnxk/hw/cpt.h +++ b/drivers/common/cnxk/hw/cpt.h @@ -76,8 +76,7 @@ union cpt_eng_caps { uint64_t __io reserved_15_20 : 6; uint64_t __io sm3 : 1; uint64_t __io sm4 : 1; - uint64_t __io reserved_23_33 : 11; - uint64_t __io pdcp_chain : 1; + uint64_t __io reserved_23_34 : 12; uint64_t __io sg_ver2 : 1; uint64_t __io reserved_36_63 : 28; }; diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c index 50150d3f06..99bf853234 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c @@ -484,18 +484,13 @@ is_valid_pdcp_cipher_alg(struct rte_crypto_sym_xform *c_xfrm, } static int -cnxk_sess_fill(struct roc_cpt *roc_cpt, struct rte_crypto_sym_xform *xform, - struct cnxk_se_sess *sess) +cnxk_sess_fill(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess) { struct rte_crypto_sym_xform *aead_xfrm = NULL; struct rte_crypto_sym_xform *c_xfrm = NULL; struct rte_crypto_sym_xform *a_xfrm = NULL; - bool pdcp_chain_supported = false; bool ciph_then_auth = false; - if (roc_cpt->hw_caps[CPT_ENG_TYPE_SE].pdcp_chain) - pdcp_chain_supported = true; - if (xform == NULL) return -EINVAL; @@ -591,8 +586,7 @@ cnxk_sess_fill(struct roc_cpt *roc_cpt, struct rte_crypto_sym_xform *xform, case RTE_CRYPTO_AUTH_SNOW3G_UIA2: case RTE_CRYPTO_AUTH_ZUC_EIA3: case RTE_CRYPTO_AUTH_AES_CMAC: - if (!pdcp_chain_supported || - !is_valid_pdcp_cipher_alg(c_xfrm, sess)) + if (!is_valid_pdcp_cipher_alg(c_xfrm, sess)) return -ENOTSUP; break; default: @@ -627,8 +621,7 @@ cnxk_sess_fill(struct roc_cpt *roc_cpt, struct rte_crypto_sym_xform *xform, case RTE_CRYPTO_AUTH_SNOW3G_UIA2: case RTE_CRYPTO_AUTH_ZUC_EIA3: case RTE_CRYPTO_AUTH_AES_CMAC: - if (!pdcp_chain_supported || - !is_valid_pdcp_cipher_alg(c_xfrm, sess)) + if (!is_valid_pdcp_cipher_alg(c_xfrm, sess)) return -ENOTSUP; break; default: @@ -679,7 +672,7 @@ sym_session_configure(struct roc_cpt *roc_cpt, struct rte_crypto_sym_xform *xfor if (is_session_less) memset(sess_priv, 0, sizeof(struct cnxk_se_sess)); - ret = cnxk_sess_fill(roc_cpt, xform, sess_priv); + ret = cnxk_sess_fill(xform, sess_priv); if (ret) goto priv_put; -- 2.25.1