提交 d24d65ed 编写于 作者: B Ben Greear 提交者: Jeff Kirsher

e100: Fix rx-over-length statistics.

The old code would += the total errors every time
stats were gathered.  Instead, keep a count of short-pkt
and long-pkt counters and then simply add them together
for the rx-over-length stat.
Signed-off-by: NBen Greear <greearb@candelatech.com>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 b4017c53
...@@ -622,6 +622,7 @@ struct nic { ...@@ -622,6 +622,7 @@ struct nic {
u32 rx_fc_pause; u32 rx_fc_pause;
u32 rx_fc_unsupported; u32 rx_fc_unsupported;
u32 rx_tco_frames; u32 rx_tco_frames;
u32 rx_short_frame_errors;
u32 rx_over_length_errors; u32 rx_over_length_errors;
u16 eeprom_wc; u16 eeprom_wc;
...@@ -1622,7 +1623,9 @@ static void e100_update_stats(struct nic *nic) ...@@ -1622,7 +1623,9 @@ static void e100_update_stats(struct nic *nic)
ns->collisions += nic->tx_collisions; ns->collisions += nic->tx_collisions;
ns->tx_errors += le32_to_cpu(s->tx_max_collisions) + ns->tx_errors += le32_to_cpu(s->tx_max_collisions) +
le32_to_cpu(s->tx_lost_crs); le32_to_cpu(s->tx_lost_crs);
ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) + nic->rx_short_frame_errors +=
le32_to_cpu(s->rx_short_frame_errors);
ns->rx_length_errors = nic->rx_short_frame_errors +
nic->rx_over_length_errors; nic->rx_over_length_errors;
ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors); ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors);
ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors); ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册