From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id AD856D0A5 for ; Mon, 16 Apr 2018 15:14:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Apr 2018 06:14:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,459,1517904000"; d="scan'208";a="33739886" Received: from dwdohert-ws.ir.intel.com ([163.33.210.60]) by orsmga007.jf.intel.com with ESMTP; 16 Apr 2018 06:14:40 -0700 From: Declan Doherty To: dev@dpdk.org Cc: Adrien Mazarguil , Ferruh Yigit , Thomas Monjalon , Shahaf Shuler , Declan Doherty Date: Mon, 16 Apr 2018 14:06:01 +0100 Message-Id: <20180416130605.6509-6-declan.doherty@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180416130605.6509-1-declan.doherty@intel.com> References: <20180328135433.20203-1-declan.doherty@intel.com> <20180416130605.6509-1-declan.doherty@intel.com> Subject: [dpdk-dev] [PATCH v7 5/9] app/testpmd: add port name to device 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: Mon, 16 Apr 2018 13:14:43 -0000 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 884bcb3b6..1b985056a 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