[dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' has been queued to LTS release 18.11.10

Kevin Traynor ktraynor at redhat.com
Thu Aug 20 17:33:40 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/25/20. 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://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7071c6483383b50bdf795de442635b7e4c94a2ac

Thanks.

Kevin.

---
>From 7071c6483383b50bdf795de442635b7e4c94a2ac Mon Sep 17 00:00:00 2001
From: Ayuj Verma <ayverma at marvell.com>
Date: Thu, 11 Jun 2020 19:14:16 +0530
Subject: [PATCH] examples/fips_validation: fix parsing of TDES vectors

[ upstream commit 32440cdf2af9ad38fd32a533f51a32da92345007 ]

Processing of test vector for COUNT = 0 is getting skipped, as
some of the NIST TDES files doesn't have an empty line after
[ENCRYPT]/[DECRYPT] and thus treated as an interim block.

Parse function now identifies such blocks, separates out interim
and test vector data, and then parses each with their respective
callbacks.

Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")

Signed-off-by: Archana Muniganti <marchana at marvell.com>
Signed-off-by: Ayuj Verma <ayverma at marvell.com>
---
 examples/fips_validation/fips_validation.c | 21 +++++++++++++++------
 examples/fips_validation/fips_validation.h |  1 +
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index a835cc3fa6..6d14fe8ed4 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -289,9 +289,11 @@ fips_test_parse_one_case(void)
 {
 	uint32_t i, j = 0;
-	uint32_t is_interim = 0;
+	uint32_t is_interim;
+	uint32_t interim_cnt = 0;
 	int ret;
 
 	if (info.interim_callbacks) {
 		for (i = 0; i < info.nb_vec_lines; i++) {
+			is_interim = 0;
 			for (j = 0; info.interim_callbacks[j].key != NULL; j++)
 				if (strstr(info.vec[i],
@@ -306,15 +308,22 @@ fips_test_parse_one_case(void)
 						return ret;
 				}
+
+			if (is_interim)
+				interim_cnt += 1;
 		}
 	}
 
-	if (is_interim) {
-		for (i = 0; i < info.nb_vec_lines; i++)
+	info.vec_start_off = interim_cnt;
+
+	if (interim_cnt) {
+		for (i = 0; i < interim_cnt; i++)
 			fprintf(info.fp_wr, "%s\n", info.vec[i]);
 		fprintf(info.fp_wr, "\n");
-		return 1;
+
+		if (info.nb_vec_lines == interim_cnt)
+			return 1;
 	}
 
-	for (i = 0; i < info.nb_vec_lines; i++) {
+	for (i = info.vec_start_off; i < info.nb_vec_lines; i++) {
 		for (j = 0; info.callbacks[j].key != NULL; j++)
 			if (strstr(info.vec[i], info.callbacks[j].key)) {
@@ -336,5 +345,5 @@ fips_test_write_one_case(void)
 	uint32_t i;
 
-	for (i = 0; i < info.nb_vec_lines; i++)
+	for (i = info.vec_start_off; i < info.nb_vec_lines; i++)
 		fprintf(info.fp_wr, "%s\n", info.vec[i]);
 }
diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
index 3e291bc365..80ead1cf07 100644
--- a/examples/fips_validation/fips_validation.h
+++ b/examples/fips_validation/fips_validation.h
@@ -143,4 +143,5 @@ struct fips_test_interim_info {
 	char *one_line_text;
 	char *vec[MAX_LINE_PER_VECTOR];
+	uint32_t vec_start_off;
 	uint32_t nb_vec_lines;
 	char device_name[MAX_STRING_SIZE];
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-20 16:26:17.045556209 +0100
+++ 0035-examples-fips_validation-fix-parsing-of-TDES-vectors.patch	2020-08-20 16:26:15.831324387 +0100
@@ -1 +1 @@
-From 32440cdf2af9ad38fd32a533f51a32da92345007 Mon Sep 17 00:00:00 2001
+From 7071c6483383b50bdf795de442635b7e4c94a2ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32440cdf2af9ad38fd32a533f51a32da92345007 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index a34e34d25a..3aaec20fb4 100644
+index a835cc3fa6..6d14fe8ed4 100644
@@ -28 +29 @@
-@@ -341,9 +341,11 @@ fips_test_parse_one_case(void)
+@@ -289,9 +289,11 @@ fips_test_parse_one_case(void)
@@ -41 +42 @@
-@@ -358,15 +360,22 @@ fips_test_parse_one_case(void)
+@@ -306,15 +308,22 @@ fips_test_parse_one_case(void)
@@ -68 +69 @@
-@@ -388,5 +397,5 @@ fips_test_write_one_case(void)
+@@ -336,5 +345,5 @@ fips_test_write_one_case(void)
@@ -76 +77 @@
-index 5aee955c16..75fa555fa6 100644
+index 3e291bc365..80ead1cf07 100644
@@ -79 +80 @@
-@@ -162,4 +162,5 @@ struct fips_test_interim_info {
+@@ -143,4 +143,5 @@ struct fips_test_interim_info {



More information about the stable mailing list