Skip to contentSkip to conversation

gve: Copy and paste buy in gve_get_stats()

PATCH Superseded Dan Carpenter 3 participants 4 messages Aug 20, 2019 – Aug 22, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gve: Copy and paste buy in gve_get_stats()

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")
---
 drivers/net/ethernet/google/gve/gve_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/google/gve/gve_main.c +1 -1
index 497298752381..aca95f64bde8 100644
@@ -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));
 		}
 	}
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 gve: Copy and paste bug in gve_get_stats()

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")

---
v2: fix a typo in the subject: buy -> bug (Thanks Walter Harms)

 drivers/net/ethernet/google/gve/gve_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/google/gve/gve_main.c +1 -1
index 497298752381..aca95f64bde8 100644
@@ -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));
 		}
 	}
Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#2 lore raw

Re: [PATCH v2 net] gve: Copy and paste bug in gve_get_stats()

Quoted 26 lines · Dan Carpenter

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")

---
v2: fix a typo in the subject: buy -> bug (Thanks Walter Harms)

 drivers/net/ethernet/google/gve/gve_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/google/gve/gve_main.c +1 -2
index 497298752381..aca95f64bde8 100644
@@ -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));
                }
        }
--
Quoted 1 line

2.20.1

Thanks!

maintainer Applied
#3 lore raw

Re: [PATCH v2 net] gve: Copy and paste bug in gve_get_stats()

In reply to Dan Carpenter

From: Dan Carpenter <[email protected]>
Date: Tue, 20 Aug 2019 12:11:44 +0300

Quoted 7 lines

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")

---
v2: fix a typo in the subject: buy -> bug (Thanks Walter Harms)

Applied, thanks.