DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1 1/1] app/mldev: fix check for filelist and models count
@ 2023-08-30 15:51 Srikanth Yalavarthi
  2023-09-20  7:08 ` [PATCH v2 " Srikanth Yalavarthi
  0 siblings, 1 reply; 5+ messages in thread
From: Srikanth Yalavarthi @ 2023-08-30 15:51 UTC (permalink / raw)
  To: Srikanth Yalavarthi, Anup Prabhu; +Cc: dev, sshankarnara, ptakkar, stable

Fix incorrect check for filelist and models count.

Fixes: bbd272edcb14 ("app/mldev: add ordered inferences")
Fixes: f6661e6d9a3a ("app/mldev: validate model operations")
Cc: stable@dpdk.org

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 app/test-mldev/ml_options.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-mldev/ml_options.c b/app/test-mldev/ml_options.c
index bed06d1bf7d..816e41fdb70 100644
--- a/app/test-mldev/ml_options.c
+++ b/app/test-mldev/ml_options.c
@@ -86,7 +86,7 @@ ml_parse_models(struct ml_options *opt, const char *arg)
 		strlcpy(opt->filelist[opt->nb_filelist].model, token, PATH_MAX);
 		opt->nb_filelist++;
 
-		if (opt->nb_filelist >= ML_TEST_MAX_MODELS) {
+		if (opt->nb_filelist > ML_TEST_MAX_MODELS) {
 			ml_err("Exceeded model count, max = %d\n", ML_TEST_MAX_MODELS);
 			ret = -EINVAL;
 			break;
@@ -109,7 +109,7 @@ ml_parse_filelist(struct ml_options *opt, const char *arg)
 	char filelist[PATH_MAX];
 	char *token;
 
-	if (opt->nb_filelist >= ML_TEST_MAX_MODELS) {
+	if (opt->nb_filelist > ML_TEST_MAX_MODELS) {
 		ml_err("Exceeded filelist count, max = %d\n", ML_TEST_MAX_MODELS);
 		return -1;
 	}
-- 
2.41.0


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

* [PATCH v2 1/1] app/mldev: fix check for filelist and models count
  2023-08-30 15:51 [PATCH v1 1/1] app/mldev: fix check for filelist and models count Srikanth Yalavarthi
@ 2023-09-20  7:08 ` Srikanth Yalavarthi
  2023-10-04  4:05   ` Anup Prabhu
  2023-10-05  9:14   ` Shivah Shankar Shankar Narayan Rao
  0 siblings, 2 replies; 5+ messages in thread
From: Srikanth Yalavarthi @ 2023-09-20  7:08 UTC (permalink / raw)
  To: Srikanth Yalavarthi, Anup Prabhu; +Cc: dev, sshankarnara, ptakkar, stable

Fix incorrect check for filelist and models count.

Fixes: bbd272edcb14 ("app/mldev: add ordered inferences")
Fixes: f6661e6d9a3a ("app/mldev: validate model operations")
Cc: stable@dpdk.org

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 app/test-mldev/ml_options.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/test-mldev/ml_options.c b/app/test-mldev/ml_options.c
index bed06d1bf7..d068b30df5 100644
--- a/app/test-mldev/ml_options.c
+++ b/app/test-mldev/ml_options.c
@@ -83,14 +83,15 @@ ml_parse_models(struct ml_options *opt, const char *arg)
 
 	token = strtok(models, delim);
 	while (token != NULL) {
-		strlcpy(opt->filelist[opt->nb_filelist].model, token, PATH_MAX);
-		opt->nb_filelist++;
-
 		if (opt->nb_filelist >= ML_TEST_MAX_MODELS) {
 			ml_err("Exceeded model count, max = %d\n", ML_TEST_MAX_MODELS);
 			ret = -EINVAL;
 			break;
 		}
+
+		strlcpy(opt->filelist[opt->nb_filelist].model, token, PATH_MAX);
+		opt->nb_filelist++;
+
 		token = strtok(NULL, delim);
 	}
 
