[02/40] cryptodev: remove list end enumerators

Message ID 20220520055445.40063-3-arkadiuszx.kusztal@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series cryptodev: rsa, dh, ecdh changes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Arkadiusz Kusztal May 20, 2022, 5:54 a.m. UTC
  - Removed LIST_END enumerators from asymmetric crypto API.
Adding new enum entries would require moving
LIST_END down, therefore changing its assigned number.
This would cause problems to ABI stability, so these
enums were removed.

Cc: mdr@ashroe.eu

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 devtools/libabigail.abignore    |  2 ++
 lib/cryptodev/rte_crypto_asym.h | 10 +++-------
 2 files changed, 5 insertions(+), 7 deletions(-)
  

Comments

Akhil Goyal May 20, 2022, 7:19 a.m. UTC | #1
> - Removed LIST_END enumerators from asymmetric crypto API.
> Adding new enum entries would require moving
> LIST_END down, therefore changing its assigned number.
> This would cause problems to ABI stability, so these
> enums were removed.
> 
> Cc: mdr@ashroe.eu
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---

There was already a patch in patchworks but it need rework.
Can you look at this and address the comments 
http://patches.dpdk.org/project/dpdk/patch/20211008204516.3497060-1-gakhil@marvell.com/


>  devtools/libabigail.abignore    |  2 ++
>  lib/cryptodev/rte_crypto_asym.h | 10 +++-------
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index 79ff15dc4e..f1945ce3b7 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -27,6 +27,8 @@
>  ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
> experimental
>  [suppress_type]
>          name = rte_crypto_asym_op
> +[suppress_type]
> +        name = rte_crypto_asym_xform_type
> 
>  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>  ; Temporary exceptions till next major ABI version ;
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index 7206652458..a474b6acd1 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -95,10 +95,8 @@ enum rte_crypto_asym_xform_type {
>  	/**< Elliptic Curve Digital Signature Algorithm
>  	 * Perform Signature Generation and Verification.
>  	 */
> -	RTE_CRYPTO_ASYM_XFORM_ECPM,
> +	RTE_CRYPTO_ASYM_XFORM_ECPM
>  	/**< Elliptic Curve Point Multiplication */
> -	RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> -	/**< End of list */
>  };
> 
>  /**
> @@ -117,9 +115,8 @@ enum rte_crypto_asym_op_type {
>  	/**< DH Private Key generation operation */
>  	RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE,
>  	/**< DH Public Key generation operation */
> -	RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE,
> +	RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
>  	/**< DH Shared Secret compute operation */
> -	RTE_CRYPTO_ASYM_OP_LIST_END
>  };
> 
>  /**
> @@ -134,9 +131,8 @@ enum rte_crypto_rsa_padding_type {
>  	 */
>  	RTE_CRYPTO_RSA_PADDING_OAEP,
>  	/**< RSA PKCS#1 OAEP padding scheme */
> -	RTE_CRYPTO_RSA_PADDING_PSS,
> +	RTE_CRYPTO_RSA_PADDING_PSS
>  	/**< RSA PKCS#1 PSS padding scheme */
> -	RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
>  };
> 
>  /**
> --
> 2.13.6
  

Patch

diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 79ff15dc4e..f1945ce3b7 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -27,6 +27,8 @@ 
 ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
 [suppress_type]
         name = rte_crypto_asym_op
+[suppress_type]
+        name = rte_crypto_asym_xform_type
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Temporary exceptions till next major ABI version ;
diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 7206652458..a474b6acd1 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -95,10 +95,8 @@  enum rte_crypto_asym_xform_type {
 	/**< Elliptic Curve Digital Signature Algorithm
 	 * Perform Signature Generation and Verification.
 	 */
-	RTE_CRYPTO_ASYM_XFORM_ECPM,
+	RTE_CRYPTO_ASYM_XFORM_ECPM
 	/**< Elliptic Curve Point Multiplication */
-	RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
-	/**< End of list */
 };
 
 /**
@@ -117,9 +115,8 @@  enum rte_crypto_asym_op_type {
 	/**< DH Private Key generation operation */
 	RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE,
 	/**< DH Public Key generation operation */
-	RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE,
+	RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
 	/**< DH Shared Secret compute operation */
-	RTE_CRYPTO_ASYM_OP_LIST_END
 };
 
 /**
@@ -134,9 +131,8 @@  enum rte_crypto_rsa_padding_type {
 	 */
 	RTE_CRYPTO_RSA_PADDING_OAEP,
 	/**< RSA PKCS#1 OAEP padding scheme */
-	RTE_CRYPTO_RSA_PADDING_PSS,
+	RTE_CRYPTO_RSA_PADDING_PSS
 	/**< RSA PKCS#1 PSS padding scheme */
-	RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
 };
 
 /**