From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id F01474C8F for ; Mon, 26 Feb 2018 12:02:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2018 03:02:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,396,1515484800"; d="scan'208";a="20261061" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga007.fm.intel.com with ESMTP; 26 Feb 2018 03:02:28 -0800 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.15]) by irsmsx105.ger.corp.intel.com ([169.254.7.221]) with mapi id 14.03.0319.002; Mon, 26 Feb 2018 11:02:27 +0000 From: "Pattan, Reshma" To: "Varghese, Vipin" , "dev@dpdk.org" CC: "Mcnamara, John" Thread-Topic: [PATCH] app/pdump: check for ports Thread-Index: AQHTru9mrULdArbfL06lj5G69OgVyKO2hAhg Date: Mon, 26 Feb 2018 11:02:26 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A2A4011@irsmsx110.ger.corp.intel.com> References: <1519662622-10011-1-git-send-email-vipin.varghese@intel.com> In-Reply-To: <1519662622-10011-1-git-send-email-vipin.varghese@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmIxZjUxNGUtYmQxYi00MzVhLTgwNGUtNmVhM2Q5ZDFjODEzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZ3OERMSnFLWDBoSURSQkZjbGRjXC95Y2NEUHROaHNDYWV1V21uOVZhbVpZPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] app/pdump: check for ports X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2018 11:02:30 -0000 > -----Original Message----- > From: Varghese, Vipin > Sent: Monday, February 26, 2018 4:30 PM > To: dev@dpdk.org; Pattan, Reshma > Cc: Mcnamara, John ; Varghese, Vipin > > Subject: [PATCH] app/pdump: check for ports >=20 > In case of application build with shared library mode unless option '-d' = is > passed, poll mode driver for devices is not initialized. Notifying the us= er just > after rte_eal_init is pro active way of intimating the user. >=20 > Signed-off-by: Vipin Varghese > --- > app/pdump/main.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/app/pdump/main.c b/app/pdump/main.c index f6865bd..4242a19 > 100644 > --- a/app/pdump/main.c > +++ b/app/pdump/main.c > @@ -863,6 +863,9 @@ struct parse_val { > if (diag < 0) > rte_panic("Cannot init EAL\n"); >=20 > + if (rte_eth_dev_count() =3D=3D 0) > + rte_exit(EXIT_FAILURE, "Failed to fetch ports for PDUMP!\n"); > + Good one, can you just change the failure log to rte_exit(EXIT_FAILURE, "No= Ethernet ports - bye\n");=20 As, I see most of the other examples and apps do use the similar check and = log as above. :-) Thanks, Reshma