From patchwork Wed Mar 28 13:54:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Doherty, Declan" X-Patchwork-Id: 36622 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 83CFA5F3D; Wed, 28 Mar 2018 16:03:29 +0200 (CEST) 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 07:03:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,371,1517904000"; d="scan'208";a="28771628" Received: from dwdohert-ws.ir.intel.com ([163.33.210.60]) by orsmga007.jf.intel.com with ESMTP; 28 Mar 2018 07:03:00 -0700 From: Declan Doherty To: dev@dpdk.org 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 Date: Wed, 28 Mar 2018 14:54:30 +0100 Message-Id: <20180328135433.20203-6-declan.doherty@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180328135433.20203-1-declan.doherty@intel.com> References: <20180328135433.20203-1-declan.doherty@intel.com> Subject: [dpdk-dev] [PATCH v6 5/8] 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 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);