gve: Copy and paste bug in gve_get_stats()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 20 Aug 2019 09:11:44 +0000 (12:11 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Aug 2019 03:50:26 +0000 (20:50 -0700)
There is a copy and paste error so we have "rx" where "tx" was intended
in the priv->tx[] array.

Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Catherine Sullivan <csully@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve_main.c

index 49729875238123cdc88b20e3feabe291dd89dcfd..aca95f64bde80b50642ea2e3066111dcb6745a09 100644 (file)
@@ -50,7 +50,7 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
                                  u64_stats_fetch_begin(&priv->tx[ring].statss);
                                s->tx_packets += priv->tx[ring].pkt_done;
                                s->tx_bytes += priv->tx[ring].bytes_done;
-                       } while (u64_stats_fetch_retry(&priv->rx[ring].statss,
+                       } while (u64_stats_fetch_retry(&priv->tx[ring].statss,
                                                       start));
                }
        }