-- 
2.41.0


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

* RE: [PATCH v2 1/1] app/mldev: fix check for filelist and models count
  2023-09-20  7:08 ` [PATCH v2 " Srikanth Yalavarthi
@ 2023-10-04  4:05   ` Anup Prabhu
  2023-10-05  9:14   ` Shivah Shankar Shankar Narayan Rao
  1 sibling, 0 replies; 5+ messages in thread
From: Anup Prabhu @ 2023-10-04  4:05 UTC (permalink / raw)
  To: Srikanth Yalavarthi, Srikanth Yalavarthi
  Cc: dev, Shivah Shankar Shankar Narayan Rao, Prince Takkar, stable

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]



> -----Original Message-----
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Sent: Wednesday, September 20, 2023 12:39 PM
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>; Anup Prabhu
> <aprabhu@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Prince Takkar <ptakkar@marvell.com>;
> stable@dpdk.org
> Subject: [PATCH v2 1/1] app/mldev: fix check for filelist and models count
> 
> Fix incorrect check for filelist and models count.
> 
> Fixes: bbd272edcb14 ("app/mldev: add ordered inferences")
> Fixes: f6661e6d9a3a ("app/mldev: validate model operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Anup Prabhu <aprabhu@marvell.com>

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 35306 bytes --]

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

* RE: [PATCH v2 1/1] app/mldev: fix check for filelist and models count
  2023-09-20  7:08 ` [PATCH v2 " Srikanth Yalavarthi
  2023-10-04  4:05   ` Anup Prabhu
@ 2023-10-05  9:14   ` Shivah Shankar Shankar Narayan Rao
  2023-11-14 19:41     ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Shivah Shankar Shankar Narayan Rao @ 2023-10-05  9:14 UTC (permalink / raw)
  To: Srikanth Yalavarthi, Srikanth Yalavarthi, Anup Prabhu
  Cc: dev, Prince Takkar, stable

> -----Original Message-----
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Sent: Wednesday, September 20, 2023 12:39 PM
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>; Anup Prabhu
> <aprabhu@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Prince Takkar <ptakkar@marvell.com>;
> stable@dpdk.org
> Subject: [PATCH v2 1/1] app/mldev: fix check for filelist and models count
> 
> Fix incorrect check for filelist and models count.
> 
> Fixes: bbd272edcb14 ("app/mldev: add ordered inferences")
> Fixes: f6661e6d9a3a ("app/mldev: validate model operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Shivah Shankar S <sshankarnara@marvell.com>


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

* Re: [PATCH v2 1/1] app/mldev: fix check for filelist and models count
  2023-10-05  9:14   ` Shivah Shankar Shankar Narayan Rao
@ 2023-11-14 19:41     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2023-11-14 19:41 UTC (permalink / raw)
  To: Srikanth Yalavarthi
  Cc: Anup Prabhu, dev, Prince Takkar, stable,
	Shivah Shankar Shankar Narayan Rao

05/10/2023 11:14, Shivah Shankar Shankar Narayan Rao:
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> > Fix incorrect check for filelist and models count.
> > 
> > Fixes: bbd272edcb14 ("app/mldev: add ordered inferences")
> > Fixes: f6661e6d9a3a ("app/mldev: validate model operations")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Acked-by: Shivah Shankar S <sshankarnara@marvell.com>

Applied, thanks.




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

end of thread, other threads:[~2023-11-14 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-30 15:51 [PATCH v1 1/1] app/mldev: fix check for filelist and models count Srikanth Yalavarthi
2023-09-20  7:08 ` [PATCH v2 " Srikanth Yalavarthi
2023-10-04  4:05   ` Anup Prabhu
2023-10-05  9:14   ` Shivah Shankar Shankar Narayan Rao
2023-11-14 19:41     ` Thomas Monjalon

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