From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 87C0A2C50 for ; Wed, 26 Apr 2017 12:36:49 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2017 03:36:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,254,1488873600"; d="scan'208";a="253651407" Received: from dpdktest46-2.sh.intel.com ([10.239.129.144]) by fmsmga004.fm.intel.com with ESMTP; 26 Apr 2017 03:36:47 -0700 From: Yulong Pei To: dev@dpdk.org Cc: jingjing.wu@intel.com, thomas@monjalon.net Date: Wed, 26 Apr 2017 12:31:39 +0800 Message-Id: <1493181099-14232-1-git-send-email-yulong.pei@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testpmd: add bus info when display port info 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: Wed, 26 Apr 2017 10:36:50 -0000 Display pci device bus info when show port info. Signed-off-by: Yulong Pei --- 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