[dpdk-dev] [PATCH 2/2] ethdev: allow unknown link speed
Andrew Rybchenko
arybchenko at solarflare.com
Mon Apr 13 16:26:25 CEST 2020
On 4/8/20 1:26 AM, Thomas Monjalon wrote:
> When querying the link informations, the link status is
> a mandatory major information.
> Other boolean values are supposed to be accurate:
> - duplex mode (half/full)
> - negotiation (auto/fixed)
>
> This API update is making explicit that the link speed information
> is optional.
> The value ETH_SPEED_NUM_NONE (0) was already part of the API.
> The value ETH_SPEED_NUM_UNKNOWN (infinite) is added to cover
> two different cases:
> - speed is not known by the driver
> - device is virtual
>
> Suggested-by: Morten Brørup <mb at smartsharesystems.com>
> Suggested-by: Benoit Ganne <bganne at cisco.com>
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
I'm afraid it requires more efforts to keep things consistent,
e.g.:
- printing of link speed in proc-info
- comparison of rate vs link_speed in testpmd
- printing of link speed in testpmd as %u Mbps
- division by 1000 in test-pipeline
- link speed printing in doc/guides/sample_app_ug/link_status_intr.rst
- link speed printing in many-many examples
IMHO, it is not nice to print UING32_MAX and let use
guess what it means.
More information about the dev
mailing list