aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2006-09-27 15:53:37 -0400
committerAuke Kok <juke-jan.h.kok@intel.com>2006-09-27 15:53:37 -0400
commit49559854c9ea6d6950631d558d33faff49fa74f3 (patch)
tree555e34f173fccb3d6802e3affe9dafd4cea299c4
parent35574764c7eafab4ec0aa92c18a78a51acc8a710 (diff)
e1000: add multicast stats counters
Add 4 multicast and broadcast hardware counters (rx/tx), and eliminate as many non-hardware counters as possible. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
-rw-r--r--drivers/net/e1000/e1000_ethtool.c32
-rw-r--r--drivers/net/e1000/e1000_hw.h4
-rw-r--r--drivers/net/e1000/e1000_main.c9
3 files changed, 25 insertions, 20 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 858c14d3ee91..9791b8a1a096 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -56,26 +56,30 @@ struct e1000_stats {
56#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \ 56#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \
57 offsetof(struct e1000_adapter, m) 57 offsetof(struct e1000_adapter, m)
58static const struct e1000_stats e1000_gstrings_stats[] = { 58static const struct e1000_stats e1000_gstrings_stats[] = {
59 { "rx_packets", E1000_STAT(net_stats.rx_packets) }, 59 { "rx_packets", E1000_STAT(stats.gprc) },
60 { "tx_packets", E1000_STAT(net_stats.tx_packets) }, 60 { "tx_packets", E1000_STAT(stats.gptc) },
61 { "rx_bytes", E1000_STAT(net_stats.rx_bytes) }, 61 { "rx_bytes", E1000_STAT(stats.gorcl) },
62 { "tx_bytes", E1000_STAT(net_stats.tx_bytes) }, 62 { "tx_bytes", E1000_STAT(stats.gotcl) },
63 { "rx_errors", E1000_STAT(net_stats.rx_errors) }, 63 { "rx_broadcast", E1000_STAT(stats.bprc) },
64 { "tx_errors", E1000_STAT(net_stats.tx_errors) }, 64 { "tx_broadcast", E1000_STAT(stats.bptc) },
65 { "rx_multicast", E1000_STAT(stats.mprc) },
66 { "tx_multicast", E1000_STAT(stats.mptc) },
67 { "rx_errors", E1000_STAT(stats.rxerrc) },
68 { "tx_errors", E1000_STAT(stats.txerrc) },
65 { "tx_dropped", E1000_STAT(net_stats.tx_dropped) }, 69 { "tx_dropped", E1000_STAT(net_stats.tx_dropped) },
66 { "multicast", E1000_STAT(net_stats.multicast) }, 70 { "multicast", E1000_STAT(stats.mprc) },
67 { "collisions", E1000_STAT(net_stats.collisions) }, 71 { "collisions", E1000_STAT(stats.colc) },
68 { "rx_length_errors", E1000_STAT(net_stats.rx_length_errors) }, 72 { "rx_length_errors", E1000_STAT(stats.rlerrc) },
69 { "rx_over_errors", E1000_STAT(net_stats.rx_over_errors) }, 73 { "rx_over_errors", E1000_STAT(net_stats.rx_over_errors) },
70 { "rx_crc_errors", E1000_STAT(net_stats.rx_crc_errors) }, 74 { "rx_crc_errors", E1000_STAT(stats.crcerrs) },
71 { "rx_frame_errors", E1000_STAT(net_stats.rx_frame_errors) }, 75 { "rx_frame_errors", E1000_STAT(net_stats.rx_frame_errors) },
72 { "rx_no_buffer_count", E1000_STAT(stats.rnbc) }, 76 { "rx_no_buffer_count", E1000_STAT(stats.rnbc) },
73 { "rx_missed_errors", E1000_STAT(net_stats.rx_missed_errors) }, 77 { "rx_missed_errors", E1000_STAT(stats.mpc) },
74 { "tx_aborted_errors", E1000_STAT(net_stats.tx_aborted_errors) }, 78 { "tx_aborted_errors", E1000_STAT(stats.ecol) },
75 { "tx_carrier_errors", E1000_STAT(net_stats.tx_carrier_errors) }, 79 { "tx_carrier_errors", E1000_STAT(stats.tncrs) },
76 { "tx_fifo_errors", E1000_STAT(net_stats.tx_fifo_errors) }, 80 { "tx_fifo_errors", E1000_STAT(net_stats.tx_fifo_errors) },
77 { "tx_heartbeat_errors", E1000_STAT(net_stats.tx_heartbeat_errors) }, 81 { "tx_heartbeat_errors", E1000_STAT(net_stats.tx_heartbeat_errors) },
78 { "tx_window_errors", E1000_STAT(net_stats.tx_window_errors) }, 82 { "tx_window_errors", E1000_STAT(stats.latecol) },
79 { "tx_abort_late_coll", E1000_STAT(stats.latecol) }, 83 { "tx_abort_late_coll", E1000_STAT(stats.latecol) },
80 { "tx_deferred_ok", E1000_STAT(stats.dc) }, 84 { "tx_deferred_ok", E1000_STAT(stats.dc) },
81 { "tx_single_coll_ok", E1000_STAT(stats.scc) }, 85 { "tx_single_coll_ok", E1000_STAT(stats.scc) },
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 47f34f213ac5..113344eb0e92 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1298,6 +1298,7 @@ struct e1000_hw_stats {
1298 uint64_t algnerrc; 1298 uint64_t algnerrc;
1299 uint64_t symerrs; 1299 uint64_t symerrs;
1300 uint64_t rxerrc; 1300 uint64_t rxerrc;
1301 uint64_t txerrc;
1301 uint64_t mpc; 1302 uint64_t mpc;
1302 uint64_t scc; 1303 uint64_t scc;
1303 uint64_t ecol; 1304 uint64_t ecol;
@@ -1330,8 +1331,9 @@ struct e1000_hw_stats {
1330 uint64_t gotch; 1331 uint64_t gotch;
1331 uint64_t rnbc; 1332 uint64_t rnbc;
1332 uint64_t ruc; 1333 uint64_t ruc;
1333 uint64_t rfc;
1334 uint64_t roc; 1334 uint64_t roc;
1335 uint64_t rlerrc;
1336 uint64_t rfc;
1335 uint64_t rjc; 1337 uint64_t rjc;
1336 uint64_t mgprc; 1338 uint64_t mgprc;
1337 uint64_t mgpdc; 1339 uint64_t mgpdc;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 447b7c8a77b1..5296a82c22b8 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3338,16 +3338,15 @@ e1000_update_stats(struct e1000_adapter *adapter)
3338 adapter->stats.crcerrs + adapter->stats.algnerrc + 3338 adapter->stats.crcerrs + adapter->stats.algnerrc +
3339 adapter->stats.ruc + adapter->stats.roc + 3339 adapter->stats.ruc + adapter->stats.roc +
3340 adapter->stats.cexterr; 3340 adapter->stats.cexterr;
3341 adapter->net_stats.rx_length_errors = adapter->stats.ruc + 3341 adapter->stats.rlerrc = adapter->stats.ruc + adapter->stats.roc;
3342 adapter->stats.roc; 3342 adapter->net_stats.rx_length_errors = adapter->stats.rlerrc;
3343 adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs; 3343 adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs;
3344 adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc; 3344 adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc;
3345 adapter->net_stats.rx_missed_errors = adapter->stats.mpc; 3345 adapter->net_stats.rx_missed_errors = adapter->stats.mpc;
3346 3346
3347 /* Tx Errors */ 3347 /* Tx Errors */
3348 3348 adapter->stats.txerrc = adapter->stats.ecol + adapter->stats.latecol;
3349 adapter->net_stats.tx_errors = adapter->stats.ecol + 3349 adapter->net_stats.tx_errors = adapter->stats.txerrc;
3350 adapter->stats.latecol;
3351 adapter->net_stats.tx_aborted_errors = adapter->stats.ecol; 3350 adapter->net_stats.tx_aborted_errors = adapter->stats.ecol;
3352 adapter->net_stats.tx_window_errors = adapter->stats.latecol; 3351 adapter->net_stats.tx_window_errors = adapter->stats.latecol;
3353 adapter->net_stats.tx_carrier_errors = adapter->stats.tncrs; 3352 adapter->net_stats.tx_carrier_errors = adapter->stats.tncrs;