From patchwork Mon Apr 16 13:06:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Doherty, Declan" X-Patchwork-Id: 38194 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C911B199B0; Mon, 16 Apr 2018 15:14:46 +0200 (CEST) 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: , 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 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);