patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev
@ 2019-02-16  1:36 Stephen Hemminger
  2019-02-18  6:48 ` [dpdk-stable] [dpdk-dev] " Wu, Jingjing
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephen Hemminger @ 2019-02-16  1:36 UTC (permalink / raw)
  To: dev; +Cc: stable, Stephen Hemminger

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix crash when doing port info of vdev
  2019-02-16  1:36 [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev Stephen Hemminger
@ 2019-02-18  6:48 ` Wu, Jingjing
  2019-02-18 15:45 ` [dpdk-stable] " Ferruh Yigit
  2019-04-09 18:32 ` Stephen Hemminger
  2 siblings, 0 replies; 4+ messages in thread
From: Wu, Jingjing @ 2019-02-18  6:48 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: stable, Stephen Hemminger



> -----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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev
  2019-02-16  1:36 [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev Stephen Hemminger
  2019-02-18  6:48 ` [dpdk-stable] [dpdk-dev] " Wu, Jingjing
@ 2019-02-18 15:45 ` Ferruh Yigit
  2019-04-09 18:32 ` Stephen Hemminger
  2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-02-18 15:45 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: stable, Stephen Hemminger

On 2/16/2019 1:36 AM, Stephen Hemminger wrote:
> 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)

This means 'eth_dev->device' is NULL. Why the 'device' is NULL for eth_dev?
Is there anything to fix in the PMD?

>  		printf("\nDevargs: %s", dev_info.device->devargs->args);
>  	printf("\nConnect to socket: %u", port->socket_id);
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev
  2019-02-16  1:36 [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev Stephen Hemminger
  2019-02-18  6:48 ` [dpdk-stable] [dpdk-dev] " Wu, Jingjing
  2019-02-18 15:45 ` [dpdk-stable] " Ferruh Yigit
@ 2019-04-09 18:32 ` Stephen Hemminger
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2019-04-09 18:32 UTC (permalink / raw)
  To: dev; +Cc: stable, Stephen Hemminger

On Fri, 15 Feb 2019 17:36:46 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> 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>

Can not reproduce with 19.05-rc1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-09 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-16  1:36 [dpdk-stable] [PATCH] app/testpmd: fix crash when doing port info of vdev Stephen Hemminger
2019-02-18  6:48 ` [dpdk-stable] [dpdk-dev] " Wu, Jingjing
2019-02-18 15:45 ` [dpdk-stable] " Ferruh Yigit
2019-04-09 18:32 ` Stephen Hemminger

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).