Commit 3c13ce74 authored by Catherine Sullivan's avatar Catherine Sullivan Committed by David S. Miller

gve: Fix u64_stats_sync to initialize start

u64_stats_fetch_begin needs to initialize start.
Signed-off-by: default avatarCatherine Sullivan <csully@google.com>
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d62962b3
......@@ -102,6 +102,7 @@ gve_get_ethtool_stats(struct net_device *netdev,
ring < priv->rx_cfg.num_queues; ring++) {
if (priv->rx) {
do {
start =
u64_stats_fetch_begin(&priv->rx[ring].statss);
rx_pkts += priv->rx[ring].rpackets;
rx_bytes += priv->rx[ring].rbytes;
......@@ -113,6 +114,7 @@ gve_get_ethtool_stats(struct net_device *netdev,
ring < priv->tx_cfg.num_queues; ring++) {
if (priv->tx) {
do {
start =
u64_stats_fetch_begin(&priv->tx[ring].statss);
tx_pkts += priv->tx[ring].pkt_done;
tx_bytes += priv->tx[ring].bytes_done;
......
......@@ -35,6 +35,7 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
if (priv->rx) {
for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
do {
start =
u64_stats_fetch_begin(&priv->rx[ring].statss);
s->rx_packets += priv->rx[ring].rpackets;
s->rx_bytes += priv->rx[ring].rbytes;
......@@ -45,6 +46,7 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
if (priv->tx) {
for (ring = 0; ring < priv->tx_cfg.num_queues; ring++) {
do {
start =
u64_stats_fetch_begin(&priv->tx[ring].statss);
s->tx_packets += priv->tx[ring].pkt_done;
s->tx_bytes += priv->tx[ring].bytes_done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment