On Wed, Apr 8, 2020 at 3:57 AM Thomas Monjalon <tho...@monjalon.net> 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
LGTM. > > Suggested-by: Morten Brørup <m...@smartsharesystems.com> > Suggested-by: Benoit Ganne <bga...@cisco.com> > Signed-off-by: Thomas Monjalon <tho...@monjalon.net> > --- > lib/librte_ethdev/rte_ethdev.h | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h > index d1a593ad11..2d51fd3444 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -300,6 +300,7 @@ struct rte_eth_stats { > #define ETH_SPEED_NUM_50G 50000 /**< 50 Gbps */ > #define ETH_SPEED_NUM_56G 56000 /**< 56 Gbps */ > #define ETH_SPEED_NUM_100G 100000 /**< 100 Gbps */ > +#define ETH_SPEED_NUM_UNKNOWN UINT32_MAX /**< Unknown */ IMO, It is better to add the following information in the same or other words under @note in Doxygen comment for the release documentation perspective. The value ETH_SPEED_NUM_UNKNOWN (infinite) is added to cover two different cases: - speed is not known by the driver - device is virtual