[dpdk-dev] [PATCH v9 02/24] ethdev: add a link status text representation

Ivan Dyukov i.dyukov at samsung.com
Tue Aug 11 19:51:43 CEST 2020


11.08.2020 18:47, Stephen Hemminger пишет:
> On Tue, 11 Aug 2020 11:52:21 +0300
> Ivan Dyukov <i.dyukov at samsung.com> wrote:
>
>> Link status structure keeps complicated values which are hard to
>> represent to end user. e.g. link_speed has INT_MAX value which
>> means that speed is unknown, link_duplex equal to 0 means
>> 'half-duplex' etc. To simplify processing of the values
>> in application, new dpdk function is introduced.
>>
>> This commit adds function which treat link status structure
>> and format it to text representation. User may create custom
>> link status string using format string. If format string is NULL,
>> the function construct standard link status string.
>>
>> Signed-off-by: Ivan Dyukov <i.dyukov at samsung.com>
> Why pander to driver specific link messages?
> This should come from core code in one format for all drivers.
>
I'm not sure that I understand your question correctly, but there is no 
driver specific messages.The function is intended for application usage 
only, not for drivers. The function has default format of link status, 
but application can customize it for own needs. We have disscussed it 
before. some dpdk applications like testpmd has custom status formating 
which lays on few lines of screen. so the function supports custom link 
messages just to not break screen layout of applications.



More information about the dev mailing list