From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [PATCH v6 5/8] app/testpmd: add port name to device info Date: Wed, 28 Mar 2018 14:54:30 +0100 Message-ID: <20180328135433.20203-6-declan.doherty@intel.com> References: <20180328135433.20203-1-declan.doherty@intel.com> Cc: Alex Rosenbaum , Ferruh Yigit , Thomas Monjalon , Shahaf Shuler , Qi Zhang , Alejandro Lucero , Andrew Rybchenko , Mohammad Abdul Awal , Remy Horton , John McNamara , Rony Efraim , Wu@dpdk.org, Jingjing , Lu@dpdk.org, Wenzhuo , Vincent JArdin , Yuanhan Liu , Richardson@dpdk.org, Bruce , Ananyev@dpdk.org, Konstantin , Wang@dpdk.org, Zhihong , Declan Doherty To: dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1392A4C70 for ; Wed, 28 Mar 2018 16:03:27 +0200 (CEST) In-Reply-To: <20180328135433.20203-1-declan.doherty@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add the port name to information printed by show port info Signed-off-by: Declan Doherty --- app/test-pmd/config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index e12f8c515..0fbdfdcdd 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -407,6 +407,7 @@ port_infos_display(portid_t port_id) static const char *info_border = "*********************"; portid_t pid; uint16_t mtu; + char name[RTE_ETH_NAME_MAX_LEN]; if (port_id_is_invalid(port_id, ENABLED_WARN)) { printf("Valid port range is [0"); @@ -423,6 +424,8 @@ port_infos_display(portid_t port_id) info_border, port_id, info_border); rte_eth_macaddr_get(port_id, &mac_addr); print_ethaddr("MAC address: ", &mac_addr); + rte_eth_dev_get_name_by_port(port_id, name); + printf("\nDevice name: %s", name); printf("\nDriver name: %s", dev_info.driver_name); printf("\nConnect to socket: %u", port->socket_id); -- 2.14.3