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 C2290A0547; Sat, 31 Jul 2021 20:13:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A322840DDC; Sat, 31 Jul 2021 20:13:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6B61840042 for ; Sat, 31 Jul 2021 20:13:47 +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 16VIAw6f020553; Sat, 31 Jul 2021 11:13:42 -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=8mbGemHZVbTCrdSW9yDiBKV3EN+FiKf08Z0FbsXEIrc=; b=IQoP5HOdQLfI8hN4q4MrJkxhANcTSgr6cXaR6v24Dv2kU7WEm1XmZNZU57GXVhPfpidD vmUjgwkrtUyQJJuKKHqyx6HPTCYFI0jU5nxIvPi5vQ/Ql42ni6SS5ZsS/4+twqk46tRT HL0R+9zKEZ+USvdj5XjVKI+JlFfrSpfESCyiLFFaR3Z4wHyeY2qk+IABShg0uz9bdfha BGhKotPwk0wc1Hlce4QeBIuZjmtDwvYGtK7qdLjGFXbyN3zmrqUAfWH3p7xX64EbFTc5 2hcp33eZrh5/GZJI0PmW3/yUn200XhROdj8kgET/mSFhZTspARW+F3Jh20B5nrmUVVeB jQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3a53vr8xff-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 31 Jul 2021 11:13:41 -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; Sat, 31 Jul 2021 11:13:40 -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; Sat, 31 Jul 2021 11:13:40 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 650B33F7075; Sat, 31 Jul 2021 11:13:36 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , Akhil Goyal Date: Sat, 31 Jul 2021 23:43:24 +0530 Message-ID: <20210731181327.660296-2-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210731181327.660296-1-gakhil@marvell.com> References: <20210731181327.660296-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: DJVVYveV531IRvt-TYn3rUrnV9bhbppp X-Proofpoint-GUID: DJVVYveV531IRvt-TYn3rUrnV9bhbppp X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-31_05:2021-07-30, 2021-07-31 signatures=0 Subject: [dpdk-dev] [PATCH 1/4] cryptodev: remove LIST_END enumerators 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" Remove *_LIST_END enumerators from asymmetric crypto lib to avoid ABI breakage for every new addition in enums. Signed-off-by: Akhil Goyal --- app/test/test_cryptodev_asym.c | 4 ++-- drivers/crypto/qat/qat_asym.c | 2 +- lib/cryptodev/rte_crypto_asym.h | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 847b074a4f..afa0e91a45 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -542,7 +542,7 @@ test_one_case(const void *test_case, int sessionless) printf(" %u) TestCase %s %s\n", test_index++, tc.modex.description, test_msg); } else { - for (i = 0; i < RTE_CRYPTO_ASYM_OP_LIST_END; i++) { + for (i = 0; i <= RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE; i++) { if (tc.modex.xform_type == RTE_CRYPTO_ASYM_XFORM_RSA) { if (tc.rsa_data.op_type_flags & (1 << i)) { if (tc.rsa_data.key_exp) { @@ -1028,7 +1028,7 @@ static inline void print_asym_capa( rte_crypto_asym_xform_strings[capa->xform_type]); printf("operation supported -"); - for (i = 0; i < RTE_CRYPTO_ASYM_OP_LIST_END; i++) { + for (i = 0; i <= RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE; i++) { /* check supported operations */ if (rte_cryptodev_asym_xform_capability_check_optype(capa, i)) printf(" %s", diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c index 85973812a8..026625a4d2 100644 --- a/drivers/crypto/qat/qat_asym.c +++ b/drivers/crypto/qat/qat_asym.c @@ -742,7 +742,7 @@ qat_asym_session_configure(struct rte_cryptodev *dev, err = -EINVAL; goto error; } - } else if (xform->xform_type >= RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END + } else if (xform->xform_type > RTE_CRYPTO_ASYM_XFORM_ECPM || xform->xform_type <= RTE_CRYPTO_ASYM_XFORM_NONE) { QAT_LOG(ERR, "Invalid asymmetric crypto xform"); err = -EINVAL; diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 9c866f553f..5edf658572 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -94,8 +94,6 @@ enum rte_crypto_asym_xform_type { */ RTE_CRYPTO_ASYM_XFORM_ECPM, /**< Elliptic Curve Point Multiplication */ - RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END - /**< End of list */ }; /** @@ -116,7 +114,6 @@ enum rte_crypto_asym_op_type { /**< DH Public Key generation operation */ RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE, /**< DH Shared Secret compute operation */ - RTE_CRYPTO_ASYM_OP_LIST_END }; /** @@ -133,7 +130,6 @@ enum rte_crypto_rsa_padding_type { /**< RSA PKCS#1 OAEP padding scheme */ RTE_CRYPTO_RSA_PADDING_PSS, /**< RSA PKCS#1 PSS padding scheme */ - RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END }; /** -- 2.25.1