Skip to content

Commit 281e8b2

Browse files
amirvdavem330
authored andcommitted
net/mlx4_en: Count HW buffer overrun only once
RdropOvflw counts overrun of HW buffer, therefore should be used for rx_fifo_errors only. Currently RdropOvflw counter is mistakenly also set into rx_missed_errors and rx_over_errors too, which makes the device total dropped packets accounting to show wrong results. Fix that. Use it for rx_fifo_errors only. Fixes: c27a02c ('mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC') Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: Eugenia Emantayev <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aac8d3c commit 281e8b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlx4/en_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
238238
stats->collisions = 0;
239239
stats->rx_dropped = be32_to_cpu(mlx4_en_stats->RDROP);
240240
stats->rx_length_errors = be32_to_cpu(mlx4_en_stats->RdropLength);
241-
stats->rx_over_errors = be32_to_cpu(mlx4_en_stats->RdropOvflw);
241+
stats->rx_over_errors = 0;
242242
stats->rx_crc_errors = be32_to_cpu(mlx4_en_stats->RCRC);
243243
stats->rx_frame_errors = 0;
244244
stats->rx_fifo_errors = be32_to_cpu(mlx4_en_stats->RdropOvflw);
245-
stats->rx_missed_errors = be32_to_cpu(mlx4_en_stats->RdropOvflw);
245+
stats->rx_missed_errors = 0;
246246
stats->tx_aborted_errors = 0;
247247
stats->tx_carrier_errors = 0;
248248
stats->tx_fifo_errors = 0;

0 commit comments

Comments
 (0)