From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FAC641FD0; Wed, 30 Aug 2023 17:51:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BF0D4027A; Wed, 30 Aug 2023 17:51:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 0E44B40279 for ; Wed, 30 Aug 2023 17:51:25 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37U6P7oE004368 for ; Wed, 30 Aug 2023 08:51:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=iL4RXL6WJJkE9rSONkh6O1bKqheo4AwsW8TmBmC6hxQ=; b=ZWxWZ8ipk/0lbEtT9c8Z2i1O/wQPWtewVvPi0jQXY6mCoVlzHJvLLYZyI09IgwR0x+e/ Ddqy+ePaJ2/nVG/Spghg9UaoiX/AbX3ugwLtJRBQMTiN/y5NcdjWFXoOfOpGK65huB/v GCVcWbt7mVN/9Mxi3lzg8lPkF4CpFA977DFSJAeknn3/7Avo1N+2t4yFsh9KGKtmW1Yy 4cVV4cbYvwM1HHY/ZwISb1xmA1vTFSkhWD/EIj70fIgopUgFBEIrRMGLBQrBmqTg50LN dvaK8DUtqdoO2+O4SW8Z/KFCz9PMchF+9lD7TRfIAH8I/yZenUerxcwt8PR7fYHfTd5s JQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3st0fysru8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 30 Aug 2023 08:51:24 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 30 Aug 2023 08:51:23 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 30 Aug 2023 08:51:23 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id B01953F707D; Wed, 30 Aug 2023 08:51:22 -0700 (PDT) From: Srikanth Yalavarthi To: Srikanth Yalavarthi CC: , , , Subject: [PATCH v1 1/1] app/mldev: report device not found as error Date: Wed, 30 Aug 2023 08:51:20 -0700 Message-ID: <20230830155120.29505-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: kMm-X5u4RCEiLl9AIvLOLn8eHKg92p5O X-Proofpoint-ORIG-GUID: kMm-X5u4RCEiLl9AIvLOLn8eHKg92p5O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-30_12,2023-08-29_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Report ML device not found as error, instead of panic. Signed-off-by: Srikanth Yalavarthi --- 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