DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Min Hu (Connor)" <humin29@huawei.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	thomas@monjalon.net, dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC] ethdev: improve link speed to string
Date: Fri, 10 Feb 2023 14:41:50 +0000	[thread overview]
Message-ID: <5f765461-2728-a768-8519-7c91676efd51@amd.com> (raw)
In-Reply-To: <20230119084559.4828123c@hermes.local>

On 1/19/2023 4:45 PM, Stephen Hemminger wrote:
> On Thu, 19 Jan 2023 11:41:12 +0000
> Ferruh Yigit <ferruh.yigit@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	other threads:[~2023-02-10 14:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  8:45 [dpdk-dev] Questions about rte_eth_link_speed_to_str API Min Hu (Connor)
2021-09-13 10:26 ` Thomas Monjalon
2021-09-14  3:25   ` Min Hu (Connor)
2021-09-14  6:59     ` Stephen Hemminger
2021-09-14 13:04       ` Min Hu (Connor)
2021-09-16  2:56 ` [dpdk-dev] [RFC] ethdev: improve link speed to string Min Hu (Connor)
2021-09-16  6:22   ` Andrew Rybchenko
2021-09-16  8:16     ` Min Hu (Connor)
2021-09-16  8:21       ` Andrew Rybchenko
2021-09-17  0:43         ` Min Hu (Connor)
2021-10-30  9:59           ` Morten Brørup
2021-11-01  0:23             ` Min Hu (Connor)
2023-01-19 11:41           ` Ferruh Yigit
2023-01-19 16:45             ` Stephen Hemminger
2023-02-10 14:41               ` Ferruh Yigit [this message]
2023-03-23 14:40                 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f765461-2728-a768-8519-7c91676efd51@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=humin29@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).