DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators
@ 2020-09-30 17:32 Arek Kusztal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 1/5] app/test: remove list end references from asym crypto Arek Kusztal
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Arek Kusztal @ 2020-09-30 17:32 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, ruifeng.wang, michaelsh, Arek Kusztal

This patchset removes enumerators RTE_CRYPTO_CIPHER_LIST_END,
RTE_CRYPTO_AUTH_LIST_END, RTE_CRYPTO_AEAD_LIST_END from symmetric
crypto as well as RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END,
RTE_CRYPTO_ASYM_OP_LIST_END, RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
enumerators from asymmetric crypto API to prevent some problems that may
arise when adding new crypto algorithms.

This patchset depends on the following patches:

[1] crypto/mvsam: remove crypto end enumerators
(http://patchwork.dpdk.org/patch/79302/)
[2] crypto/armv8: remove crypto enum list end references
(http://patchwork.dpdk.org/patch/78070/)

v2:
- combined patches into one series
- added removal of deprecation notice

Arek Kusztal (5):
  app/test: remove list end references from asym crypto
  crypto/qat: remove asym list end references
  cryptodev: remove crypto list end enumerators
  cryptodev: remove list ends from asymmetric crypto api
  doc: remove crypto list end deprecation notice

 app/test/test_cryptodev_asym.c         |  6 ++++--
 doc/guides/rel_notes/deprecation.rst   |  5 -----
 drivers/crypto/qat/qat_asym.c          |  5 -----
 lib/librte_cryptodev/rte_crypto_asym.h | 10 +++-------
 lib/librte_cryptodev/rte_crypto_sym.h  | 12 +++---------
 5 files changed, 10 insertions(+), 28 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2 1/5] app/test: remove list end references from asym crypto
  2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
@ 2020-09-30 17:32 ` Arek Kusztal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 2/5] crypto/qat: remove asym list end references Arek Kusztal
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Arek Kusztal @ 2020-09-30 17:32 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, ruifeng.wang, michaelsh, Arek Kusztal

This patch removes RTE_CRYPTO_ASYM_OP_LIST_END reference from
asymmetric crypto tests.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 app/test/test_cryptodev_asym.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index dc62ed7bf..63a6bba4f 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -542,7 +542,8 @@ 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 = RTE_CRYPTO_ASYM_OP_ENCRYPT;
+				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 +1029,8 @@ 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 = RTE_CRYPTO_ASYM_OP_ENCRYPT;
+			i <= RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE; i++) {
 		/* check supported operations */
 		if (rte_cryptodev_asym_xform_capability_check_optype(capa, i))
 			printf(" %s",
-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2 2/5] crypto/qat: remove asym list end references
  2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 1/5] app/test: remove list end references from asym crypto Arek Kusztal
@ 2020-09-30 17:32 ` Arek Kusztal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators Arek Kusztal
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Arek Kusztal @ 2020-09-30 17:32 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, ruifeng.wang, michaelsh, Arek Kusztal

This patch removes LIST_END enumerators references from
Intel QuickAssist Technology asymmetric crypto PMD.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_asym.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 85973812a..9157151d9 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -742,11 +742,6 @@ qat_asym_session_configure(struct rte_cryptodev *dev,
 			err = -EINVAL;
 			goto error;
 		}
-	} else if (xform->xform_type >= RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
-			|| xform->xform_type <= RTE_CRYPTO_ASYM_XFORM_NONE) {
-		QAT_LOG(ERR, "Invalid asymmetric crypto xform");
-		err = -EINVAL;
-		goto error;
 	} else {
 		QAT_LOG(ERR, "Asymmetric crypto xform not implemented");
 		err = -EINVAL;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators
  2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 1/5] app/test: remove list end references from asym crypto Arek Kusztal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 2/5] crypto/qat: remove asym list end references Arek Kusztal
