DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix crash when doing port info of	vdev
Date: Mon, 18 Feb 2019 06:48:29 +0000	[thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F811357050@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20190216013646.9738-1-stephen@networkplumber.org>



> -----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 <sthemmin@microsoft.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix crash when doing port info of vdev
> 
> From: Stephen Hemminger <sthemmin@microsoft.com>
> 
> 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 <sthemmin@microsoft.com>
> ---
>  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

Acked-by: Jingjing Wu <jingjing.wu@intel.com>

Thanks
Jingjing

  reply	other threads:[~2019-02-18  6:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-16  1:36 Stephen Hemminger
2019-02-18  6:48 ` Wu, Jingjing [this message]
2019-02-18 15:45 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-09 18:32 ` [dpdk-dev] " Stephen Hemminger
2019-04-09 18:32   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9BB6961774997848B5B42BEC655768F811357050@SHSMSX103.ccr.corp.intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).