diff options
author | Catherine Sullivan <csully@google.com> | 2019-07-03 01:46:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-03 21:27:46 +0300 |
commit | 3c13ce74b6f885c2dcb2537b7f61a8e5afab002e (patch) | |
tree | 0068fc1c8856e3d874cd0e56ed89fe46713820cf /drivers/net/ethernet/google/gve/gve_ethtool.c | |
parent | d62962b37cebdc936e2bfcd69ea685da2c433727 (diff) | |
download | linux-3c13ce74b6f885c2dcb2537b7f61a8e5afab002e.tar.xz |
gve: Fix u64_stats_sync to initialize start
u64_stats_fetch_begin needs to initialize start.
Signed-off-by: Catherine Sullivan <csully@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/google/gve/gve_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/google/gve/gve_ethtool.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c index 52947d668e6d..26540b856541 100644 --- a/drivers/net/ethernet/google/gve/gve_ethtool.c +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c @@ -102,7 +102,8 @@ gve_get_ethtool_stats(struct net_device *netdev, ring < priv->rx_cfg.num_queues; ring++) { if (priv->rx) { do { - u64_stats_fetch_begin(&priv->rx[ring].statss); + start = + u64_stats_fetch_begin(&priv->rx[ring].statss); rx_pkts += priv->rx[ring].rpackets; rx_bytes += priv->rx[ring].rbytes; } while (u64_stats_fetch_retry(&priv->rx[ring].statss, @@ -113,7 +114,8 @@ gve_get_ethtool_stats(struct net_device *netdev, ring < priv->tx_cfg.num_queues; ring++) { if (priv->tx) { do { - u64_stats_fetch_begin(&priv->tx[ring].statss); + start = + u64_stats_fetch_begin(&priv->tx[ring].statss); tx_pkts += priv->tx[ring].pkt_done; tx_bytes += priv->tx[ring].bytes_done; } while (u64_stats_fetch_retry(&priv->tx[ring].statss, |