[dpdk-dev] [PATCH v4 4/5] app/testpmd: display PCI address in port info

Wu, Jingjing jingjing.wu at intel.com
Fri Jun 30 11:07:19 CEST 2017



> -----Original Message-----
> From: Dai, Wei
> Sent: Thursday, June 29, 2017 10:58 PM
> To: thomas at monjalon.net; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; Zhang, Helin <helin.zhang at intel.com>; Wu, Jingjing
> <jingjing.wu at intel.com>; yuan.pntel.com
> Cc: dev at dpdk.org; Dai, Wei <wei.dai at intel.com>
> Subject: [PATCH v4 4/5] app/testpmd: display PCI address in port info
> 
> Add the PCI address when running "show port info port_id".
> 
> Signed-off-by: Wei Dai <wei.dai at intel.com>
> ---
>  app/test-pmd/config.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index b0b340e..c2d5c03 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -438,6 +438,11 @@ port_infos_display(portid_t port_id)
>  	rte_eth_dev_info_get(port_id, &dev_info);
>  	printf("\n%s Infos for port %-2d %s\n",
>  	       info_border, port_id, info_border);
> +	printf("PCI Address: " PCI_PRI_FMT "\n",
> +		dev_info.pci_dev->addr.domain,
> +		dev_info.pci_dev->addr.bus,
> +		dev_info.pci_dev->addr.devid,
> +		dev_info.pci_dev->addr.function);
>  	rte_eth_macaddr_get(port_id, &mac_addr);
>  	print_ethaddr("MAC address: ", &mac_addr);
>  	printf("\nDriver name: %s", dev_info.driver_name);
> --
> 2.7.4

The field pci_dev will probably be removed.
Yulong already submit a patch like this and rejected.
http://www.dpdk.org/dev/patchwork/patch/23899/

So, you can add more info when the Bus refine work is done.
You can drop this change from your patch set.

Thanks
Jingjing



More information about the dev mailing list