From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 034BAF60C for ; Wed, 4 Jan 2017 09:43:31 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 04 Jan 2017 00:43:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="209463877" Received: from amcewan-mobl1.ger.corp.intel.com (HELO [10.252.2.89]) ([10.252.2.89]) by fmsmga004.fm.intel.com with ESMTP; 04 Jan 2017 00:43:23 -0800 To: "Wu, Jingjing" , "Yang, Qiming" References: <1481008582-69416-1-git-send-email-qiming.yang@intel.com> <20053497.vNKJpYf1IB@xps13> <10603884.vrshqR2O82@xps13> <9BB6961774997848B5B42BEC655768F810CC2AF1@SHSMSX103.ccr.corp.intel.com> Cc: "dev@dpdk.org" , "Horton, Remy" , Thomas Monjalon From: Ferruh Yigit Message-ID: Date: Wed, 4 Jan 2017 08:43:22 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <9BB6961774997848B5B42BEC655768F810CC2AF1@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 1/4] ethdev: add firmware information get 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 08:43:32 -0000 On 1/4/2017 7:48 AM, Wu, Jingjing wrote: > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yang, Qiming >> Sent: Wednesday, January 4, 2017 11:33 AM >> To: Yigit, Ferruh >> Cc: dev@dpdk.org; Horton, Remy ; Thomas Monjalon >> >> Subject: Re: [dpdk-dev] [PATCH v3 1/4] ethdev: add firmware information get >> >> Yes, in my opinion it is. And I use this name already exist in the share code from >> ND team. >> >> -----Original Message----- >> From: Yigit, Ferruh >> Sent: Tuesday, January 3, 2017 10:49 PM >> To: Yang, Qiming >> Cc: dev@dpdk.org; Horton, Remy ; Thomas Monjalon >> >> Subject: Re: [PATCH v3 1/4] ethdev: add firmware information get >> >> On 1/3/2017 9:05 AM, Yang, Qiming wrote: >>> Hi, Ferruh >>> Please see the question below. In my opinion, etrack_id is just a name used to >> define the ID of one NIC. >>> In kernel version ethtool, it will print this ID in the line of firmware verison. >>> I know what is etrack_id mean, but I really don't know why this named >> etrack_id. >> >> Hi Qiming, >> >> I suggested the API based on fields you already used in your patch. >> >> So, this API is to get FW version, is etrack_id something that defines (part of) >> firmware version? >> >> Thanks, >> ferruh >> >> > Different HW may have different version format, so it is better to use string. > > And I prefer the API definition in your v2 patch like > > rte_eth_dev_fwver_get(uint8_t port_id, char *fw_version, int fw_length); The problem with this is the format and content of the string is not defined, as you said different HW has different version format. This is no problem if you will only print the string. But this is a public API, if an application wants to call this API and do something useful according the FW version information, it will need to parse the string, and it will not able to parse it because format of the string is not defined. By making API fill some defined variables, app won't need to parse them, and API output won't be HW dependent. Thanks, ferruh > > Thanks > Jingjing >