forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
7892f59c5e
commit
6b7660cd4d
|
@ -275,6 +275,7 @@ struct e1000_adapter {
|
|||
uint64_t gotcl_old;
|
||||
uint64_t tpt_old;
|
||||
uint64_t colc_old;
|
||||
uint32_t tx_timeout_count;
|
||||
uint32_t tx_fifo_head;
|
||||
uint32_t tx_head_addr;
|
||||
uint32_t tx_fifo_size;
|
||||
|
@ -307,6 +308,7 @@ struct e1000_adapter {
|
|||
uint64_t hw_csum_err;
|
||||
uint64_t hw_csum_good;
|
||||
uint64_t rx_hdr_split;
|
||||
uint32_t alloc_rx_buff_failed;
|
||||
uint32_t rx_int_delay;
|
||||
uint32_t rx_abs_int_delay;
|
||||
boolean_t rx_csum;
|
||||
|
|
|
@ -80,6 +80,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
|
|||
{ "tx_deferred_ok", E1000_STAT(stats.dc) },
|
||||
{ "tx_single_coll_ok", E1000_STAT(stats.scc) },
|
||||
{ "tx_multi_coll_ok", E1000_STAT(stats.mcc) },
|
||||
{ "tx_timeout_count", E1000_STAT(tx_timeout_count) },
|
||||
{ "rx_long_length_errors", E1000_STAT(stats.roc) },
|
||||
{ "rx_short_length_errors", E1000_STAT(stats.ruc) },
|
||||
{ "rx_align_errors", E1000_STAT(stats.algnerrc) },
|
||||
|
@ -93,6 +94,7 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
|
|||
{ "rx_csum_offload_good", E1000_STAT(hw_csum_good) },
|
||||
{ "rx_csum_offload_errors", E1000_STAT(hw_csum_err) },
|
||||
{ "rx_header_split", E1000_STAT(rx_hdr_split) },
|
||||
{ "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) },
|
||||
};
|
||||
#define E1000_STATS_LEN \
|
||||
sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats)
|
||||
|
|
|
@ -2902,6 +2902,7 @@ e1000_tx_timeout_task(struct net_device *netdev)
|
|||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
adapter->tx_timeout_count++;
|
||||
e1000_down(adapter);
|
||||
e1000_up(adapter);
|
||||
}
|
||||
|
@ -2919,7 +2920,7 @@ e1000_get_stats(struct net_device *netdev)
|
|||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
e1000_update_stats(adapter);
|
||||
/* only return the current stats */
|
||||
return &adapter->net_stats;
|
||||
}
|
||||
|
||||
|
@ -3106,12 +3107,11 @@ e1000_update_stats(struct e1000_adapter *adapter)
|
|||
|
||||
adapter->net_stats.rx_errors = adapter->stats.rxerrc +
|
||||
adapter->stats.crcerrs + adapter->stats.algnerrc +
|
||||
adapter->stats.rlec + adapter->stats.mpc +
|
||||
adapter->stats.cexterr;
|
||||
adapter->stats.rlec + adapter->stats.cexterr;
|
||||
adapter->net_stats.rx_dropped = 0;
|
||||
adapter->net_stats.rx_length_errors = adapter->stats.rlec;
|
||||
adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs;
|
||||
adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc;
|
||||
adapter->net_stats.rx_fifo_errors = adapter->stats.mpc;
|
||||
adapter->net_stats.rx_missed_errors = adapter->stats.mpc;
|
||||
|
||||
/* Tx Errors */
|
||||
|
|
Loading…
Reference in New Issue
Block a user