net/ice: fix link speed
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Wed, 23 Jan 2019 05:30:29 +0000 (13:30 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 24 Jan 2019 09:08:31 +0000 (10:08 +0100)
Fix the issue that the link speed is unknown.

Fixes: 690175ee51bf ("net/ice: support getting device information")
Fixes: cf911d90e366 ("net/ice: support link update")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_ethdev.c

index b450115..6ab66fa 100644 (file)
@@ -1899,7 +1899,9 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
                               ETH_LINK_SPEED_10G |
                               ETH_LINK_SPEED_20G |
                               ETH_LINK_SPEED_25G |
-                              ETH_LINK_SPEED_40G;
+                              ETH_LINK_SPEED_40G |
+                              ETH_LINK_SPEED_50G |
+                              ETH_LINK_SPEED_100G;
 
        dev_info->nb_rx_queues = dev->data->nb_rx_queues;
        dev_info->nb_tx_queues = dev->data->nb_tx_queues;
@@ -2010,6 +2012,12 @@ ice_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complete)
        case ICE_AQ_LINK_SPEED_40GB:
                link.link_speed = ETH_SPEED_NUM_40G;
                break;
+       case ICE_AQ_LINK_SPEED_50GB:
+               link.link_speed = ETH_SPEED_NUM_50G;
+               break;
+       case ICE_AQ_LINK_SPEED_100GB:
+               link.link_speed = ETH_SPEED_NUM_100G;
+               break;
        case ICE_AQ_LINK_SPEED_UNKNOWN:
        default:
                PMD_DRV_LOG(ERR, "Unknown link speed");