* [PATCH v1] examples/fips_validation: parse block error fix
@ 2022-10-24 10:36 Brian Dooley
2022-10-24 14:06 ` Power, Ciara
2022-10-26 4:26 ` [EXT] " Gowrishankar Muthukrishnan
0 siblings, 2 replies; 4+ messages in thread
From: Brian Dooley @ 2022-10-24 10:36 UTC (permalink / raw)
To: Brian Dooley; +Cc: dev, gmuthukrishn, gakhil
When parsing request files check for file type. This fix will remove
dependence on command line parameter for using libjansson
Fixes: 0f42f3d6034c ("examples/fips_validation: share callback with multiple keys")
Cc: gmuthukrishn@marvell.com
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
---
examples/fips_validation/fips_validation.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 363e17a6f3..5a2a5f86e6 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -638,10 +638,11 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
/*
* Offset not applicable in case of JSON test vectors.
*/
- RTE_SET_USED(key);
-#else
- src += strlen(key);
+ if (info.file_type == FIPS_TYPE_JSON) {
+ RTE_SET_USED(key);
+ } else
#endif
+ src += strlen(key);
len = strlen(src) / 2;
@@ -669,18 +670,16 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val)
return 0;
}
-#ifdef USE_JANSSON
int
parser_read_uint32_val(const char *key, char *src, struct fips_val *val)
{
- RTE_SET_USED(key);
+#ifdef USE_JANSSON
+ if (info.file_type == FIPS_TYPE_JSON) {
+ RTE_SET_USED(key);
- return parser_read_uint32(&val->len, src);
-}
-#else
-int
-parser_read_uint32_val(const char *key, char *src, struct fips_val *val)
-{
+ return parser_read_uint32(&val->len, src);
+ }
+# endif
char *data = src + strlen(key);
size_t data_len = strlen(data);
int ret;
@@ -701,7 +700,6 @@ parser_read_uint32_val(const char *key, char *src, struct fips_val *val)
return ret;
}
-#endif
int
parser_read_uint32_bit_val(const char *key, char *src, struct fips_val *val)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v1] examples/fips_validation: parse block error fix
2022-10-24 10:36 [PATCH v1] examples/fips_validation: parse block error fix Brian Dooley
@ 2022-10-24 14:06 ` Power, Ciara
2022-10-26 4:26 ` [EXT] " Gowrishankar Muthukrishnan
1 sibling, 0 replies; 4+ messages in thread
From: Power, Ciara @ 2022-10-24 14:06 UTC (permalink / raw)
To: Dooley, Brian; +Cc: dev, gmuthukrishn, gakhil
Hi Brian,
> -----Original Message-----
> From: Brian Dooley <brian.dooley@intel.com>
> Sent: Monday 24 October 2022 11:37
> To: Dooley, Brian <brian.dooley@intel.com>
> Cc: dev@dpdk.org; gmuthukrishn@marvell.com; gakhil@marvell.com
> Subject: [PATCH v1] examples/fips_validation: parse block error fix
>
> When parsing request files check for file type. This fix will remove
> dependence on command line parameter for using libjansson
>
> Fixes: 0f42f3d6034c ("examples/fips_validation: share callback with multiple
> keys")
> Cc: gmuthukrishn@marvell.com
> Signed-off-by: Brian Dooley <brian.dooley@intel.com>
> ---
> examples/fips_validation/fips_validation.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
Acked-by: Ciara Power <ciara.power@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [EXT] [PATCH v1] examples/fips_validation: parse block error fix
2022-10-24 10:36 [PATCH v1] examples/fips_validation: parse block error fix Brian Dooley
2022-10-24 14:06 ` Power, Ciara
@ 2022-10-26 4:26 ` Gowrishankar Muthukrishnan
2022-10-27 10:19 ` Akhil Goyal
1 sibling, 1 reply; 4+ messages in thread
From: Gowrishankar Muthukrishnan @ 2022-10-26 4:26 UTC (permalink / raw)
To: Brian Dooley; +Cc: dev, Akhil Goyal
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Thanks.
> -----Original Message-----
> From: Brian Dooley <brian.dooley@intel.com>
> Sent: Monday, October 24, 2022 4:07 PM
> To: Brian Dooley <brian.dooley@intel.com>
> Cc: dev@dpdk.org; Gowrishankar Muthukrishnan
> <gmuthukrishn@marvell.com>; Akhil Goyal <gakhil@marvell.com>
> Subject: [EXT] [PATCH v1] examples/fips_validation: parse block error fix
>
> External Email
>
> ----------------------------------------------------------------------
> When parsing request files check for file type. This fix will remove
> dependence on command line parameter for using libjansson
>
> Fixes: 0f42f3d6034c ("examples/fips_validation: share callback with multiple
> keys")
> Cc: gmuthukrishn@marvell.com
> Signed-off-by: Brian Dooley <brian.dooley@intel.com>
> ---
> examples/fips_validation/fips_validation.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/examples/fips_validation/fips_validation.c
> b/examples/fips_validation/fips_validation.c
> index 363e17a6f3..5a2a5f86e6 100644
> --- a/examples/fips_validation/fips_validation.c
> +++ b/examples/fips_validation/fips_validation.c
> @@ -638,10 +638,11 @@ parse_uint8_hex_str(const char *key, char *src,
> struct fips_val *val)
> /*
> * Offset not applicable in case of JSON test vectors.
> */
> - RTE_SET_USED(key);
> -#else
> - src += strlen(key);
> + if (info.file_type == FIPS_TYPE_JSON) {
> + RTE_SET_USED(key);
> + } else
> #endif
> + src += strlen(key);
>
> len = strlen(src) / 2;
>
> @@ -669,18 +670,16 @@ parse_uint8_hex_str(const char *key, char *src,
> struct fips_val *val)
> return 0;
> }
>
> -#ifdef USE_JANSSON
> int
> parser_read_uint32_val(const char *key, char *src, struct fips_val *val) {
> - RTE_SET_USED(key);
> +#ifdef USE_JANSSON
> + if (info.file_type == FIPS_TYPE_JSON) {
> + RTE_SET_USED(key);
>
> - return parser_read_uint32(&val->len, src);
> -}
> -#else
> -int
> -parser_read_uint32_val(const char *key, char *src, struct fips_val *val) -{
> + return parser_read_uint32(&val->len, src);
> + }
> +# endif
> char *data = src + strlen(key);
> size_t data_len = strlen(data);
> int ret;
> @@ -701,7 +700,6 @@ parser_read_uint32_val(const char *key, char *src,
> struct fips_val *val)
>
> return ret;
> }
> -#endif
>
> int
> parser_read_uint32_bit_val(const char *key, char *src, struct fips_val *val)
> --
> 2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [EXT] [PATCH v1] examples/fips_validation: parse block error fix
2022-10-26 4:26 ` [EXT] " Gowrishankar Muthukrishnan
@ 2022-10-27 10:19 ` Akhil Goyal
0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2022-10-27 10:19 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan, Brian Dooley; +Cc: dev
> Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
>
> > When parsing request files check for file type. This fix will remove
> > dependence on command line parameter for using libjansson
> >
> > Fixes: 0f42f3d6034c ("examples/fips_validation: share callback with multiple
> > keys")
> > Cc: gmuthukrishn@marvell.com
> > Signed-off-by: Brian Dooley <brian.dooley@intel.com>
> > ---
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-27 10:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 10:36 [PATCH v1] examples/fips_validation: parse block error fix Brian Dooley
2022-10-24 14:06 ` Power, Ciara
2022-10-26 4:26 ` [EXT] " Gowrishankar Muthukrishnan
2022-10-27 10:19 ` Akhil Goyal
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).