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 C4E60591E for ; Thu, 5 Jan 2017 02:32:04 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 04 Jan 2017 17:32:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,318,1477983600"; d="scan'208";a="1090051290" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 04 Jan 2017 17:32:03 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 4 Jan 2017 17:32:03 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Thu, 5 Jan 2017 09:31:48 +0800 From: "Yang, Qiming" To: "Yigit, Ferruh" , "dev@dpdk.org" CC: "Zhang, Helin" , "Horton, Remy" Thread-Topic: [PATCH v4 5/5] ethtool: dispaly firmware version Thread-Index: AQHSZoN4t1eAfOgkAEWhjk2SYwCi96En0suAgAFGxkA= Date: Thu, 5 Jan 2017 01:31:47 +0000 Message-ID: References: <1482841816-54143-1-git-send-email-qiming.yang@intel.com> <1483531428-14481-1-git-send-email-qiming.yang@intel.com> <1483531428-14481-6-git-send-email-qiming.yang@intel.com> <416747ed-2df3-10d9-5f01-39e77c84b66b@intel.com> In-Reply-To: <416747ed-2df3-10d9-5f01-39e77c84b66b@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmMwMTY2NTEtZGYxYy00ZGVhLWE2ZjMtZmU0YjI1MDAxYTQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlRvNGFzMGM4WkdLcXRrVDRYN0RmRDE5bCtpYXFKWW0zcVNDbGhqblBzdnM9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 5/5] ethtool: dispaly firmware version 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: Thu, 05 Jan 2017 01:32:05 -0000 -----Original Message----- From: Yigit, Ferruh=20 Sent: Wednesday, January 4, 2017 10:01 PM To: Yang, Qiming ; dev@dpdk.org Cc: Zhang, Helin ; Horton, Remy Subject: Re: [PATCH v4 5/5] ethtool: dispaly firmware version On 1/4/2017 12:03 PM, Qiming Yang wrote: > This patch enhances the ethtool example to support to show firmware=20 > version, in the same way that the Linux kernel ethtool does. >=20 > Signed-off-by: Qiming Yang <...> > =20 > @@ -61,6 +67,12 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtoo= l_drvinfo *drvinfo) > dev_info.driver_name); > snprintf(drvinfo->version, sizeof(drvinfo->version), "%s", > rte_version()); > + if (strcmp(drvinfo->driver, "net_ixgbe") =3D=3D 0) Do you need this check. I think it is not good idea to add this kind of che= cks into ethtool app. Why not just print "%d.%d.%d %#X, major, minor, patch= , etrack" for all cases ? Qiming: because I want to keep the format same with kernel version ethtool. > + snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), > + "0x%08x", etrack); > + else > + snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version), > + "%d.%02d 0x%08x", fw_major, fw_minor, etrack); > if (dev_info.pci_dev) > snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info), > "%04x:%02x:%02x.%x", >=20