All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: add bus info when display port info
@ 2017-04-26  4:31 Yulong Pei
  2017-04-28  7:46 ` Wu, Jingjing
  2017-05-01 13:56 ` Thomas Monjalon
  0 siblings, 2 replies; 5+ messages in thread
From: Yulong Pei @ 2017-04-26  4:31 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, thomas

Display pci device bus info when show port info.

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
---
 app/test-pmd/config.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ef07925..49bf816 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -469,6 +469,14 @@ port_infos_display(portid_t port_id)
 	print_ethaddr("MAC address: ", &mac_addr);
 	printf("\nDriver name: %s", dev_info.driver_name);
 	printf("\nConnect to socket: %u", port->socket_id);
+	if (dev_info.pci_dev)
+		printf("\nBus-info: %04x:%02x:%02x:%x",
+			dev_info.pci_dev->addr.domain,
+			dev_info.pci_dev->addr.bus,
+			dev_info.pci_dev->addr.devid,
+			dev_info.pci_dev->addr.function);
+	else
+		printf("\nBus-info: N/A");
 
 	if (port_numa[port_id] != NUMA_NO_CONFIG) {
 		mp = mbuf_pool_find(port_numa[port_id]);
-- 
2.1.0

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

* Re: [PATCH] app/testpmd: add bus info when display port info
  2017-04-26  4:31 [PATCH] app/testpmd: add bus info when display port info Yulong Pei
@ 2017-04-28  7:46 ` Wu, Jingjing
  2017-05-01 13:56 ` Thomas Monjalon
  1 sibling, 0 replies; 5+ messages in thread
From: Wu, Jingjing @ 2017-04-28  7:46 UTC (permalink / raw)
  To: Pei, Yulong, dev; +Cc: thomas



> -----Original Message-----
> From: Pei, Yulong
> Sent: Wednesday, April 26, 2017 12:32 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; thomas@monjalon.net
> Subject: [PATCH] app/testpmd: add bus info when display port info
> 
> Display pci device bus info when show port info.
> 
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>

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

* Re: [PATCH] app/testpmd: add bus info when display port info
  2017-04-26  4:31 [PATCH] app/testpmd: add bus info when display port info Yulong Pei
  2017-04-28  7:46 ` Wu, Jingjing
@ 2017-05-01 13:56 ` Thomas Monjalon
  2017-05-02  1:58   ` Pei, Yulong
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2017-05-01 13:56 UTC (permalink / raw)
  To: Yulong Pei; +Cc: dev, jingjing.wu

26/04/2017 06:31, Yulong Pei:
> Display pci device bus info when show port info.
> 
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>
> ---
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -469,6 +469,14 @@ port_infos_display(portid_t port_id)
>  	print_ethaddr("MAC address: ", &mac_addr);
>  	printf("\nDriver name: %s", dev_info.driver_name);
>  	printf("\nConnect to socket: %u", port->socket_id);
> +	if (dev_info.pci_dev)
> +		printf("\nBus-info: %04x:%02x:%02x:%x",
> +			dev_info.pci_dev->addr.domain,
> +			dev_info.pci_dev->addr.bus,
> +			dev_info.pci_dev->addr.devid,
> +			dev_info.pci_dev->addr.function);
> +	else
> +		printf("\nBus-info: N/A");

The bus information must be managed in a more generic way.
The field pci_dev will probably be removed in a next release.

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

* Re: [PATCH] app/testpmd: add bus info when display port info
  2017-05-01 13:56 ` Thomas Monjalon
@ 2017-05-02  1:58   ` Pei, Yulong
  2017-05-02  9:30     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Pei, Yulong @ 2017-05-02  1:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Wu, Jingjing

Hi Thomas,


-----Original Message-----
From: Thomas Monjalon [mailto:thomas@monjalon.net] 
Sent: Monday, May 1, 2017 9:56 PM
To: Pei, Yulong <yulong.pei@intel.com>
Cc: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add bus info when display port info

26/04/2017 06:31, Yulong Pei:
> Display pci device bus info when show port info.
> 
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>
> ---
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -469,6 +469,14 @@ port_infos_display(portid_t port_id)
>  	print_ethaddr("MAC address: ", &mac_addr);
>  	printf("\nDriver name: %s", dev_info.driver_name);
>  	printf("\nConnect to socket: %u", port->socket_id);
> +	if (dev_info.pci_dev)
> +		printf("\nBus-info: %04x:%02x:%02x:%x",
> +			dev_info.pci_dev->addr.domain,
> +			dev_info.pci_dev->addr.bus,
> +			dev_info.pci_dev->addr.devid,
> +			dev_info.pci_dev->addr.function);
> +	else
> +		printf("\nBus-info: N/A");

The bus information must be managed in a more generic way.
The field pci_dev will probably be removed in a next release.

Could you kind to tell me more information about what does "more generic way" mean ?

Best Regards
Yulong Pei

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

* Re: [PATCH] app/testpmd: add bus info when display port info
  2017-05-02  1:58   ` Pei, Yulong
@ 2017-05-02  9:30     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-05-02  9:30 UTC (permalink / raw)
  To: Pei, Yulong; +Cc: dev, Wu, Jingjing

02/05/2017 03:58, Pei, Yulong:
> From: Thomas Monjalon [mailto:thomas@monjalon.net] 
> > 26/04/2017 06:31, Yulong Pei:
> > > Display pci device bus info when show port info.
> > > 
> > > Signed-off-by: Yulong Pei <yulong.pei@intel.com>
> > > ---
> > > --- a/app/test-pmd/config.c
> > > +++ b/app/test-pmd/config.c
> > > @@ -469,6 +469,14 @@ port_infos_display(portid_t port_id)
> > > 
> > >  	print_ethaddr("MAC address: ", &mac_addr);
> > >  	printf("\nDriver name: %s", dev_info.driver_name);
> > >  	printf("\nConnect to socket: %u", port->socket_id);
> > > 
> > > +	if (dev_info.pci_dev)
> > > +		printf("\nBus-info: %04x:%02x:%02x:%x",
> > > +			dev_info.pci_dev->addr.domain,
> > > +			dev_info.pci_dev->addr.bus,
> > > +			dev_info.pci_dev->addr.devid,
> > > +			dev_info.pci_dev->addr.function);
> > > +	else
> > > +		printf("\nBus-info: N/A");
> > 
> > The bus information must be managed in a more generic way.
> > The field pci_dev will probably be removed in a next release.
> 
> Could you kind to tell me more information about what does "more generic way" mean ?

It means we should not have a PCI field in ethdev.
We should have a function to print a bus info in each bus implementation,
and a generic function taking a rte_device object would call the right
bus-specific function via a function pointer.

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

end of thread, other threads:[~2017-05-02  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26  4:31 [PATCH] app/testpmd: add bus info when display port info Yulong Pei
2017-04-28  7:46 ` Wu, Jingjing
2017-05-01 13:56 ` Thomas Monjalon
2017-05-02  1:58   ` Pei, Yulong
2017-05-02  9:30     ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.