On 1/19/2023 4:45 PM, Stephen Hemminger wrote:
> On Thu, 19 Jan 2023 11:41:12 +0000
> Ferruh Yigit <ferruh.yi...@amd.com> wrote:
> 
>>>>>> Nothing good will happen if you try to use the function to
>>>>>> print two different link speeds in one log message.  
>>>>> You are right.
>>>>> And use malloc for "name" will result in memory leakage, which is also
>>>>> not a good option.
>>>>>
>>>>> BTW, do you think if we need to modify the function
>>>>> "rte_eth_link_speed_to_str"?  
>>>>
>>>> IMHO it would be more pain than gain in this case.
>>>>
>>>> .
>>>>  
>>> Agree with you. Thanks Andrew
>>>  
>>
>> It can be option to update the API as following in next ABI break release:
>>
>> const char *
>> rte_eth_link_speed_to_str(uint32_t link_speed, char *buf, size_t buf_size);
>>
>> For this a deprecation notice needs to be sent and approved, not sure
>> though if it worth.
>>
>>
>> Meanwhile, what do you think to update string 'Invalid' to something
>> like 'Irregular' or 'Erratic', does this help to convey the right message?
> 
> 
> API versioning is possible here.


Agree, ABI versioning can be used here.

@Connor, what do you think?

Reply via email to