ethdev: add return value to stats get dev op
[dpdk.git] / drivers / net / i40e / i40e_ethdev_vf.c
index 111ac39..63d1f77 100644 (file)
@@ -108,7 +108,7 @@ static void i40evf_dev_info_get(struct rte_eth_dev *dev,
                                struct rte_eth_dev_info *dev_info);
 static int i40evf_dev_link_update(struct rte_eth_dev *dev,
                                  int wait_to_complete);
-static void i40evf_dev_stats_get(struct rte_eth_dev *dev,
+static int i40evf_dev_stats_get(struct rte_eth_dev *dev,
                                struct rte_eth_stats *stats);
 static int i40evf_dev_xstats_get(struct rte_eth_dev *dev,
                                 struct rte_eth_xstat *xstats, unsigned n);
@@ -2100,6 +2100,8 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
        new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
        new_link.link_status = vf->link_up ? ETH_LINK_UP :
                                             ETH_LINK_DOWN;
+       new_link.link_autoneg =
+               dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED;
 
        i40evf_dev_atomic_write_link_status(dev, &new_link);
 
@@ -2230,7 +2232,7 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        };
 }
 
-static void
+static int
 i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
        int ret;
@@ -2253,6 +2255,7 @@ i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
        } else {
                PMD_DRV_LOG(ERR, "Get statistics failed");
        }
+       return ret;
 }
 
 static void