From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id A268D4C77; Mon, 18 Feb 2019 07:48:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2019 22:48:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,383,1544515200"; d="scan'208";a="135117954" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 17 Feb 2019 22:48:35 -0800 Received: from fmsmsx161.amr.corp.intel.com (10.18.125.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 17 Feb 2019 22:48:34 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX161.amr.corp.intel.com (10.18.125.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 17 Feb 2019 22:48:34 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.194]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.232]) with mapi id 14.03.0415.000; Mon, 18 Feb 2019 14:48:29 +0800 From: "Wu, Jingjing" To: Stephen Hemminger , "dev@dpdk.org" CC: "stable@dpdk.org" , Stephen Hemminger Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix crash when doing port info of vdev Thread-Index: AQHUxZghlaN62dbAt0iGTXC2N//PwqXlIJsw Date: Mon, 18 Feb 2019 06:48:29 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F811357050@SHSMSX103.ccr.corp.intel.com> References: <20190216013646.9738-1-stephen@networkplumber.org> In-Reply-To: <20190216013646.9738-1-stephen@networkplumber.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmJmYjI5ZjAtOTg3Yi00ZmRiLTkwYTQtM2QzNTRhOTc0YjQ4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaEdkXC9WUlwvemtPc2lcL05iK2FUT25qTXoxbjNtMTgzU0tzb1JRc2d1Z2d5Z3RPYkcrVnFjZWJvOTRCeTY4WmtpeSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix crash when doing port info of vdev X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2019 06:48:38 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Saturday, February 16, 2019 9:37 AM > To: dev@dpdk.org > Cc: stable@dpdk.org; Stephen Hemminger > Subject: [dpdk-dev] [PATCH] app/testpmd: fix crash when doing port info o= f vdev >=20 > From: Stephen Hemminger >=20 > Noticed a SEGV in testpmd doing: > > show port info 1 > on Hyper-V with failsafe/tap PMD. >=20 > A vdev may not have an associated device (i.e NULL) and therefore > testpmd should skip devargs in that case. >=20 > Fixes: cf72ed09181b ("app/testpmd: display devargs in port info output") > Signed-off-by: Stephen Hemminger > --- > app/test-pmd/config.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index b9e5dd923b0f..38708db943d2 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -415,7 +415,8 @@ port_infos_display(portid_t port_id) > rte_eth_dev_get_name_by_port(port_id, name); > printf("\nDevice name: %s", name); > printf("\nDriver name: %s", dev_info.driver_name); > - if (dev_info.device->devargs && dev_info.device->devargs->args) > + if (dev_info.device && dev_info.device->devargs && > + dev_info.device->devargs->args) > printf("\nDevargs: %s", dev_info.device->devargs->args); > printf("\nConnect to socket: %u", port->socket_id); >=20 > -- > 2.17.1 Acked-by: Jingjing Wu Thanks Jingjing