patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] cryptodev: add backward-compatible enum
@ 2022-03-16 12:23 luca.boccassi
  2022-03-17 13:15 ` David Marchand
  2022-03-17 14:06 ` [PATCH 20.11 v2] " luca.boccassi
  0 siblings, 2 replies; 4+ messages in thread
From: luca.boccassi @ 2022-03-16 12:23 UTC (permalink / raw)
  To: stable; +Cc: david.marchand, ktraynor, christian.ehrhardt, Luca Boccassi

From: Luca Boccassi <bluca@debian.org>

The enum was renamed to fix a typo in main, and backported.
But in the stable release we want to keep backward compatibility
when possible, so also define the old name so that both old and
new code will work.

Fixes: 7b5609a5a0e7 ("cryptodev: fix RSA key type name")

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
Thanks David for the report. Might be interesting for other LTS branches too.

 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
index 9c5bb9233a..8133a31ad4 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -147,6 +147,8 @@ enum rte_crypto_rsa_priv_key_type {
 	RTE_RSA_KEY_TYPE_EXP,
 	/**< RSA private key is an exponent */
 	RTE_RSA_KEY_TYPE_QT,
+	/**< Backward-compatible definition of old name */
+	RTE_RSA_KET_TYPE_QT = RTE_RSA_KEY_TYPE_QT,
 	/**< RSA private key is in quintuple format
 	 * See rte_crypto_rsa_priv_key_qt
 	 */
-- 
2.34.1


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

* Re: [PATCH] cryptodev: add backward-compatible enum
  2022-03-16 12:23 [PATCH] cryptodev: add backward-compatible enum luca.boccassi
@ 2022-03-17 13:15 ` David Marchand
  2022-03-17 14:06 ` [PATCH 20.11 v2] " luca.boccassi
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2022-03-17 13:15 UTC (permalink / raw)
  To: Luca Boccassi
  Cc: dpdk stable, Kevin Traynor, Christian Ehrhardt, Luca Boccassi

On Wed, Mar 16, 2022 at 1:23 PM <luca.boccassi@gmail.com> wrote:
>
> From: Luca Boccassi <bluca@debian.org>
>
> The enum was renamed to fix a typo in main, and backported.
> But in the stable release we want to keep backward compatibility
> when possible, so also define the old name so that both old and
> new code will work.
>
> Fixes: 7b5609a5a0e7 ("cryptodev: fix RSA key type name")
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> Thanks David for the report. Might be interesting for other LTS branches too.
>
>  lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
> index 9c5bb9233a..8133a31ad4 100644
> --- a/lib/librte_cryptodev/rte_crypto_asym.h
> +++ b/lib/librte_cryptodev/rte_crypto_asym.h
> @@ -147,6 +147,8 @@ enum rte_crypto_rsa_priv_key_type {
>         RTE_RSA_KEY_TYPE_EXP,
>         /**< RSA private key is an exponent */
>         RTE_RSA_KEY_TYPE_QT,
> +       /**< Backward-compatible definition of old name */
> +       RTE_RSA_KET_TYPE_QT = RTE_RSA_KEY_TYPE_QT,
>         /**< RSA private key is in quintuple format
>          * See rte_crypto_rsa_priv_key_qt
>          */

You should move this compat item after the comment.
Idem the doxygen tag should be *after* the new item.

Like:
diff --git a/lib/librte_cryptodev/rte_crypto_asym.h
b/lib/librte_cryptodev/rte_crypto_asym.h
index 9c5bb9233a..d59e05323e 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -150,6 +150,8 @@ enum rte_crypto_rsa_priv_key_type {
        /**< RSA private key is in quintuple format
         * See rte_crypto_rsa_priv_key_qt
         */
+       RTE_RSA_KET_TYPE_QT = RTE_RSA_KEY_TYPE_QT,
+       /**< Backward-compatible definition of old name */
 };

 /**

I tried this patch (after moving the hunk after the comment) on top of
current 20.11 branch.
It fixes the ABI check (more a API check in this case).



-- 
David Marchand


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

* [PATCH 20.11 v2] cryptodev: add backward-compatible enum
  2022-03-16 12:23 [PATCH] cryptodev: add backward-compatible enum luca.boccassi
  2022-03-17 13:15 ` David Marchand
@ 2022-03-17 14:06 ` luca.boccassi
  2022-03-17 17:02   ` Christian Ehrhardt
  1 sibling, 1 reply; 4+ messages in thread
From: luca.boccassi @ 2022-03-17 14:06 UTC (permalink / raw)
  To: stable; +Cc: david.marchand, christian.ehrhardt, Luca Boccassi

From: Luca Boccassi <bluca@debian.org>

The enum was renamed to fix a typo in main, and backported.
But in the stable release we want to keep backward compatibility
when possible, so also define the old name so that both old and
new code will work.

Fixes: 7b5609a5a0e7 ("cryptodev: fix RSA key type name")

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
Fixed order of comments for doxygen

 lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
index 9c5bb9233a..d59e05323e 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -150,6 +150,8 @@ enum rte_crypto_rsa_priv_key_type {
 	/**< RSA private key is in quintuple format
 	 * See rte_crypto_rsa_priv_key_qt
 	 */
+	RTE_RSA_KET_TYPE_QT = RTE_RSA_KEY_TYPE_QT,
+	/**< Backward-compatible definition of old name */
 };
 
 /**
-- 
2.34.1


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

* Re: [PATCH 20.11 v2] cryptodev: add backward-compatible enum
  2022-03-17 14:06 ` [PATCH 20.11 v2] " luca.boccassi
@ 2022-03-17 17:02   ` Christian Ehrhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Ehrhardt @ 2022-03-17 17:02 UTC (permalink / raw)
  To: luca.boccassi; +Cc: stable, david.marchand, Luca Boccassi

On Thu, Mar 17, 2022 at 3:07 PM <luca.boccassi@gmail.com> wrote:
>
> From: Luca Boccassi <bluca@debian.org>
>
> The enum was renamed to fix a typo in main, and backported.
> But in the stable release we want to keep backward compatibility
> when possible, so also define the old name so that both old and
> new code will work.
>
> Fixes: 7b5609a5a0e7 ("cryptodev: fix RSA key type name")
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> Fixed order of comments for doxygen
>
>  lib/librte_cryptodev/rte_crypto_asym.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
> index 9c5bb9233a..d59e05323e 100644
> --- a/lib/librte_cryptodev/rte_crypto_asym.h
> +++ b/lib/librte_cryptodev/rte_crypto_asym.h
> @@ -150,6 +150,8 @@ enum rte_crypto_rsa_priv_key_type {
>         /**< RSA private key is in quintuple format
>          * See rte_crypto_rsa_priv_key_qt
>          */
> +       RTE_RSA_KET_TYPE_QT = RTE_RSA_KEY_TYPE_QT,
> +       /**< Backward-compatible definition of old name */

I've already applied this merging Lucas first version with David's
feedback and tested it on 19.11.12 and it works fine for me.
Worked on a cross distro/arch build test as well as in the ABI check
(thanks for sharing that BTW).

Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>

>  };
>
>  /**
> --
> 2.34.1
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

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

end of thread, other threads:[~2022-03-17 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 12:23 [PATCH] cryptodev: add backward-compatible enum luca.boccassi
2022-03-17 13:15 ` David Marchand
2022-03-17 14:06 ` [PATCH 20.11 v2] " luca.boccassi
2022-03-17 17:02   ` Christian Ehrhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).