DPDK patches and discussions
 help / color / mirror / Atom feed
From: Srikanth Yalavarthi <syalavarthi@marvell.com>
To: Srikanth Yalavarthi <syalavarthi@marvell.com>
Cc: <dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,
	<ptakkar@marvell.com>
Subject: [PATCH v1 1/1] app/mldev: report device not found as error
Date: Wed, 30 Aug 2023 08:51:20 -0700	[thread overview]
Message-ID: <20230830155120.29505-1-syalavarthi@marvell.com> (raw)

Report ML device not found as error, instead of panic.

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

diff --git a/app/test-mldev/ml_main.c b/app/test-mldev/ml_main.c
index 940e609c9a8..56941b1afb0 100644
--- a/app/test-mldev/ml_main.c
+++ b/app/test-mldev/ml_main.c
@@ -25,8 +25,10 @@ main(int argc, char **argv)
 	argv += ret;
 
 	mldevs = rte_ml_dev_count();
-	if (!mldevs)
-		rte_panic("no mldev devices found\n");
+	if (!mldevs) {
+		ml_err("no mldev devices found\n");
+		goto error;
+	}
 
 	/* set default values for options */
 	ml_options_default(&opt);
-- 
2.41.0


             reply	other threads:[~2023-08-30 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 15:51 Srikanth Yalavarthi [this message]
2023-10-03  6:00 ` Anup Prabhu
2023-10-05 14:21 ` Shivah Shankar Shankar Narayan Rao
2023-11-14 19:44   ` Thomas Monjalon

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=20230830155120.29505-1-syalavarthi@marvell.com \
    --to=syalavarthi@marvell.com \
    --cc=aprabhu@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ptakkar@marvell.com \
    --cc=sshankarnara@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).