-----Original Message----- From: Yigit, Ferruh Sent: Wednesday, January 4, 2017 10:01 PM To: Yang, Qiming <qiming.y...@intel.com>; dev@dpdk.org Cc: Zhang, Helin <helin.zh...@intel.com>; Horton, Remy <remy.hor...@intel.com> 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 > version, in the same way that the Linux kernel ethtool does. > > Signed-off-by: Qiming Yang <qiming.y...@intel.com> <...> > > @@ -61,6 +67,12 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct > ethtool_drvinfo *drvinfo) > dev_info.driver_name); > snprintf(drvinfo->version, sizeof(drvinfo->version), "%s", > rte_version()); > + if (strcmp(drvinfo->driver, "net_ixgbe") == 0) Do you need this check. I think it is not good idea to add this kind of checks 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", >