Skip to contentSkip to conversation

mlx4_en: going out of range of TX rings when reporting stats

PATCH In review Yevgeny Petrilin 1 participant 1 message Mar 23, 2011

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

PATCH v2 1/16 mlx4_en: going out of range of TX rings when reporting stats

---
 drivers/net/mlx4/en_port.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/mlx4/en_port.c +1 -1
index 7f5a322..a2b0bc4 100644
@@ -206,7 +206,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
 	}
 	stats->tx_packets = 0;
 	stats->tx_bytes = 0;
-	for (i = 0; i <= priv->tx_ring_num; i++) {
+	for (i = 0; i < priv->tx_ring_num; i++) {
 		stats->tx_packets += priv->tx_ring[i].packets;
 		stats->tx_bytes += priv->tx_ring[i].bytes;
 	}
Signature · 1 line
1.6.0.2