[v1,1/1] app/mldev: report device not found as error
Checks
Commit Message
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(-)
Comments
> -----Original Message-----
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Sent: Wednesday, August 30, 2023 9:21 PM
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Anup Prabhu <aprabhu@marvell.com>;
> Prince Takkar <ptakkar@marvell.com>
> Subject: [PATCH v1 1/1] app/mldev: report device not found as error
>
> 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(-)
>
Acked-by: Anup Prabhu <aprabhu@marvell.com>
> -----Original Message-----
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Sent: Wednesday, August 30, 2023 9:21 PM
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Anup Prabhu <aprabhu@marvell.com>;
> Prince Takkar <ptakkar@marvell.com>
> Subject: [PATCH v1 1/1] app/mldev: report device not found as error
>
> Report ML device not found as error, instead of panic.
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Shivah Shankar S <sshankarnara@marvell.com>
05/10/2023 16:21, Shivah Shankar Shankar Narayan Rao:
> From: Srikanth Yalavarthi <syalavarthi@marvell.com>
> >
> > Report ML device not found as error, instead of panic.
> >
> > Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Acked-by: Shivah Shankar S <sshankarnara@marvell.com>
Applied, thanks.
@@ -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);