@ 2020-09-30 17:32 ` Arek Kusztal
  2020-10-08 19:58   ` Akhil Goyal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api Arek Kusztal
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Arek Kusztal @ 2020-09-30 17:32 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, ruifeng.wang, michaelsh, Arek Kusztal

This patch removes enumerators RTE_CRYPTO_CIPHER_LIST_END,
RTE_CRYPTO_AUTH_LIST_END, RTE_CRYPTO_AEAD_LIST_END to prevent
some problems that may arise when adding new crypto algorithms.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index f29c98051..7a2556a9e 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -132,15 +132,12 @@ enum rte_crypto_cipher_algorithm {
 	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
 	 */
 
-	RTE_CRYPTO_CIPHER_DES_DOCSISBPI,
+	RTE_CRYPTO_CIPHER_DES_DOCSISBPI
 	/**< DES algorithm using modes required by
 	 * DOCSIS Baseline Privacy Plus Spec.
 	 * Chained mbufs are not supported in this mode, i.e. rte_mbuf.next
 	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
 	 */
-
-	RTE_CRYPTO_CIPHER_LIST_END
-
 };
 
 /** Cipher algorithm name strings */
@@ -312,10 +309,8 @@ enum rte_crypto_auth_algorithm {
 	/**< HMAC using 384 bit SHA3 algorithm. */
 	RTE_CRYPTO_AUTH_SHA3_512,
 	/**< 512 bit SHA3 algorithm. */
-	RTE_CRYPTO_AUTH_SHA3_512_HMAC,
+	RTE_CRYPTO_AUTH_SHA3_512_HMAC
 	/**< HMAC using 512 bit SHA3 algorithm. */
-
-	RTE_CRYPTO_AUTH_LIST_END
 };
 
 /** Authentication algorithm name strings */
