aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2012-01-29 15:17:39 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-01 14:25:04 -0500
commitd45b9d39a1aed7851948460d29b843ce70eb0a68 (patch)
treeaf1509dad9b7e2b6687ebda4f352c2ceda7631c8 /drivers
parent8ef78adcb03b1fcb53c3bd62df4e96c1d2706c58 (diff)
be2net: add descriptions for stat counters reported via ethtool
Also rename a few counters appropritely and delete 2 counters that are not implemented in HW. vlan_mismatch_drops does not exist in BE3 and is accounted for in address_mismatch_drops. Do the same thing for BE2 and Lancer. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/emulex/benet/be.h3
-rw-r--r--drivers/net/ethernet/emulex/benet/be_cmds.h10
-rw-r--r--drivers/net/ethernet/emulex/benet/be_ethtool.c64
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c15
4 files changed, 74 insertions, 18 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 453d48612f83..74aa14811977 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -265,7 +265,6 @@ struct be_drv_stats {
265 u32 rx_drops_no_erx_descr; 265 u32 rx_drops_no_erx_descr;
266 u32 rx_drops_no_tpre_descr; 266 u32 rx_drops_no_tpre_descr;
267 u32 rx_drops_too_many_frags; 267 u32 rx_drops_too_many_frags;
268 u32 rx_drops_invalid_ring;
269 u32 forwarded_packets; 268 u32 forwarded_packets;
270 u32 rx_drops_mtu; 269 u32 rx_drops_mtu;
271 u32 rx_crc_errors; 270 u32 rx_crc_errors;
@@ -276,7 +275,7 @@ struct be_drv_stats {
276 u32 rx_in_range_errors; 275 u32 rx_in_range_errors;
277 u32 rx_out_range_errors; 276 u32 rx_out_range_errors;
278 u32 rx_frame_too_long; 277 u32 rx_frame_too_long;
279 u32 rx_address_match_errors; 278 u32 rx_address_mismatch_drops;
280 u32 rx_dropped_too_small; 279 u32 rx_dropped_too_small;
281 u32 rx_dropped_too_short; 280 u32 rx_dropped_too_short;
282 u32 rx_dropped_header_too_small; 281 u32 rx_dropped_header_too_small;
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h
index dca89249088f..bbd012b41fb4 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.h
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.h
@@ -592,8 +592,8 @@ struct be_port_rxf_stats_v0 {
592 u32 rx_in_range_errors; /* dword 10*/ 592 u32 rx_in_range_errors; /* dword 10*/
593 u32 rx_out_range_errors; /* dword 11*/ 593 u32 rx_out_range_errors; /* dword 11*/
594 u32 rx_frame_too_long; /* dword 12*/ 594 u32 rx_frame_too_long; /* dword 12*/
595 u32 rx_address_match_errors; /* dword 13*/ 595 u32 rx_address_mismatch_drops; /* dword 13*/
596 u32 rx_vlan_mismatch; /* dword 14*/ 596 u32 rx_vlan_mismatch_drops; /* dword 14*/
597 u32 rx_dropped_too_small; /* dword 15*/ 597 u32 rx_dropped_too_small; /* dword 15*/
598 u32 rx_dropped_too_short; /* dword 16*/ 598 u32 rx_dropped_too_short; /* dword 16*/
599 u32 rx_dropped_header_too_small; /* dword 17*/ 599 u32 rx_dropped_header_too_small; /* dword 17*/
@@ -799,8 +799,8 @@ struct lancer_pport_stats {
799 u32 rx_control_frames_unknown_opcode_hi; 799 u32 rx_control_frames_unknown_opcode_hi;
800 u32 rx_in_range_errors; 800 u32 rx_in_range_errors;
801 u32 rx_out_of_range_errors; 801 u32 rx_out_of_range_errors;
802 u32 rx_address_match_errors; 802 u32 rx_address_mismatch_drops;
803 u32 rx_vlan_mismatch_errors; 803 u32 rx_vlan_mismatch_drops;
804 u32 rx_dropped_too_small; 804 u32 rx_dropped_too_small;
805 u32 rx_dropped_too_short; 805 u32 rx_dropped_too_short;
806 u32 rx_dropped_header_too_small; 806 u32 rx_dropped_header_too_small;
@@ -1384,7 +1384,7 @@ struct be_port_rxf_stats_v1 {
1384 u32 rx_in_range_errors; 1384 u32 rx_in_range_errors;
1385 u32 rx_out_range_errors; 1385 u32 rx_out_range_errors;
1386 u32 rx_frame_too_long; 1386 u32 rx_frame_too_long;
1387 u32 rx_address_match_errors; 1387 u32 rx_address_mismatch_drops;
1388 u32 rx_dropped_too_small; 1388 u32 rx_dropped_too_small;
1389 u32 rx_dropped_too_short; 1389 u32 rx_dropped_too_short;
1390 u32 rx_dropped_header_too_small; 1390 u32 rx_dropped_header_too_small;
diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 6db6b6ae5e9b..0a5ee224cfe2 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -42,15 +42,42 @@ static const struct be_ethtool_stat et_stats[] = {
42 {DRVSTAT_INFO(rx_alignment_symbol_errors)}, 42 {DRVSTAT_INFO(rx_alignment_symbol_errors)},
43 {DRVSTAT_INFO(rx_pause_frames)}, 43 {DRVSTAT_INFO(rx_pause_frames)},
44 {DRVSTAT_INFO(rx_control_frames)}, 44 {DRVSTAT_INFO(rx_control_frames)},
45 /* Received packets dropped when the Ethernet length field
46 * is not equal to the actual Ethernet data length.
47 */
45 {DRVSTAT_INFO(rx_in_range_errors)}, 48 {DRVSTAT_INFO(rx_in_range_errors)},
49 /* Received packets dropped when their length field is >= 1501 bytes
50 * and <= 1535 bytes.
51 */
46 {DRVSTAT_INFO(rx_out_range_errors)}, 52 {DRVSTAT_INFO(rx_out_range_errors)},
53 /* Received packets dropped when they are longer than 9216 bytes */
47 {DRVSTAT_INFO(rx_frame_too_long)}, 54 {DRVSTAT_INFO(rx_frame_too_long)},
48 {DRVSTAT_INFO(rx_address_match_errors)}, 55 /* Received packets dropped when they don't pass the unicast or
56 * multicast address filtering.
57 */
58 {DRVSTAT_INFO(rx_address_mismatch_drops)},
59 /* Received packets dropped when IP packet length field is less than
60 * the IP header length field.
61 */
49 {DRVSTAT_INFO(rx_dropped_too_small)}, 62 {DRVSTAT_INFO(rx_dropped_too_small)},
63 /* Received packets dropped when IP length field is greater than
64 * the actual packet length.
65 */
50 {DRVSTAT_INFO(rx_dropped_too_short)}, 66 {DRVSTAT_INFO(rx_dropped_too_short)},
67 /* Received packets dropped when the IP header length field is less
68 * than 5.
69 */
51 {DRVSTAT_INFO(rx_dropped_header_too_small)}, 70 {DRVSTAT_INFO(rx_dropped_header_too_small)},
71 /* Received packets dropped when the TCP header length field is less
72 * than 5 or the TCP header length + IP header length is more
73 * than IP packet length.
74 */
52 {DRVSTAT_INFO(rx_dropped_tcp_length)}, 75 {DRVSTAT_INFO(rx_dropped_tcp_length)},
53 {DRVSTAT_INFO(rx_dropped_runt)}, 76 {DRVSTAT_INFO(rx_dropped_runt)},
77 /* Number of received packets dropped when a fifo for descriptors going
78 * into the packet demux block overflows. In normal operation, this
79 * fifo must never overflow.
80 */
54 {DRVSTAT_INFO(rxpp_fifo_overflow_drop)}, 81 {DRVSTAT_INFO(rxpp_fifo_overflow_drop)},
55 {DRVSTAT_INFO(rx_input_fifo_overflow_drop)}, 82 {DRVSTAT_INFO(rx_input_fifo_overflow_drop)},
56 {DRVSTAT_INFO(rx_ip_checksum_errs)}, 83 {DRVSTAT_INFO(rx_ip_checksum_errs)},
@@ -59,16 +86,35 @@ static const struct be_ethtool_stat et_stats[] = {
59 {DRVSTAT_INFO(tx_pauseframes)}, 86 {DRVSTAT_INFO(tx_pauseframes)},
60 {DRVSTAT_INFO(tx_controlframes)}, 87 {DRVSTAT_INFO(tx_controlframes)},
61 {DRVSTAT_INFO(rx_priority_pause_frames)}, 88 {DRVSTAT_INFO(rx_priority_pause_frames)},
89 /* Received packets dropped when an internal fifo going into
90 * main packet buffer tank (PMEM) overflows.
91 */
62 {DRVSTAT_INFO(pmem_fifo_overflow_drop)}, 92 {DRVSTAT_INFO(pmem_fifo_overflow_drop)},
63 {DRVSTAT_INFO(jabber_events)}, 93 {DRVSTAT_INFO(jabber_events)},
94 /* Received packets dropped due to lack of available HW packet buffers
95 * used to temporarily hold the received packets.
96 */
64 {DRVSTAT_INFO(rx_drops_no_pbuf)}, 97 {DRVSTAT_INFO(rx_drops_no_pbuf)},
65 {DRVSTAT_INFO(rx_drops_no_txpb)}, 98 /* Received packets dropped due to input receive buffer
99 * descriptor fifo overflowing.
100 */
66 {DRVSTAT_INFO(rx_drops_no_erx_descr)}, 101 {DRVSTAT_INFO(rx_drops_no_erx_descr)},
102 /* Packets dropped because the internal FIFO to the offloaded TCP
103 * receive processing block is full. This could happen only for
104 * offloaded iSCSI or FCoE trarffic.
105 */
67 {DRVSTAT_INFO(rx_drops_no_tpre_descr)}, 106 {DRVSTAT_INFO(rx_drops_no_tpre_descr)},
107 /* Received packets dropped when they need more than 8
108 * receive buffers. This cannot happen as the driver configures
109 * 2048 byte receive buffers.
110 */
68 {DRVSTAT_INFO(rx_drops_too_many_frags)}, 111 {DRVSTAT_INFO(rx_drops_too_many_frags)},
69 {DRVSTAT_INFO(rx_drops_invalid_ring)},
70 {DRVSTAT_INFO(forwarded_packets)}, 112 {DRVSTAT_INFO(forwarded_packets)},
113 /* Received packets dropped when the frame length
114 * is more than 9018 bytes
115 */
71 {DRVSTAT_INFO(rx_drops_mtu)}, 116 {DRVSTAT_INFO(rx_drops_mtu)},
117 /* Number of packets dropped due to random early drop function */
72 {DRVSTAT_INFO(eth_red_drops)}, 118 {DRVSTAT_INFO(eth_red_drops)},
73 {DRVSTAT_INFO(be_on_die_temperature)} 119 {DRVSTAT_INFO(be_on_die_temperature)}
74}; 120};
@@ -84,8 +130,15 @@ static const struct be_ethtool_stat et_rx_stats[] = {
84 {DRVSTAT_RX_INFO(rx_events)}, 130 {DRVSTAT_RX_INFO(rx_events)},
85 {DRVSTAT_RX_INFO(rx_compl)}, 131 {DRVSTAT_RX_INFO(rx_compl)},
86 {DRVSTAT_RX_INFO(rx_mcast_pkts)}, 132 {DRVSTAT_RX_INFO(rx_mcast_pkts)},
133 /* Number of page allocation failures while posting receive buffers
134 * to HW.
135 */
87 {DRVSTAT_RX_INFO(rx_post_fail)}, 136 {DRVSTAT_RX_INFO(rx_post_fail)},
137 /* Recevied packets dropped due to skb allocation failure */
88 {DRVSTAT_RX_INFO(rx_drops_no_skbs)}, 138 {DRVSTAT_RX_INFO(rx_drops_no_skbs)},
139 /* Received packets dropped due to lack of available fetched buffers
140 * posted by the driver.
141 */
89 {DRVSTAT_RX_INFO(rx_drops_no_frags)} 142 {DRVSTAT_RX_INFO(rx_drops_no_frags)}
90}; 143};
91#define ETHTOOL_RXSTATS_NUM (ARRAY_SIZE(et_rx_stats)) 144#define ETHTOOL_RXSTATS_NUM (ARRAY_SIZE(et_rx_stats))
@@ -97,9 +150,14 @@ static const struct be_ethtool_stat et_tx_stats[] = {
97 {DRVSTAT_TX_INFO(tx_compl)}, /* If moving this member see above note */ 150 {DRVSTAT_TX_INFO(tx_compl)}, /* If moving this member see above note */
98 {DRVSTAT_TX_INFO(tx_bytes)}, 151 {DRVSTAT_TX_INFO(tx_bytes)},
99 {DRVSTAT_TX_INFO(tx_pkts)}, 152 {DRVSTAT_TX_INFO(tx_pkts)},
153 /* Number of skbs queued for trasmission by the driver */
100 {DRVSTAT_TX_INFO(tx_reqs)}, 154 {DRVSTAT_TX_INFO(tx_reqs)},
155 /* Number of TX work request blocks DMAed to HW */
101 {DRVSTAT_TX_INFO(tx_wrbs)}, 156 {DRVSTAT_TX_INFO(tx_wrbs)},
102 {DRVSTAT_TX_INFO(tx_compl)}, 157 {DRVSTAT_TX_INFO(tx_compl)},
158 /* Number of times the TX queue was stopped due to lack
159 * of spaces in the TXQ.
160 */
103 {DRVSTAT_TX_INFO(tx_stops)} 161 {DRVSTAT_TX_INFO(tx_stops)}
104}; 162};
105#define ETHTOOL_TXSTATS_NUM (ARRAY_SIZE(et_tx_stats)) 163#define ETHTOOL_TXSTATS_NUM (ARRAY_SIZE(et_tx_stats))
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 0fbf365f5c62..1395f803cf7f 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -286,7 +286,9 @@ static void populate_be2_stats(struct be_adapter *adapter)
286 drvs->rx_input_fifo_overflow_drop = port_stats->rx_input_fifo_overflow; 286 drvs->rx_input_fifo_overflow_drop = port_stats->rx_input_fifo_overflow;
287 drvs->rx_dropped_header_too_small = 287 drvs->rx_dropped_header_too_small =
288 port_stats->rx_dropped_header_too_small; 288 port_stats->rx_dropped_header_too_small;
289 drvs->rx_address_match_errors = port_stats->rx_address_match_errors; 289 drvs->rx_address_mismatch_drops =
290 port_stats->rx_address_mismatch_drops +
291 port_stats->rx_vlan_mismatch_drops;
290 drvs->rx_alignment_symbol_errors = 292 drvs->rx_alignment_symbol_errors =
291 port_stats->rx_alignment_symbol_errors; 293 port_stats->rx_alignment_symbol_errors;
292 294
@@ -298,9 +300,7 @@ static void populate_be2_stats(struct be_adapter *adapter)
298 else 300 else
299 drvs->jabber_events = rxf_stats->port0_jabber_events; 301 drvs->jabber_events = rxf_stats->port0_jabber_events;
300 drvs->rx_drops_no_pbuf = rxf_stats->rx_drops_no_pbuf; 302 drvs->rx_drops_no_pbuf = rxf_stats->rx_drops_no_pbuf;
301 drvs->rx_drops_no_txpb = rxf_stats->rx_drops_no_txpb;
302 drvs->rx_drops_no_erx_descr = rxf_stats->rx_drops_no_erx_descr; 303 drvs->rx_drops_no_erx_descr = rxf_stats->rx_drops_no_erx_descr;
303 drvs->rx_drops_invalid_ring = rxf_stats->rx_drops_invalid_ring;
304 drvs->forwarded_packets = rxf_stats->forwarded_packets; 304 drvs->forwarded_packets = rxf_stats->forwarded_packets;
305 drvs->rx_drops_mtu = rxf_stats->rx_drops_mtu; 305 drvs->rx_drops_mtu = rxf_stats->rx_drops_mtu;
306 drvs->rx_drops_no_tpre_descr = rxf_stats->rx_drops_no_tpre_descr; 306 drvs->rx_drops_no_tpre_descr = rxf_stats->rx_drops_no_tpre_descr;
@@ -337,7 +337,7 @@ static void populate_be3_stats(struct be_adapter *adapter)
337 port_stats->rx_dropped_header_too_small; 337 port_stats->rx_dropped_header_too_small;
338 drvs->rx_input_fifo_overflow_drop = 338 drvs->rx_input_fifo_overflow_drop =
339 port_stats->rx_input_fifo_overflow_drop; 339 port_stats->rx_input_fifo_overflow_drop;
340 drvs->rx_address_match_errors = port_stats->rx_address_match_errors; 340 drvs->rx_address_mismatch_drops = port_stats->rx_address_mismatch_drops;
341 drvs->rx_alignment_symbol_errors = 341 drvs->rx_alignment_symbol_errors =
342 port_stats->rx_alignment_symbol_errors; 342 port_stats->rx_alignment_symbol_errors;
343 drvs->rxpp_fifo_overflow_drop = port_stats->rxpp_fifo_overflow_drop; 343 drvs->rxpp_fifo_overflow_drop = port_stats->rxpp_fifo_overflow_drop;
@@ -345,9 +345,7 @@ static void populate_be3_stats(struct be_adapter *adapter)
345 drvs->tx_controlframes = port_stats->tx_controlframes; 345 drvs->tx_controlframes = port_stats->tx_controlframes;
346 drvs->jabber_events = port_stats->jabber_events; 346 drvs->jabber_events = port_stats->jabber_events;
347 drvs->rx_drops_no_pbuf = rxf_stats->rx_drops_no_pbuf; 347 drvs->rx_drops_no_pbuf = rxf_stats->rx_drops_no_pbuf;
348 drvs->rx_drops_no_txpb = rxf_stats->rx_drops_no_txpb;
349 drvs->rx_drops_no_erx_descr = rxf_stats->rx_drops_no_erx_descr; 348 drvs->rx_drops_no_erx_descr = rxf_stats->rx_drops_no_erx_descr;
350 drvs->rx_drops_invalid_ring = rxf_stats->rx_drops_invalid_ring;
351 drvs->forwarded_packets = rxf_stats->forwarded_packets; 349 drvs->forwarded_packets = rxf_stats->forwarded_packets;
352 drvs->rx_drops_mtu = rxf_stats->rx_drops_mtu; 350 drvs->rx_drops_mtu = rxf_stats->rx_drops_mtu;
353 drvs->rx_drops_no_tpre_descr = rxf_stats->rx_drops_no_tpre_descr; 351 drvs->rx_drops_no_tpre_descr = rxf_stats->rx_drops_no_tpre_descr;
@@ -380,13 +378,14 @@ static void populate_lancer_stats(struct be_adapter *adapter)
380 drvs->rx_dropped_header_too_small = 378 drvs->rx_dropped_header_too_small =
381 pport_stats->rx_dropped_header_too_small; 379 pport_stats->rx_dropped_header_too_small;
382 drvs->rx_input_fifo_overflow_drop = pport_stats->rx_fifo_overflow; 380 drvs->rx_input_fifo_overflow_drop = pport_stats->rx_fifo_overflow;
383 drvs->rx_address_match_errors = pport_stats->rx_address_match_errors; 381 drvs->rx_address_mismatch_drops =
382 pport_stats->rx_address_mismatch_drops +
383 pport_stats->rx_vlan_mismatch_drops;
384 drvs->rx_alignment_symbol_errors = pport_stats->rx_symbol_errors_lo; 384 drvs->rx_alignment_symbol_errors = pport_stats->rx_symbol_errors_lo;
385 drvs->rxpp_fifo_overflow_drop = pport_stats->rx_fifo_overflow; 385 drvs->rxpp_fifo_overflow_drop = pport_stats->rx_fifo_overflow;
386 drvs->tx_pauseframes = pport_stats->tx_pause_frames_lo; 386 drvs->tx_pauseframes = pport_stats->tx_pause_frames_lo;
387 drvs->tx_controlframes = pport_stats->tx_control_frames_lo; 387 drvs->tx_controlframes = pport_stats->tx_control_frames_lo;
388 drvs->jabber_events = pport_stats->rx_jabbers; 388 drvs->jabber_events = pport_stats->rx_jabbers;
389 drvs->rx_drops_invalid_ring = pport_stats->rx_drops_invalid_queue;
390 drvs->forwarded_packets = pport_stats->num_forwards_lo; 389 drvs->forwarded_packets = pport_stats->num_forwards_lo;
391 drvs->rx_drops_mtu = pport_stats->rx_drops_mtu_lo; 390 drvs->rx_drops_mtu = pport_stats->rx_drops_mtu_lo;
392 drvs->rx_drops_too_many_frags = 391 drvs->rx_drops_too_many_frags =