patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] examples/fips_validation: fix bad return value
@ 2019-09-16 10:04 michaelsh
  2019-09-16  9:48 ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: michaelsh @ 2019-09-16 10:04 UTC (permalink / raw)
  To: akhil.goyal; +Cc: marko.kovacevic, stable, lironh, michaelsh

From: Michael Shamis <michaelsh@marvell.com>

Returning correct error value by fips_test_parse_header()
allows graceful exit of fips application.

Signed-off-by: Michael Shamis <michaelsh@marvell.com>
---
 examples/fips_validation/fips_validation.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 80fd482a1..eaa7349d6 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -125,13 +125,13 @@ fips_test_parse_header(void)
 				info.algo = FIPS_TEST_ALGO_AES_CMAC;
 				ret = parse_test_cmac_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "CCM")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_AES_CCM;
 				ret = parse_test_ccm_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "HMAC")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_HMAC;
@@ -143,7 +143,7 @@ fips_test_parse_header(void)
 				info.algo = FIPS_TEST_ALGO_TDES;
 				ret = parse_test_tdes_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "SHA-")) {
 				if (info.algo != FIPS_TEST_ALGO_HMAC) {
 					algo_parsed = 1;
-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [dpdk-stable] [PATCH] examples/fips_validation: fix bad return value
@ 2019-09-16 16:37 michaelsh
  0 siblings, 0 replies; 3+ messages in thread
From: michaelsh @ 2019-09-16 16:37 UTC (permalink / raw)
  To: akhil.goyal; +Cc: marko.kovacevic, stable, lironh, michaelsh

From: Michael Shamis <michaelsh@marvell.com>

Returning correct error value by fips_test_parse_header()
allows graceful exit of fips application.

Fixes: 07f403e773 ("examples/fips_validation: fix HMAC test")
cc: stable@dpdk.org

Signed-off-by: Michael Shamis <michaelsh@marvell.com>
---
 examples/fips_validation/fips_validation.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 8d43b267e..f2792d853 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -125,13 +125,13 @@ fips_test_parse_header(void)
 				info.algo = FIPS_TEST_ALGO_AES_CMAC;
 				ret = parse_test_cmac_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "CCM")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_AES_CCM;
 				ret = parse_test_ccm_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "HMAC")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_HMAC;
@@ -143,7 +143,7 @@ fips_test_parse_header(void)
 				info.algo = FIPS_TEST_ALGO_TDES;
 				ret = parse_test_tdes_init();
 				if (ret < 0)
-					return 0;
+					return ret;
 			} else if (strstr(info.vec[i], "SHA-")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_SHA;
-- 
2.23.0


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

end of thread, other threads:[~2019-09-16 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-16 10:04 [dpdk-stable] [PATCH] examples/fips_validation: fix bad return value michaelsh
2019-09-16  9:48 ` Akhil Goyal
2019-09-16 16:37 michaelsh

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).