@@ -412,9 +407,8 @@ enum rte_crypto_aead_algorithm {
 	/**< AES algorithm in CCM mode. */
 	RTE_CRYPTO_AEAD_AES_GCM,
 	/**< AES algorithm in GCM mode. */
-	RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
+	RTE_CRYPTO_AEAD_CHACHA20_POLY1305
 	/**< Chacha20 cipher with poly1305 authenticator */
-	RTE_CRYPTO_AEAD_LIST_END
 };
 
 /** AEAD algorithm name strings */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api
  2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
                   ` (2 preceding siblings ...)
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators Arek Kusztal
@ 2020-09-30 17:32 ` Arek Kusztal
  2020-10-08 19:51   ` Akhil Goyal
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 5/5] doc: remove crypto list end deprecation notice Arek Kusztal
  2020-10-01  9:49 ` [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Trahe, Fiona
  5 siblings, 1 reply; 12+ messages in thread
From: Arek Kusztal @ 2020-09-30 17:32 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, ruifeng.wang, michaelsh, Arek Kusztal

This patch removes RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END,
RTE_CRYPTO_ASYM_OP_LIST_END, RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
enumerators from asymmetric crypto API. When asymmetric API will
no more be experimental adding new entries will be possible without
ABI breakage.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/librte_cryptodev/rte_crypto_asym.h | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
index 9c866f553..915a586c1 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -92,10 +92,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 */
 };
 
 /**
@@ -114,9 +112,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
 };
 
 /**
@@ -131,9 +128,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.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2 5/5] doc: remove crypto list end deprecation notice
  2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
                   ` (3 preceding siblings ...)
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api Arek Kusztal
@ 2020-09-30 17:32 ` Arek Kusztal
  2020-10-01  9:49 ` [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Trahe, Fiona
  5 siblings, 0 replies; 12+ messages in thread
From: Arek Kusztal @ 2020-09-30 17:32 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, ruifeng.wang, michaelsh, Arek Kusztal

This patch removes deprecation notice about removing
LIST_END enumerators from Cryptodev.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index f9b72acb8..7f203fd7e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -230,11 +230,6 @@ Deprecation Notices
   Hence the API will be modified to take two mempool pointers - one for session
   and one for private data.
 
-* cryptodev: ``RTE_CRYPTO_AEAD_LIST_END`` from ``enum rte_crypto_aead_algorithm``,
-  ``RTE_CRYPTO_CIPHER_LIST_END`` from ``enum rte_crypto_cipher_algorithm`` and
-  ``RTE_CRYPTO_AUTH_LIST_END`` from ``enum rte_crypto_auth_algorithm``
-  will be removed.
-
 * cryptodev: support for using IV with all sizes is added, J0 still can
   be used but only when IV length in following structs ``rte_crypto_auth_xform``,
   ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators
  2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
                   ` (4 preceding siblings ...)
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 5/5] doc: remove crypto list end deprecation notice Arek Kusztal
@ 2020-10-01  9:49 ` Trahe, Fiona
  5 siblings, 0 replies; 12+ messages in thread
From: Trahe, Fiona @ 2020-10-01  9:49 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev; +Cc: akhil.goyal, ruifeng.wang, michaelsh



> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Wednesday, September 30, 2020 6:32 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Trahe, Fiona <fiona.trahe@intel.com>; ruifeng.wang@arm.com;
> michaelsh@marvell.com; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v2 0/5] cryptodev: remove list end enumerators
> 
> This patchset removes enumerators RTE_CRYPTO_CIPHER_LIST_END,
> RTE_CRYPTO_AUTH_LIST_END, RTE_CRYPTO_AEAD_LIST_END from symmetric
> crypto as well as RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END,
> RTE_CRYPTO_ASYM_OP_LIST_END, RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
> enumerators from asymmetric crypto API to prevent some problems that may
> arise when adding new crypto algorithms.
> 
> This patchset depends on the following patches:
> 
> [1] crypto/mvsam: remove crypto end enumerators
> (http://patchwork.dpdk.org/patch/79302/)
> [2] crypto/armv8: remove crypto enum list end references
> (http://patchwork.dpdk.org/patch/78070/)
> 
> v2:
> - combined patches into one series
> - added removal of deprecation notice
> 
> Arek Kusztal (5):
>   app/test: remove list end references from asym crypto
>   crypto/qat: remove asym list end references
>   cryptodev: remove crypto list end enumerators
>   cryptodev: remove list ends from asymmetric crypto api
>   doc: remove crypto list end deprecation notice
> 
>  app/test/test_cryptodev_asym.c         |  6 ++++--
>  doc/guides/rel_notes/deprecation.rst   |  5 -----
>  drivers/crypto/qat/qat_asym.c          |  5 -----
>  lib/librte_cryptodev/rte_crypto_asym.h | 10 +++-------
>  lib/librte_cryptodev/rte_crypto_sym.h  | 12 +++---------
>  5 files changed, 10 insertions(+), 28 deletions(-)
> 
> --
> 2.17.1
Series 
Acked-by: Fiona Trahe <fiona.trahe@intel.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api Arek Kusztal
@ 2020-10-08 19:51   ` Akhil Goyal
  2020-10-09  7:02     ` Kusztal, ArkadiuszX
  0 siblings, 1 reply; 12+ messages in thread
From: Akhil Goyal @ 2020-10-08 19:51 UTC (permalink / raw)
  To: Arek Kusztal, dev; +Cc: fiona.trahe, ruifeng.wang, michaelsh

Hi Arek/Fiona,

> This patch removes RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END,
> RTE_CRYPTO_ASYM_OP_LIST_END,
> RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
> enumerators from asymmetric crypto API. When asymmetric API will
> no more be experimental adding new entries will be possible without
> ABI breakage.

I believe XFORM_TYPE, ASYM_OP, and PADDING_TYPE are not going to
Change in near future. Hence LIST_END should not be removed from these
Enums. Adding a LIST END has its own benefits and we should not remove
that until we have a solid reason for it. Moreover, these are experimental.
We should revisit these when we think ASYM is stable.

IMO, we should only remove list ends in algo types.

Regards,
Akhil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators
  2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators Arek Kusztal
@ 2020-10-08 19:58   ` Akhil Goyal
  2020-10-12  5:15     ` Kusztal, ArkadiuszX
  0 siblings, 1 reply; 12+ messages in thread
From: Akhil Goyal @ 2020-10-08 19:58 UTC (permalink / raw)
  To: Arek Kusztal, dev; +Cc: fiona.trahe, ruifeng.wang, michaelsh

> diff --git a/lib/librte_cryptodev/rte_crypto_sym.h
> b/lib/librte_cryptodev/rte_crypto_sym.h
> index f29c98051..7a2556a9e 100644
> --- a/lib/librte_cryptodev/rte_crypto_sym.h
> +++ b/lib/librte_cryptodev/rte_crypto_sym.h
> @@ -132,15 +132,12 @@ enum rte_crypto_cipher_algorithm {
>  	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
>  	 */
> 
> -	RTE_CRYPTO_CIPHER_DES_DOCSISBPI,
> +	RTE_CRYPTO_CIPHER_DES_DOCSISBPI
>  	/**< DES algorithm using modes required by
>  	 * DOCSIS Baseline Privacy Plus Spec.
>  	 * Chained mbufs are not supported in this mode, i.e. rte_mbuf.next
>  	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
>  	 */
> -
> -	RTE_CRYPTO_CIPHER_LIST_END
> -
>  };

