From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 50F164C7F for ; Wed, 28 Feb 2018 12:04:56 +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 fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2018 03:04:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,405,1515484800"; d="scan'208";a="20794663" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga007.fm.intel.com with ESMTP; 28 Feb 2018 03:04:54 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by irsmsx110.ger.corp.intel.com (163.33.3.25) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 28 Feb 2018 11:04:53 +0000 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.15]) by irsmsx155.ger.corp.intel.com ([169.254.14.21]) with mapi id 14.03.0319.002; Wed, 28 Feb 2018 11:04:53 +0000 From: "Pattan, Reshma" To: "Varghese, Vipin" , "dev@dpdk.org" CC: "Mcnamara, John" Thread-Topic: [PATCH v2] app/pdump: check for ports Thread-Index: AQHTrvhi/fcWzjNc+UeH322RrdHEkKO5qY4A Date: Wed, 28 Feb 2018 11:04:52 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A2A4920@irsmsx110.ger.corp.intel.com> References: <1519662622-10011-1-git-send-email-vipin.varghese@intel.com> <1519626158-10519-1-git-send-email-vipin.varghese@intel.com> In-Reply-To: <1519626158-10519-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjdkMzViYWEtYjA3OC00N2NjLThkZmItNjhmZmI1MTdjZjBkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkRGSTBLXC84eE9GOWJDNlBwUUZqWHdvZ1psQzRNMThhc1lxdDRyaUczK2NZPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] 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: Wed, 28 Feb 2018 11:04:56 -0000 > -----Original Message----- > From: Varghese, Vipin > Sent: Monday, February 26, 2018 6:23 AM > To: dev@dpdk.org; Pattan, Reshma > Cc: Mcnamara, John ; Varghese, Vipin > > Subject: [PATCH v2] 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 > --- >=20 > Changes in V2: > - updated the exit message - Reshma > --- > 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..203faa3 > 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, "No Ethernet ports - bye\n"); > + > argc -=3D diag; > argv +=3D (diag - 3); >=20 > -- > 1.9.1 Acked-by: Reshma Pattan