patch 'examples/fips_validation: fix MCT output for SHA' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:23:31 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/ac87a06f6b908e77f56be9ca3d772e54f9e111d2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ac87a06f6b908e77f56be9ca3d772e54f9e111d2 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Tue, 28 Feb 2023 22:58:47 +0530
Subject: [PATCH] examples/fips_validation: fix MCT output for SHA
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit fc78f69d6482fd69b9d475b7f7d003bcd26e4588 ]

MCT test for SHA need not print message string along
with digest value.

Fixes: d5c247145c2 ("examples/fips_validation: add parsing for SHA")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Brian Dooley <brian.dooley at intel.com>
---
 examples/fips_validation/fips_validation_sha.c |  8 ++------
 examples/fips_validation/main.c                | 13 +++++--------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/examples/fips_validation/fips_validation_sha.c b/examples/fips_validation/fips_validation_sha.c
index c5da2cc623..178ea492d3 100644
--- a/examples/fips_validation/fips_validation_sha.c
+++ b/examples/fips_validation/fips_validation_sha.c
@@ -182,7 +182,7 @@ parse_test_sha_json_writeback(struct fips_val *val)
 static int
 parse_test_sha_mct_json_writeback(struct fips_val *val)
 {
-	json_t *tcId, *msg, *md, *resArr, *res;
+	json_t *tcId, *md, *resArr, *res;
 	struct fips_val val_local;
 
 	tcId = json_object_get(json_info.json_test_case, "tcId");
@@ -208,11 +208,7 @@ parse_test_sha_mct_json_writeback(struct fips_val *val)
 
 	res = json_object();
 
-	writeback_hex_str("", info.one_line_text, &val[1]);
-	msg = json_string(info.one_line_text);
-	json_object_set_new(res, "msg", msg);
-
-	val_local.val = val[0].val + vec.pt.len;
+	val_local.val = val->val + vec.pt.len;
 	val_local.len = vec.cipher_auth.digest.len;
 
 	writeback_hex_str("", info.one_line_text, &val_local);
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 622f8b5a6e..cc585e8418 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -2268,8 +2268,7 @@ fips_mct_sha_test(void)
 #define SHA_EXTERN_ITER	100
 #define SHA_INTERN_ITER	1000
 #define SHA_MD_BLOCK	3
-	/* val[0] is op result and other value is for parse_writeback callback */
-	struct fips_val val[2] = {{NULL, 0},};
+	struct fips_val val = {NULL, 0};
 	struct fips_val  md[SHA_MD_BLOCK], msg;
 	int ret;
 	uint32_t i, j;
@@ -2328,7 +2327,7 @@ fips_mct_sha_test(void)
 				return ret;
 			}
 
-			ret = get_writeback_data(&val[0]);
+			ret = get_writeback_data(&val);
 			if (ret < 0)
 				return ret;
 
@@ -2337,7 +2336,7 @@ fips_mct_sha_test(void)
 			memcpy(md[1].val, md[2].val, md[2].len);
 			md[1].len = md[2].len;
 
-			memcpy(md[2].val, (val[0].val + vec.pt.len),
+			memcpy(md[2].val, (val.val + vec.pt.len),
 				vec.cipher_auth.digest.len);
 			md[2].len = vec.cipher_auth.digest.len;
 		}
@@ -2348,9 +2347,7 @@ fips_mct_sha_test(void)
 		if (info.file_type != FIPS_TYPE_JSON)
 			fprintf(info.fp_wr, "COUNT = %u\n", j);
 
-		val[1].val = msg.val;
-		val[1].len = msg.len;
-		info.parse_writeback(val);
+		info.parse_writeback(&val);
 
 		if (info.file_type != FIPS_TYPE_JSON)
 			fprintf(info.fp_wr, "\n");
@@ -2361,7 +2358,7 @@ fips_mct_sha_test(void)
 
 	rte_free(vec.pt.val);
 
-	free(val[0].val);
+	free(val.val);
 	free(msg.val);
 
 	return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:39.413374300 +0800
+++ 0023-examples-fips_validation-fix-MCT-output-for-SHA.patch	2023-04-09 21:45:38.609042200 +0800
@@ -1 +1 @@
-From fc78f69d6482fd69b9d475b7f7d003bcd26e4588 Mon Sep 17 00:00:00 2001
+From ac87a06f6b908e77f56be9ca3d772e54f9e111d2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit fc78f69d6482fd69b9d475b7f7d003bcd26e4588 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list