From: "Dooley, Brian" <brian.dooley@intel.com>
To: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: Anoob Joseph <anoobj@marvell.com>,
"jerinj@marvell.com" <jerinj@marvell.com>,
Akhil Goyal <gakhil@marvell.com>
Subject: RE: [v1, 01/10] examples/fips_validation: fix MCT output for SHA
Date: Mon, 27 Feb 2023 09:31:16 +0000 [thread overview]
Message-ID: <DM5PR11MB18515D4933499FE23C67D69283AF9@DM5PR11MB1851.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a137683754ff2ed6571376bad9f50a738635f168.1675693844.git.gmuthukrishn@marvell.com>
> -----Original Message-----
> From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Sent: Monday 6 February 2023 14:46
> To: dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; jerinj@marvell.com; Akhil Goyal
> <gakhil@marvell.com>; Dooley, Brian <brian.dooley@intel.com>;
> Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Subject: [v1, 01/10] examples/fips_validation: fix MCT output for SHA
>
> 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@marvell.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
Acked-by: Brian Dooley <brian.dooley@intel.com>
next prev parent reply other threads:[~2023-02-27 9:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 14:45 [v1, 00/10] fips_validation application improvements Gowrishankar Muthukrishnan
2023-02-06 14:45 ` [v1, 01/10] examples/fips_validation: fix MCT output for SHA Gowrishankar Muthukrishnan
2023-02-27 9:31 ` Dooley, Brian [this message]
2023-02-06 14:45 ` [v1, 02/10] examples/fips_validation: add SHA3 validation Gowrishankar Muthukrishnan
2023-02-27 9:31 ` Dooley, Brian
2023-02-06 14:45 ` [v1, 03/10] examples/fips_validation: fix integer parse in test case Gowrishankar Muthukrishnan
2023-02-27 9:30 ` Dooley, Brian
2023-02-06 14:45 ` [v1, 04/10] examples/fips_validation: add SHAKE validation Gowrishankar Muthukrishnan
2023-02-27 9:30 ` Dooley, Brian
2023-02-06 14:45 ` [v1, 05/10] examples/fips_validation: add CCM JSON validation Gowrishankar Muthukrishnan
2023-02-27 9:29 ` Dooley, Brian
2023-02-06 14:45 ` [v1, 06/10] examples/fips_validation: add ECDSA keygen support Gowrishankar Muthukrishnan
2023-02-27 9:29 ` Dooley, Brian
2023-02-06 14:45 ` [v1, 07/10] examples/fips_validation: add SHA3 algorithms in ECDSA test Gowrishankar Muthukrishnan
2023-02-27 9:29 ` Dooley, Brian
2023-02-06 14:46 ` [v1, 08/10] examples/fips_validation: fix AES GCM validation tests Gowrishankar Muthukrishnan
2023-02-27 9:29 ` Dooley, Brian
2023-02-06 14:46 ` [v1, 09/10] examples/fips_validation: fix AES XTS to read seq number Gowrishankar Muthukrishnan
2023-02-27 9:28 ` Dooley, Brian
2023-02-06 14:46 ` [v1, 10/10] examples/fips_validation: add extra space in JSON buffer Gowrishankar Muthukrishnan
2023-02-27 9:27 ` Dooley, Brian
2023-02-27 9:32 ` [v1, 00/10] fips_validation application improvements Dooley, Brian
2023-02-27 17:27 ` Akhil Goyal
2023-02-28 7:39 ` Akhil Goyal
2023-02-28 14:42 ` Patrick Robb
2023-02-28 15:02 ` [EXT] " Akhil Goyal
2023-02-28 15:52 ` Patrick Robb
2023-03-01 4:04 ` Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, " Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 01/10] examples/fips_validation: fix MCT output for SHA Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 02/10] examples/fips_validation: add SHA3 validation Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 03/10] examples/fips_validation: fix integer parse in test case Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 04/10] examples/fips_validation: add SHAKE validation Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 05/10] examples/fips_validation: add CCM JSON validation Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 06/10] examples/fips_validation: add ECDSA keygen support Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 07/10] examples/fips_validation: add SHA3 algorithms in ECDSA test Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 08/10] examples/fips_validation: fix AES GCM validation tests Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 09/10] examples/fips_validation: fix AES XTS to read seq number Gowrishankar Muthukrishnan
2023-02-28 17:28 ` [v2, 10/10] examples/fips_validation: add extra space in JSON buffer Gowrishankar Muthukrishnan
2023-03-01 11:11 ` [v2, 00/10] fips_validation application improvements Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5PR11MB18515D4933499FE23C67D69283AF9@DM5PR11MB1851.namprd11.prod.outlook.com \
--to=brian.dooley@intel.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=gmuthukrishn@marvell.com \
--cc=jerinj@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).