From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <qiming.yang@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id C4E60591E
 for <dev@dpdk.org>; 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" <qiming.yang@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Zhang, Helin" <helin.zhang@intel.com>, "Horton, Remy"
 <remy.horton@intel.com>
Thread-Topic: [PATCH v4 5/5] ethtool: dispaly firmware version
Thread-Index: AQHSZoN4t1eAfOgkAEWhjk2SYwCi96En0suAgAFGxkA=
Date: Thu, 5 Jan 2017 01:31:47 +0000
Message-ID: <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16EDC9DDB@SHSMSX101.ccr.corp.intel.com>
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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 <qiming.yang@intel.com>; dev@dpdk.org
Cc: Zhang, Helin <helin.zhang@intel.com>; Horton, Remy <remy.horton@intel.c=
om>
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 <qiming.yang@intel.com>
<...>
> =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