From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 6D3741B4CF for ; Sat, 16 Feb 2019 02:36:51 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id j5so1174627pfa.2 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=FYpyLTCGv6zFKwBNipnYPvHKT/6QlczkdS6GIZ38olKRt+I0tgYXgoobfEuajls77r di0P/aeDjG67P5lVCaKfNOkwoWOZbVcxI2RTSBSmtjGlTqq2YM1emDrE3duFV7ogWlLA 5RWpY2O7UFWdBLeJUNd455eaT/zxM7wKrICt2BpoYbkD0F4yappf9x933fowaRR5PYh9 GO1l5ohaKEe2BDt/nWn0WR62Z2hL7TAmb5+BkJbXJn8gkg3dsh06E9UY3YcVT/7GAuxv qtPHVeQpapI/aPLe53AeZa7+WSsILqclIySCydOJwoI/Fh6W6IWOP1KcPIVPfzV0rx7l SalQ== X-Gm-Message-State: AHQUAubPjK9EfeODZLkzskZJ4Mg5sxYtj85e3TFOQJuFgh1zDZCM9cLm Fr5PFl/noyr3FnhGkfzE9u2Cnz3uh8s= 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-dev] [PATCH] app/testpmd: fix crash when doing port info of vdev 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: 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