Probably we should add a comment for each of the enums that we change,
that the user can define its own LIST_END = last item in the enum +1.
LIST_END is not added to avoid ABI breakage across releases when new algos
are added.

> 
>  /** Cipher algorithm name strings */
> @@ -312,10 +309,8 @@ enum rte_crypto_auth_algorithm {
>  	/**< HMAC using 384 bit SHA3 algorithm. */
>  	RTE_CRYPTO_AUTH_SHA3_512,
>  	/**< 512 bit SHA3 algorithm. */
> -	RTE_CRYPTO_AUTH_SHA3_512_HMAC,
> +	RTE_CRYPTO_AUTH_SHA3_512_HMAC
>  	/**< HMAC using 512 bit SHA3 algorithm. */
> -
> -	RTE_CRYPTO_AUTH_LIST_END
>  };
> 
>  /** Authentication algorithm name strings */
> @@ -412,9 +407,8 @@ enum rte_crypto_aead_algorithm {
>  	/**< AES algorithm in CCM mode. */
>  	RTE_CRYPTO_AEAD_AES_GCM,
>  	/**< AES algorithm in GCM mode. */
> -	RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
> +	RTE_CRYPTO_AEAD_CHACHA20_POLY1305
>  	/**< Chacha20 cipher with poly1305 authenticator */
> -	RTE_CRYPTO_AEAD_LIST_END
>  };
> 
>  /** AEAD algorithm name strings */
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api
  2020-10-08 19:51   ` Akhil Goyal
@ 2020-10-09  7:02     ` Kusztal, ArkadiuszX
  0 siblings, 0 replies; 12+ messages in thread
