net/ice: return unknown speed in status
authorIvan Dyukov <i.dyukov@samsung.com>
Tue, 11 Aug 2020 08:52:25 +0000 (11:52 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:07 +0000 (18:55 +0200)
rte_ethdev has declared new NUM_UNKNOWN speed which
could be used in case when no speed information is available and
link is up. NUM_NONE should be returned, if link is down.

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/ice/ice_ethdev.c

index 4a161ae..c5dac2e 100644 (file)
@@ -3669,8 +3669,11 @@ ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
                link.link_speed = ETH_SPEED_NUM_100G;
                break;
        case ICE_AQ_LINK_SPEED_UNKNOWN:
-       default:
                PMD_DRV_LOG(ERR, "Unknown link speed");
+               link.link_speed = ETH_SPEED_NUM_UNKNOWN;
+               break;
+       default:
+               PMD_DRV_LOG(ERR, "None link speed");
                link.link_speed = ETH_SPEED_NUM_NONE;
                break;
        }