From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wu, Jingjing" Subject: Re: [PATCH v3 1/4] ethdev: add firmware information get Date: Thu, 5 Jan 2017 01:04:09 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810CC31C7@SHSMSX103.ccr.corp.intel.com> References: <1481008582-69416-1-git-send-email-qiming.yang@intel.com> <20053497.vNKJpYf1IB@xps13> <10603884.vrshqR2O82@xps13> <9BB6961774997848B5B42BEC655768F810CC2AF1@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "Horton, Remy" , Thomas Monjalon To: "Yigit, Ferruh" , "Yang, Qiming" Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 3F32F58CF for ; Thu, 5 Jan 2017 02:04:13 +0100 (CET) In-Reply-To: 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" > > 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); >=20 > The problem with this is the format and content of the string is not defi= ned, as > you said different HW has different version format. This is no problem if= you will > only print the string. >=20 > 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 st= ring, 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 ou= tput > won't be HW dependent. >=20 As my understand, the firmware version is specific things to each HW. The f= ormat cannot be generic at all, or at least we have no standard to follow. I thin= k the API should not be HW dependent, but about the output, application shoul= d know What the string's meaning. Otherwise why we need to provide the firmware in= fo? Thanks Jingjing