From patchwork Fri Oct 8 20:45:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 100840 X-Patchwork-Delegate: gakhil@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 1E11FA0C47; Fri, 8 Oct 2021 22:45:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9649440DF8; Fri, 8 Oct 2021 22:45:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5BB3840DF6 for ; Fri, 8 Oct 2021 22:45:34 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 198EFLYj006256; Fri, 8 Oct 2021 13:45:29 -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=qnbmJJ6YiEAUztDfPltcjh1tR4mG2FPK+pzuHY1Gg3M=; b=R6ajue4mq4hv6rK0Vdyu8DACpPPLCu8JGzc9g23Odrx0p79/nZ8rE6VH10Iu8vRUoD4H L029ExEHTWUwTcNRKil2a3T8ntTefPWU83PY6c3OCMTz+i4gn25btC/LTj4azcR16FiB ppZ3NMk7gFFH1ohTGtOtjSIsSphKS8D4J8K3W77rTynSQKIsBWnjEMrectn/nJkZdmZn dhcyYINKlEb4OkgpeeeR/JilUWuqJzGaihJDO4rhpuOliLuDAG+B1Xiac8AVF1Lnff5n 8BvfqIg20/OKFIoGtz/32CUgjJOJBB7/a0a3d/yO7zUX1qBQiLMbGUfwaT3AMxG0SvAv VQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3bja9f4bn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 Oct 2021 13:45:29 -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; Fri, 8 Oct 2021 13:45: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, 8 Oct 2021 13:45:27 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id B18D83F705D; Fri, 8 Oct 2021 13:45:21 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal Date: Sat, 9 Oct 2021 02:15:14 +0530 Message-ID: <20211008204516.3497060-1-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 X-Proofpoint-ORIG-GUID: uzfEhb19DISpK3OW2xI516KD3hYpQo5S X-Proofpoint-GUID: uzfEhb19DISpK3OW2xI516KD3hYpQo5S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-08_06,2021-10-07_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 1/3] 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 Acked-by: Fan Zhang --- v2: no change 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 9d19a6d6d9..603b2e4609 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -541,7 +541,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) { @@ -1027,7 +1027,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 }; /** From patchwork Fri Oct 8 20:45:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 100841 X-Patchwork-Delegate: gakhil@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 AF01FA0C47; Fri, 8 Oct 2021 22:45:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E0E6410E1; Fri, 8 Oct 2021 22:45:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id A2A7A410E1 for ; Fri, 8 Oct 2021 22:45:40 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 198G968E015202; Fri, 8 Oct 2021 13:45:35 -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=0aTWRUgZN/mejIJMFrWr/VhsPdK+B2OecC+9Bj6ibZw=; b=YAJ9IwQDecsIb1Xl5Ie1qaSpskuaq7hVMpzgIP6KP5AcdTUl9/vdjibvwcNCaPZUqs9Z HyaRZRgrJ8adCHUNy9Iam1a9hNHhP4cMv7Z9WVNxdK4iahiNOrrfEpWob0dAmoTRffAs ccaKZ2mCjhR3vYsuriDTCUFjU498zs5EaEK9ZgiLLiuKsXMSucNEzcOOY89JRsWVnFRR Vi2pQz4FIv2pSSQbtuHynSheRJDLrjYGsnkFGai1XCuCx+SN/WX0oeWTKXj4TMvRMIGB iFPCGv2TS514pgH3EAxKtnPOvnXxQZiRo16r+GKjUQqWhV45e5fvmamtbIsqasmJzivs TQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3bjs8nruyn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 Oct 2021 13:45:34 -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.18; Fri, 8 Oct 2021 13:45:33 -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.18 via Frontend Transport; Fri, 8 Oct 2021 13:45:32 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id B6E293F7061; Fri, 8 Oct 2021 13:45:27 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal Date: Sat, 9 Oct 2021 02:15:15 +0530 Message-ID: <20211008204516.3497060-2-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211008204516.3497060-1-gakhil@marvell.com> References: <20210731181327.660296-1-gakhil@marvell.com> <20211008204516.3497060-1-gakhil@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: zRvro5K_ya2SvQYR2xJSQBBv0aPGBLV_ X-Proofpoint-ORIG-GUID: zRvro5K_ya2SvQYR2xJSQBBv0aPGBLV_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-08_06,2021-10-07_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 2/3] security: hide internal API 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" rte_security_dynfield_register() is an internal API to be used by the driver, hence moving it to internal. Signed-off-by: Akhil Goyal Acked-by: Konstantin Ananyev Acked-by: Ray Kinsella --- v2: no change lib/security/rte_security_driver.h | 2 +- lib/security/version.map | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security_driver.h b/lib/security/rte_security_driver.h index 938373205c..b0253e962e 100644 --- a/lib/security/rte_security_driver.h +++ b/lib/security/rte_security_driver.h @@ -89,7 +89,7 @@ typedef int (*security_session_stats_get_t)(void *device, struct rte_security_session *sess, struct rte_security_stats *stats); -__rte_experimental +__rte_internal int rte_security_dynfield_register(void); /** diff --git a/lib/security/version.map b/lib/security/version.map index a1f46bfd27..edf4887e12 100644 --- a/lib/security/version.map +++ b/lib/security/version.map @@ -16,7 +16,12 @@ EXPERIMENTAL { __rte_security_get_userdata; __rte_security_set_pkt_metadata; rte_security_dynfield_offset; - rte_security_dynfield_register; rte_security_session_stats_get; rte_security_session_update; }; + +INTERNAL { + global: + + rte_security_dynfield_register; +}; From patchwork Fri Oct 8 20:45:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 100842 X-Patchwork-Delegate: gakhil@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 C6319A0C47; Fri, 8 Oct 2021 22:45:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEFAF410DB; Fri, 8 Oct 2021 22:45: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 44D02410DB for ; Fri, 8 Oct 2021 22:45:47 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 198G9TeG015338; Fri, 8 Oct 2021 13:45:41 -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=Zh8GAYfNF32uMDSTqgD/4nAK4zw21A7x7N6OU7XhRc0=; b=kFnw1VwLAI43xoIeap7SSlr9Wv5yrUHHJLTo0PoBD34/CoHTuaSG+bfCWz/OcI4CD/gm 2OvwVNiYRZBi0XT0rCx6m5jtR+pexsjiWJJem3Ess7YZFbrGRSpr8NvBT71/r5RLG7Cg gvYG+zkNyUzopcuAXjrqIiXKjUHfv0ebcJzn49Ag2e9QKu7Y/OPK/g3YR2061/Y68Ziy eh4xkqQ6a+HDu8wJUky8uUX0kVzxa71Zda9isnug6h5/1GmZLrkoVD51u/xgFlV7JFrV 3xXs24LdjOx1MNqnHKDtoyKK+TGu1aYHBNgW3ExL55n5Jqh4TqwGKOO+oRtLbCPcxE19 6Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3bjs8nrv04-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 Oct 2021 13:45:40 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 8 Oct 2021 13:45:39 -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.18 via Frontend Transport; Fri, 8 Oct 2021 13:45:39 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id C3FB73F705D; Fri, 8 Oct 2021 13:45:33 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal Date: Sat, 9 Oct 2021 02:15:16 +0530 Message-ID: <20211008204516.3497060-3-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211008204516.3497060-1-gakhil@marvell.com> References: <20210731181327.660296-1-gakhil@marvell.com> <20211008204516.3497060-1-gakhil@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 2QOWZBduRB9s2pqTiTzd5_to6enYoD97 X-Proofpoint-ORIG-GUID: 2QOWZBduRB9s2pqTiTzd5_to6enYoD97 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-08_06,2021-10-07_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v2 3/3] security: add reserved bitfields 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" In struct rte_security_ipsec_sa_options, for every new option added, there is an ABI breakage, to avoid, a reserved_opts bitfield is added to for the remaining bits available in the structure. Now for every new sa option, these reserved_opts can be reduced and new option can be added. Signed-off-by: Akhil Goyal Acked-by: Konstantin Ananyev Acked-by: Ray Kinsella --- v2: rebase and removed libabigail.abignore change. Exception may be added when there is a need for change. lib/security/rte_security.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 7eb9f109ae..c0ea13892e 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -258,6 +258,12 @@ struct rte_security_ipsec_sa_options { * PKT_TX_UDP_CKSUM or PKT_TX_L4_MASK in mbuf. */ uint32_t l4_csum_enable : 1; + + /** Reserved bit fields for future extension + * + * Note: reduce number of bits in reserved_opts for every new option + */ + uint32_t reserved_opts : 18; }; /** IPSec security association direction */