From patchwork Wed Oct 10 11:42:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 46471 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 ED75D1B4F4; Wed, 10 Oct 2018 12:42:41 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id C6A4A1B4CF for ; Wed, 10 Oct 2018 12:42:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 03:42:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,364,1534834800"; d="scan'208";a="97921363" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by fmsmga001.fm.intel.com with ESMTP; 10 Oct 2018 03:42:36 -0700 From: Ferruh Yigit To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: dev@dpdk.org, Ferruh Yigit Date: Wed, 10 Oct 2018 12:42:22 +0100 Message-Id: <20181010114222.74519-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] app/testpmd: display devargs in port info output 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" Devargs may affect how device works but currently we don't have a way to observe provided devargs. Add ability to print device argument as part of port info, For example, for "--vdev net_pcap0,iface=lo" output will be " ********************* Infos for port 1 ********************* MAC address: 02:70:63:61:70:00 Device name: net_pcap0 Driver name: net_pcap Devargs: iface=lo .... " or for "-w0000:86:00.1,queue-num-per-vf=8", " ********************* Infos for port 0 ********************* MAC address: 3C:FD:FE:AB:B4:41 Device name: 0000:86:00.1 Driver name: net_i40e Devargs: queue-num-per-vf=8 .... " `Devargs` line may not be printed at all if devargs is not provided for that device. Signed-off-by: Ferruh Yigit Acked-by: Bernard Iremonger --- app/test-pmd/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 86c205806..67a4a309e 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -410,6 +410,8 @@ port_infos_display(portid_t port_id) rte_eth_dev_get_name_by_port(port_id, name); printf("\nDevice name: %s", name); printf("\nDriver name: %s", dev_info.driver_name); + if (dev_info.device->devargs && dev_info.device->devargs->args) + printf("\nDevargs: %s", dev_info.device->devargs->args); printf("\nConnect to socket: %u", port->socket_id); if (port_numa[port_id] != NUMA_NO_CONFIG) {