From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Qiming" Subject: Re: [PATCH v4 5/5] ethtool: dispaly firmware version 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Zhang, Helin" , "Horton, Remy" To: "Yigit, Ferruh" , "dev@dpdk.org" 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) In-Reply-To: <416747ed-2df3-10d9-5f01-39e77c84b66b@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----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