test/crypto: fix return value from session

Message ID 20230505165348.3876510-1-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series test/crypto: fix return value from session |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/intel-Testing success Testing PASS

Commit Message

Tejasree Kondoj May 5, 2023, 4:53 p.m. UTC
  Fixing return value if session failure occurs
due to unsupported feature.

Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations")
Cc: stable@dpdk.org

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 app/test/test_cryptodev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Anoob Joseph May 8, 2023, 5:13 a.m. UTC | #1
> 
> Fixing return value if session failure occurs due to unsupported feature.
> 
> Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto
> operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>

Acked-by: Anoob Joseph <anoobj@marvell.com>
  
Power, Ciara May 8, 2023, 8:53 a.m. UTC | #2
> -----Original Message-----
> From: Tejasree Kondoj <ktejasree@marvell.com>
> Sent: Friday 5 May 2023 17:54
> To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>
> Cc: Anoob Joseph <anoobj@marvell.com>; Power, Ciara
> <ciara.power@intel.com>; Jerin Jacob <jerinj@marvell.com>; Aakash
> Sasidharan <asasidharan@marvell.com>; Gowrishankar Muthukrishnan
> <gmuthukrishn@marvell.com>; Vidya Sagar Velumuri
> <vvelumuri@marvell.com>; dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] test/crypto: fix return value from session
> 
> Fixing return value if session failure occurs due to unsupported feature.
> 
> Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto
> operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> ---
>  app/test/test_cryptodev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Acked-by: Ciara Power <ciara.power@intel.com>
  
Akhil Goyal May 24, 2023, 12:13 p.m. UTC | #3
> > Subject: [PATCH] test/crypto: fix return value from session
> >
> > Fixing return value if session failure occurs due to unsupported feature.
> >
> > Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto
> > operations")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> > ---
> >  app/test/test_cryptodev.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> 
> Acked-by: Ciara Power <ciara.power@intel.com>

Applied to dpdk-next-crypto
Thanks.
  

Patch

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 0b2ce5ea65..bbc7e8dd18 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8778,7 +8778,7 @@  test_authenticated_encryption(const struct aead_test_data *tdata)
 			tdata->key.data, tdata->key.len,
 			tdata->aad.len, tdata->auth_tag.len,
 			tdata->iv.len);
-	if (retval < 0)
+	if (retval != TEST_SUCCESS)
 		return retval;
 
 	if (tdata->aad.len > MBUF_SIZE) {
@@ -11482,7 +11482,7 @@  test_authenticated_decryption(const struct aead_test_data *tdata)
 			tdata->key.data, tdata->key.len,
 			tdata->aad.len, tdata->auth_tag.len,
 			tdata->iv.len);
-	if (retval < 0)
+	if (retval != TEST_SUCCESS)
 		return retval;
 
 	/* alloc mbuf and set payload */