From: Kusztal, ArkadiuszX @ 2020-10-09  7:02 UTC (permalink / raw)
  To: Akhil Goyal, dev; +Cc: Trahe, Fiona, ruifeng.wang, michaelsh, Anoob Joseph

Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal <akhil.goyal@nxp.com>
> Sent: czwartek, 8 października 2020 21:51
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; ruifeng.wang@arm.com;
> michaelsh@marvell.com
> Subject: RE: [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto
> api
> 
> Hi Arek/Fiona,
> 
> > This patch removes RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END,
> > RTE_CRYPTO_ASYM_OP_LIST_END,
> > RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
> > enumerators from asymmetric crypto API. When asymmetric API will no
> > more be experimental adding new entries will be possible without ABI
> > breakage.
> 
> I believe XFORM_TYPE, ASYM_OP, and PADDING_TYPE are not going to Change
> in near future. Hence LIST_END should not be removed from these Enums.
> Adding a LIST END has its own benefits and we should not remove that until we
> have a solid reason for it. Moreover, these are experimental.
> We should revisit these when we think ASYM is stable.

As for XFORM_TYPE it could be extended by ECDH, even if ECPM is present (as we have DH op enums), I think EdDSA can have its own enum as well.
As for asym_op I don't know which way it will go as RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE is distinct case as it is more about generation than computation, this could be clarified in future.
As for rsa padding, I agree it fulfills today requirements.

Though yes, since it is experimental I will remove asym patch from v3 patchset.

> 
> IMO, we should only remove list ends in algo types.
> 
> Regards,
> Akhil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators
  2020-10-08 19:58   ` Akhil Goyal
@ 2020-10-12  5:15     ` Kusztal, ArkadiuszX
  2020-10-12 11:46       ` Akhil Goyal
  0 siblings, 1 reply; 12+ messages in thread
From: Kusztal, ArkadiuszX @ 2020-10-12  5:15 UTC (permalink / raw)
  To: Akhil Goyal, dev; +Cc: Trahe, Fiona, ruifeng.wang, michaelsh

Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal <akhil.goyal@nxp.com>
> Sent: czwartek, 8 października 2020 21:58
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; ruifeng.wang@arm.com;
> michaelsh@marvell.com
> Subject: RE: [PATCH v2 3/5] cryptodev: remove crypto list end enumerators
> 
> > diff --git a/lib/librte_cryptodev/rte_crypto_sym.h
> > b/lib/librte_cryptodev/rte_crypto_sym.h
> > index f29c98051..7a2556a9e 100644
> > --- a/lib/librte_cryptodev/rte_crypto_sym.h
> > +++ b/lib/librte_cryptodev/rte_crypto_sym.h
> > @@ -132,15 +132,12 @@ enum rte_crypto_cipher_algorithm {
> >  	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
> >  	 */
> >
> > -	RTE_CRYPTO_CIPHER_DES_DOCSISBPI,
> > +	RTE_CRYPTO_CIPHER_DES_DOCSISBPI
> >  	/**< DES algorithm using modes required by
> >  	 * DOCSIS Baseline Privacy Plus Spec.
> >  	 * Chained mbufs are not supported in this mode, i.e. rte_mbuf.next
> >  	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
> >  	 */
> > -
> > -	RTE_CRYPTO_CIPHER_LIST_END
> > -
> >  };
> 
> Probably we should add a comment for each of the enums that we change, that
> the user can define its own LIST_END = last item in the enum +1.
> LIST_END is not added to avoid ABI breakage across releases when new algos
> are added.
[Arek] - I do not now if necessary, should it be some kind of guarantee that order and number of enumerators will not change across the releases?
> 
> >
> >  /** Cipher algorithm name strings */
> > @@ -312,10 +309,8 @@ enum rte_crypto_auth_algorithm {
> >  	/**< HMAC using 384 bit SHA3 algorithm. */
> >  	RTE_CRYPTO_AUTH_SHA3_512,
> >  	/**< 512 bit SHA3 algorithm. */
> > -	RTE_CRYPTO_AUTH_SHA3_512_HMAC,
> > +	RTE_CRYPTO_AUTH_SHA3_512_HMAC
> >  	/**< HMAC using 512 bit SHA3 algorithm. */
> > -
> > -	RTE_CRYPTO_AUTH_LIST_END
> >  };
> >
> >  /** Authentication algorithm name strings */ @@ -412,9 +407,8 @@ enum
> > rte_crypto_aead_algorithm {
> >  	/**< AES algorithm in CCM mode. */
> >  	RTE_CRYPTO_AEAD_AES_GCM,
> >  	/**< AES algorithm in GCM mode. */
> > -	RTE_CRYPTO_AEAD_CHACHA20_POLY1305,
> > +	RTE_CRYPTO_AEAD_CHACHA20_POLY1305
> >  	/**< Chacha20 cipher with poly1305 authenticator */
> > -	RTE_CRYPTO_AEAD_LIST_END
> >  };
> >
> >  /** AEAD algorithm name strings */
> > --
> > 2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators
  2020-10-12  5:15     ` Kusztal, ArkadiuszX
@ 2020-10-12 11:46       ` Akhil Goyal
  0 siblings, 0 replies; 12+ messages in thread
From: Akhil Goyal @ 2020-10-12 11:46 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev; +Cc: Trahe, Fiona, ruifeng.wang, michaelsh

Hi Arek,
> Hi Akhil,
> 
> > -----Original Message-----
> > From: Akhil Goyal <akhil.goyal@nxp.com>
> > Sent: czwartek, 8 października 2020 21:58
> > To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> > Cc: Trahe, Fiona <fiona.trahe@intel.com>; ruifeng.wang@arm.com;
> > michaelsh@marvell.com
> > Subject: RE: [PATCH v2 3/5] cryptodev: remove crypto list end enumerators
> >
> > > diff --git a/lib/librte_cryptodev/rte_crypto_sym.h
> > > b/lib/librte_cryptodev/rte_crypto_sym.h
> > > index f29c98051..7a2556a9e 100644
> > > --- a/lib/librte_cryptodev/rte_crypto_sym.h
> > > +++ b/lib/librte_cryptodev/rte_crypto_sym.h
> > > @@ -132,15 +132,12 @@ enum rte_crypto_cipher_algorithm {
> > >  	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
> > >  	 */
> > >
> > > -	RTE_CRYPTO_CIPHER_DES_DOCSISBPI,
> > > +	RTE_CRYPTO_CIPHER_DES_DOCSISBPI
> > >  	/**< DES algorithm using modes required by
> > >  	 * DOCSIS Baseline Privacy Plus Spec.
> > >  	 * Chained mbufs are not supported in this mode, i.e. rte_mbuf.next
> > >  	 * for m_src and m_dst in the rte_crypto_sym_op must be NULL.
> > >  	 */
> > > -
> > > -	RTE_CRYPTO_CIPHER_LIST_END
> > > -
> > >  };
> >
> > Probably we should add a comment for each of the enums that we change,
> that
> > the user can define its own LIST_END = last item in the enum +1.
> > LIST_END is not added to avoid ABI breakage across releases when new algos
> > are added.
> [Arek] - I do not now if necessary, should it be some kind of guarantee that
> order and number of enumerators will not change across the releases?

Yes we should make sure in the future that the order of enums are not changed
In future. This can be mentioned in the comments. We will be adding the new algos
In the end only. Please add a comment.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-10-12 11:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 17:32 [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Arek Kusztal
2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 1/5] app/test: remove list end references from asym crypto Arek Kusztal
2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 2/5] crypto/qat: remove asym list end references Arek Kusztal
2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 3/5] cryptodev: remove crypto list end enumerators Arek Kusztal
2020-10-08 19:58   ` Akhil Goyal
2020-10-12  5:15     ` Kusztal, ArkadiuszX
2020-10-12 11:46       ` Akhil Goyal
2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 4/5] cryptodev: remove list ends from asymmetric crypto api Arek Kusztal
2020-10-08 19:51   ` Akhil Goyal
2020-10-09  7:02     ` Kusztal, ArkadiuszX
2020-09-30 17:32 ` [dpdk-dev] [PATCH v2 5/5] doc: remove crypto list end deprecation notice Arek Kusztal
2020-10-01  9:49 ` [dpdk-dev] [PATCH v2 0/5] cryptodev: remove list end enumerators Trahe, Fiona

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git