From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0FD882BB9 for ; Wed, 4 Jan 2017 15:00:57 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 04 Jan 2017 06:00:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,459,1477983600"; d="scan'208";a="209557583" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by fmsmga004.fm.intel.com with ESMTP; 04 Jan 2017 06:00:55 -0800 To: Qiming Yang , dev@dpdk.org 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> Cc: helin.zhang@intel.com, remy.horton@intel.com From: Ferruh Yigit Message-ID: <416747ed-2df3-10d9-5f01-39e77c84b66b@intel.com> Date: Wed, 4 Jan 2017 14:00:55 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1483531428-14481-6-git-send-email-qiming.yang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: Wed, 04 Jan 2017 14:00:58 -0000 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 <...> > > @@ -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 ? > + 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", >