From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 484AD1B4CB for ; Sat, 16 Feb 2019 02:36:51 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id s22so5683890pfh.4 for ; Fri, 15 Feb 2019 17:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=i5PnxA90U+7DYxTLGu47PtkY4CzHrlKQ62eRG0//YZ0=; b=GLJQSkmxmtVGLbGMRl/hu9db6FthhT308bxbLrgLEaSAMwKMoIoF22mc3Vsl2rLaUR aBCUqQqJ0efntb1/woD/hgA5oD5UQJ8DnyvZ00VAbKuXjfVtWGuh20SubXfiV90FvSx4 IN/po3KmeTran0H/hDt1vImcfHxzeyzx7NUkYdPlRADTpj1xIzx2EEPuYYu1dG4ISiPf B0B5uRMz36Hw6sUghAkwXiF4wgf3aAEDJrspdknCy4aBJBvezgqPZNBW7LwW961kTr9c joHaREt5OX7mNyz6wy7TJz6bjojXXP48BLflT23WfT6kNr/U1n5oEjDubQJ/uUz7i8th cfxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=i5PnxA90U+7DYxTLGu47PtkY4CzHrlKQ62eRG0//YZ0=; b=s1gPW6XCWygn+2NLblNeSusOrxr5SDqCHZW4/8zfMK4z3AOiUqRSAzDtVc3uz8lQff TmHHAonRGjJUK3lISmM1h2oEvmV92EKDkROUuo43qGvbh5suArHXQGogJBsYVn4Fhczi i0NzIA747mRdxtRy9WvUvOcsEGijyZKpoS8i3Iai8BPL7c7XpQgl4+OsvoepoHYQLjsr bRGWL/fwyKHvIruW2dWZDncTmobdh7kasOC2ih1l454iCVrM3tJvRCA3aW2wOjUgSmAX dglCzUwjUulbQcFeLckawImZQnr/LaSzAFqp0B8YwP0L0ES9SJ9ZB/hIvPdY/WVfVdj6 oxuA== X-Gm-Message-State: AHQUAuZfA90DbFKF7GZ65nHWA7mr/Sh70t0tcYZ+tBYTOBNAP7/XD4Sf oi/DGX3o51NsoGXWZN5ikIKpmb8ehmo= X-Google-Smtp-Source: AHgI3IZhZ0rQK5+nap6V7RasTjGQcEdabHpHseidYifwnp4FNTmkb/JH53f08Uk6pCbW6H0A85sEJQ== X-Received: by 2002:aa7:81d0:: with SMTP id c16mr12542387pfn.153.1550281010145; Fri, 15 Feb 2019 17:36:50 -0800 (PST) Received: from shemminger-XPS-13-9360.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id o85sm15817773pfi.105.2019.02.15.17.36.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 17:36:49 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: stable@dpdk.org, Stephen Hemminger Date: Fri, 15 Feb 2019 17:36:46 -0800 Message-Id: <20190216013646.9738-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-stable] [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: Sat, 16 Feb 2019 01:36:51 -0000 From: Stephen Hemminger Noticed a SEGV in testpmd doing: > show port info 1 on Hyper-V with failsafe/tap PMD. A vdev may not have an associated device (i.e NULL) and therefore testpmd should skip devargs in that case. 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(-) 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); -- 2.17.1