aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_ethtool.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-10-27 11:52:27 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 04:20:29 -0400
commit04a5fcaaf0e12d066411aa54e42591952aa18da7 (patch)
treee528d31a9aef81301340a9ef2d6367b2832ab2e7 /drivers/net/igb/igb_ethtool.c
parent4c844851d15cc08d995179ab5118172711be6eb0 (diff)
igb: move alloc_failed and csum_err stats into per rx-ring stat
The allocation failed and checksum error stats are currently kept as a global stat. If we end up allocating the queues to multiple netdevs then the global counter doesn't make much sense. For this reason I felt it necessary to move the alloc_rx_buff_failed stat into the rx_stats portion of the rx_ring. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r--drivers/net/igb/igb_ethtool.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index c48a555bda2c..f62430b1f759 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -84,7 +84,6 @@ static const struct igb_stats igb_gstrings_stats[] = {
84 { "tx_single_coll_ok", IGB_STAT(stats.scc) }, 84 { "tx_single_coll_ok", IGB_STAT(stats.scc) },
85 { "tx_multi_coll_ok", IGB_STAT(stats.mcc) }, 85 { "tx_multi_coll_ok", IGB_STAT(stats.mcc) },
86 { "tx_timeout_count", IGB_STAT(tx_timeout_count) }, 86 { "tx_timeout_count", IGB_STAT(tx_timeout_count) },
87 { "tx_restart_queue", IGB_STAT(restart_queue) },
88 { "rx_long_length_errors", IGB_STAT(stats.roc) }, 87 { "rx_long_length_errors", IGB_STAT(stats.roc) },
89 { "rx_short_length_errors", IGB_STAT(stats.ruc) }, 88 { "rx_short_length_errors", IGB_STAT(stats.ruc) },
90 { "rx_align_errors", IGB_STAT(stats.algnerrc) }, 89 { "rx_align_errors", IGB_STAT(stats.algnerrc) },
@@ -95,9 +94,7 @@ static const struct igb_stats igb_gstrings_stats[] = {
95 { "tx_flow_control_xon", IGB_STAT(stats.xontxc) }, 94 { "tx_flow_control_xon", IGB_STAT(stats.xontxc) },
96 { "tx_flow_control_xoff", IGB_STAT(stats.xofftxc) }, 95 { "tx_flow_control_xoff", IGB_STAT(stats.xofftxc) },
97 { "rx_long_byte_count", IGB_STAT(stats.gorc) }, 96 { "rx_long_byte_count", IGB_STAT(stats.gorc) },
98 { "rx_csum_offload_errors", IGB_STAT(hw_csum_err) },
99 { "tx_dma_out_of_sync", IGB_STAT(stats.doosync) }, 97 { "tx_dma_out_of_sync", IGB_STAT(stats.doosync) },
100 { "alloc_rx_buff_failed", IGB_STAT(alloc_rx_buff_failed) },
101 { "tx_smbus", IGB_STAT(stats.mgptc) }, 98 { "tx_smbus", IGB_STAT(stats.mgptc) },
102 { "rx_smbus", IGB_STAT(stats.mgprc) }, 99 { "rx_smbus", IGB_STAT(stats.mgprc) },
103 { "dropped_smbus", IGB_STAT(stats.mgpdc) }, 100 { "dropped_smbus", IGB_STAT(stats.mgpdc) },
@@ -2031,6 +2028,8 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
2031 p += ETH_GSTRING_LEN; 2028 p += ETH_GSTRING_LEN;
2032 sprintf(p, "tx_queue_%u_bytes", i); 2029 sprintf(p, "tx_queue_%u_bytes", i);
2033 p += ETH_GSTRING_LEN; 2030 p += ETH_GSTRING_LEN;
2031 sprintf(p, "tx_queue_%u_restart", i);
2032 p += ETH_GSTRING_LEN;
2034 } 2033 }
2035 for (i = 0; i < adapter->num_rx_queues; i++) { 2034 for (i = 0; i < adapter->num_rx_queues; i++) {
2036 sprintf(p, "rx_queue_%u_packets", i); 2035 sprintf(p, "rx_queue_%u_packets", i);
@@ -2039,6 +2038,10 @@ static void igb_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
2039 p += ETH_GSTRING_LEN; 2038 p += ETH_GSTRING_LEN;
2040 sprintf(p, "rx_queue_%u_drops", i); 2039 sprintf(p, "rx_queue_%u_drops", i);
2041 p += ETH_GSTRING_LEN; 2040 p += ETH_GSTRING_LEN;
2041 sprintf(p, "rx_queue_%u_csum_err", i);
2042 p += ETH_GSTRING_LEN;
2043 sprintf(p, "rx_queue_%u_alloc_failed", i);
2044 p += ETH_GSTRING_LEN;
2042 } 2045 }
2043/* BUG_ON(p - data != IGB_STATS_LEN * ETH_GSTRING_LEN); */ 2046/* BUG_ON(p - data != IGB_STATS_LEN * ETH_GSTRING_LEN); */
2044 break; 2047 break;