[dpdk-dev] [RFC 09/14] sfc: use new rte_eth_link helpers

Andrew Rybchenko arybchenko at solarflare.com
Mon Jul 17 18:19:41 CEST 2017


On 07/17/2017 07:02 PM, Stephen Hemminger wrote:
> On Sun, 16 Jul 2017 16:48:50 +0300
> Andrew Rybchenko <arybchenko at solarflare.com> wrote:
>
>> On 07/14/2017 09:30 PM, Stephen Hemminger wrote:
>>> Use the new API (_rte_eth_link_update) to handle link status update.
>>> ALso fixes a bug where this driver was not returning -1 when link status changed.
>> It is really good that you raise it, since:
>>    -  as far as I can see the return value of the link_update is never used
>>    - return value is not described and it is unclear what is meant by "link
>>       status changed" since initial point is unspecified
>>
>> We have interpreted link status change as change in data->dev_link
>> made in the current execution flow, but not in parallel execution flow.
> All drivers must do the same thing. Private interpretation is not good.

Definitely agree, but to do so, API documentation must clearly define
what is required. It is especially pity that all these "fixes" and 
complexity
is just a waste of time since return value is actually never used.


More information about the dev mailing list