From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 04 Jan 2017 17:04:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,318,1477983600"; d="scan'208";a="209767961" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 04 Jan 2017 17:04:12 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) 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:04:12 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 4 Jan 2017 17:04:12 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Thu, 5 Jan 2017 09:04:10 +0800 From: "Wu, Jingjing" To: "Yigit, Ferruh" , "Yang, Qiming" CC: "dev@dpdk.org" , "Horton, Remy" , Thomas Monjalon Thread-Topic: [PATCH v3 1/4] ethdev: add firmware information get Thread-Index: AQHSZjt0QgBaRD1DpESig5KdyNCLSaEn8I1Q//+KFQCAAZY3wA== 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> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 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: Thu, 05 Jan 2017 01:04:14 -0000 > > 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