examples/l2fwd-crypto: fix the default aead assignments

Message ID 1523438147-11739-1-git-send-email-hemant.agrawal@nxp.com
State Accepted
Commit d2c4b7d365d6c680d77d1fe7aa399c9d64514127
Headers show
Series
  • examples/l2fwd-crypto: fix the default aead assignments
Related show

Commit Message

Hemant Agrawal April 11, 2018, 9:15 a.m.
The code is incorrectly updating the authxform instead of
aead xforms.

Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 examples/l2fwd-crypto/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Akhil Goyal April 16, 2018, 9:10 a.m. | #1
On 4/11/2018 2:45 PM, Hemant Agrawal wrote:
> The code is incorrectly updating the authxform instead of

> aead xforms.

>

> Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")

> Cc: stable@dpdk.org

>

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---

>  examples/l2fwd-crypto/main.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c

> index 4d8341e..38e0c7e 100644

> --- a/examples/l2fwd-crypto/main.c

> +++ b/examples/l2fwd-crypto/main.c

> @@ -1474,8 +1474,8 @@ l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)

>  	options->aead_iv_random_size = -1;

>  	options->aead_iv.length = 0;

>

> -	options->auth_xform.aead.algo = RTE_CRYPTO_AEAD_AES_GCM;

> -	options->auth_xform.aead.op = RTE_CRYPTO_AEAD_OP_ENCRYPT;

> +	options->aead_xform.aead.algo = RTE_CRYPTO_AEAD_AES_GCM;

> +	options->aead_xform.aead.op = RTE_CRYPTO_AEAD_OP_ENCRYPT;

>

>  	options->aad_param = 0;

>  	options->aad_random_size = -1;

>

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
De Lara Guarch, Pablo April 17, 2018, 2:46 p.m. | #2
> -----Original Message-----

> From: Hemant Agrawal [mailto:hemant.agrawal@nxp.com]

> Sent: Wednesday, April 11, 2018 10:16 AM

> To: dev@dpdk.org

> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;

> akhil.goyal@nxp.com; dpdk-up@NXP1.onmicrosoft.com

> Subject: [PATCH] examples/l2fwd-crypto: fix the default aead assignments

> 

> The code is incorrectly updating the authxform instead of aead xforms.

> 

> Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>


Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
De Lara Guarch, Pablo April 17, 2018, 3:03 p.m. | #3
> -----Original Message-----

> From: Hemant Agrawal [mailto:hemant.agrawal@nxp.com]

> Sent: Wednesday, April 11, 2018 10:16 AM

> To: dev@dpdk.org

> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;

> akhil.goyal@nxp.com; dpdk-up@NXP1.onmicrosoft.com

> Subject: [PATCH] examples/l2fwd-crypto: fix the default aead assignments

> 

> The code is incorrectly updating the authxform instead of aead xforms.

> 

> Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>


Applied to dpdk-next-crypto.
Thanks,

Pablo

Patch

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4d8341e..38e0c7e 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1474,8 +1474,8 @@  l2fwd_crypto_default_options(struct l2fwd_crypto_options *options)
 	options->aead_iv_random_size = -1;
 	options->aead_iv.length = 0;
 
-	options->auth_xform.aead.algo = RTE_CRYPTO_AEAD_AES_GCM;
-	options->auth_xform.aead.op = RTE_CRYPTO_AEAD_OP_ENCRYPT;
+	options->aead_xform.aead.algo = RTE_CRYPTO_AEAD_AES_GCM;
+	options->aead_xform.aead.op = RTE_CRYPTO_AEAD_OP_ENCRYPT;
 
 	options->aad_param = 0;
 	options->aad_random_size = -1;