[dpdk-dev] [PATCH v3 1/4] ethdev: add firmware information get

Ferruh Yigit ferruh.yigit at intel.com
Wed Jan 4 09:43:22 CET 2017


On 1/4/2017 7:48 AM, Wu, Jingjing wrote:
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yang, Qiming
>> Sent: Wednesday, January 4, 2017 11:33 AM
>> To: Yigit, Ferruh <ferruh.yigit at intel.com>
>> Cc: dev at dpdk.org; Horton, Remy <remy.horton at intel.com>; Thomas Monjalon
>> <thomas.monjalon at 6wind.com>
>> 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 <qiming.yang at intel.com>
>> Cc: dev at dpdk.org; Horton, Remy <remy.horton at intel.com>; Thomas Monjalon
>> <thomas.monjalon at 6wind.com>
>> 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
> 



More information about the dev mailing list