diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-01-12 19:50:35 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:40:11 -0500 |
commit | 6b7660cd4df23ee92ddc0ba4b4ec31e3adee7bc9 (patch) | |
tree | 624a74e76fa9d5fdcc3f6c9142148cfaafc9a01d /drivers/net/e1000 | |
parent | 7892f59c5ea86115450293441ca10654168e00da (diff) |
[PATCH] Fix e1000 stats
Updated the e1000_stats structure and removed mpx for rx_errors and rx_dropped.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000.h | 2 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index c87187d3e595..4dd1326dd04f 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -275,6 +275,7 @@ struct e1000_adapter { | |||
275 | uint64_t gotcl_old; | 275 | uint64_t gotcl_old; |
276 | uint64_t tpt_old; | 276 | uint64_t tpt_old; |
277 | uint64_t colc_old; | 277 | uint64_t colc_old; |
278 | uint32_t tx_timeout_count; | ||
278 | uint32_t tx_fifo_head; | 279 | uint32_t tx_fifo_head; |
279 | uint32_t tx_head_addr; | 280 | uint32_t tx_head_addr; |
280 | uint32_t tx_fifo_size; | 281 | uint32_t tx_fifo_size; |
@@ -307,6 +308,7 @@ struct e1000_adapter { | |||
307 | uint64_t hw_csum_err; | 308 | uint64_t hw_csum_err; |
308 | uint64_t hw_csum_good; | 309 | uint64_t hw_csum_good; |
309 | uint64_t rx_hdr_split; | 310 | uint64_t rx_hdr_split; |
311 | uint32_t alloc_rx_buff_failed; | ||
310 | uint32_t rx_int_delay; | 312 | uint32_t rx_int_delay; |
311 | uint32_t rx_abs_int_delay; | 313 | uint32_t rx_abs_int_delay; |
312 | boolean_t rx_csum; | 314 | boolean_t rx_csum; |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index c929277dc276..791110d4bbaa 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -80,6 +80,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { | |||
80 | { "tx_deferred_ok", E1000_STAT(stats.dc) }, | 80 | { "tx_deferred_ok", E1000_STAT(stats.dc) }, |
81 | { "tx_single_coll_ok", E1000_STAT(stats.scc) }, | 81 | { "tx_single_coll_ok", E1000_STAT(stats.scc) }, |
82 | { "tx_multi_coll_ok", E1000_STAT(stats.mcc) }, | 82 | { "tx_multi_coll_ok", E1000_STAT(stats.mcc) }, |
83 | { "tx_timeout_count", E1000_STAT(tx_timeout_count) }, | ||
83 | { "rx_long_length_errors", E1000_STAT(stats.roc) }, | 84 | { "rx_long_length_errors", E1000_STAT(stats.roc) }, |
84 | { "rx_short_length_errors", E1000_STAT(stats.ruc) }, | 85 | { "rx_short_length_errors", E1000_STAT(stats.ruc) }, |
85 | { "rx_align_errors", E1000_STAT(stats.algnerrc) }, | 86 | { "rx_align_errors", E1000_STAT(stats.algnerrc) }, |
@@ -93,6 +94,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = { | |||
93 | { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, | 94 | { "rx_csum_offload_good", E1000_STAT(hw_csum_good) }, |
94 | { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, | 95 | { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, |
95 | { "rx_header_split", E1000_STAT(rx_hdr_split) }, | 96 | { "rx_header_split", E1000_STAT(rx_hdr_split) }, |
97 | { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, | ||
96 | }; | 98 | }; |
97 | #define E1000_STATS_LEN \ | 99 | #define E1000_STATS_LEN \ |
98 | sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) | 100 | sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 5b4287163e01..5f848b3a3a4d 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2902,6 +2902,7 @@ e1000_tx_timeout_task(struct net_device *netdev) | |||
2902 | { | 2902 | { |
2903 | struct e1000_adapter *adapter = netdev_priv(netdev); | 2903 | struct e1000_adapter *adapter = netdev_priv(netdev); |
2904 | 2904 | ||
2905 | adapter->tx_timeout_count++; | ||
2905 | e1000_down(adapter); | 2906 | e1000_down(adapter); |
2906 | e1000_up(adapter); | 2907 | e1000_up(adapter); |
2907 | } | 2908 | } |
@@ -2919,7 +2920,7 @@ e1000_get_stats(struct net_device *netdev) | |||
2919 | { | 2920 | { |
2920 | struct e1000_adapter *adapter = netdev_priv(netdev); | 2921 | struct e1000_adapter *adapter = netdev_priv(netdev); |
2921 | 2922 | ||
2922 | e1000_update_stats(adapter); | 2923 | /* only return the current stats */ |
2923 | return &adapter->net_stats; | 2924 | return &adapter->net_stats; |
2924 | } | 2925 | } |
2925 | 2926 | ||
@@ -3106,12 +3107,11 @@ e1000_update_stats(struct e1000_adapter *adapter) | |||
3106 | 3107 | ||
3107 | adapter->net_stats.rx_errors = adapter->stats.rxerrc + | 3108 | adapter->net_stats.rx_errors = adapter->stats.rxerrc + |
3108 | adapter->stats.crcerrs + adapter->stats.algnerrc + | 3109 | adapter->stats.crcerrs + adapter->stats.algnerrc + |
3109 | adapter->stats.rlec + adapter->stats.mpc + | 3110 | adapter->stats.rlec + adapter->stats.cexterr; |
3110 | adapter->stats.cexterr; | 3111 | adapter->net_stats.rx_dropped = 0; |
3111 | adapter->net_stats.rx_length_errors = adapter->stats.rlec; | 3112 | adapter->net_stats.rx_length_errors = adapter->stats.rlec; |
3112 | adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs; | 3113 | adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs; |
3113 | adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc; | 3114 | adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc; |
3114 | adapter->net_stats.rx_fifo_errors = adapter->stats.mpc; | ||
3115 | adapter->net_stats.rx_missed_errors = adapter->stats.mpc; | 3115 | adapter->net_stats.rx_missed_errors = adapter->stats.mpc; |
3116 | 3116 | ||
3117 | /* Tx Errors */ | 3117 | /* Tx Errors */ |