diff mbox series

[v4,5/7] net/ixgbe: return unknown speed in status

Message ID 20200702132139.28078-6-i.dyukov@samsung.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series ethdev: allow unknown link speed | expand

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Ivan Dyukov July 2, 2020, 1:21 p.m. UTC
rte_ethdev has declared new NUM_UNKNOWN speed which
could be used in case when no speed information is available

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Zhao1, Wei July 2, 2020, 11:38 p.m. UTC | #1
> -----Original Message-----
> From: Ivan Dyukov <i.dyukov@samsung.com>
> Sent: Thursday, July 2, 2020 9:22 PM
> To: dev@dpdk.org; i.dyukov@samsung.com; v.kuramshin@samsung.com;
> thomas@monjalon.net; david.marchand@redhat.com; Yigit, Ferruh
> <ferruh.yigit@intel.com>; arybchenko@solarflare.com; Zhao1, Wei
> <wei.zhao1@intel.com>; Guo, Jia <jia.guo@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Lu,
> Wenzhuo <wenzhuo.lu@intel.com>; mb@smartsharesystems.com;
> stephen@networkplumber.org
> Subject: [PATCH v4 5/7] net/ixgbe: return unknown speed in status
> 
> rte_ethdev has declared new NUM_UNKNOWN speed which could be used in
> case when no speed information is available
> 
> Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
> Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index a4e5c539d..5b9b13058 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -4311,11 +4311,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev
> *dev,
>  	switch (link_speed) {
>  	default:
>  	case IXGBE_LINK_SPEED_UNKNOWN:
> -		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
> -			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
> -			link.link_speed = ETH_SPEED_NUM_10M;
> -		else
> -			link.link_speed = ETH_SPEED_NUM_100M;
> +		link.link_speed = ETH_SPEED_NUM_UNKNOWN;
>  		break;
> 
>  	case IXGBE_LINK_SPEED_100_FULL:
> --
> 2.17.1


Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index a4e5c539d..5b9b13058 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4311,11 +4311,7 @@  ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	switch (link_speed) {
 	default:
 	case IXGBE_LINK_SPEED_UNKNOWN:
-		if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
-			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
-			link.link_speed = ETH_SPEED_NUM_10M;
-		else
-			link.link_speed = ETH_SPEED_NUM_100M;
+		link.link_speed = ETH_SPEED_NUM_UNKNOWN;
 		break;
 
 	case IXGBE_LINK_SPEED_100_FULL: