aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x.h
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-02-12 03:36:33 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-16 02:31:12 -0500
commitde832a55d28bdcc38a3f3c160554d2dfa5a62069 (patch)
tree21df2b3da20af907b36fa30e1229e4e87ee235a9 /drivers/net/bnx2x.h
parentd3d4f49527249e87d11219a22469dff25b674c08 (diff)
bnx2x: Per queue statistics
Re-ordering the statistics to enhance readability and adding per queue statistics (available via ethtool -S) Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x.h')
-rw-r--r--drivers/net/bnx2x.h67
1 files changed, 57 insertions, 10 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
index cfbeabb8e5ea..b411497a4fd3 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -189,6 +189,43 @@ struct sw_rx_page {
189#define NEXT_SGE_MASK_ELEM(el) (((el) + 1) & RX_SGE_MASK_LEN_MASK) 189#define NEXT_SGE_MASK_ELEM(el) (((el) + 1) & RX_SGE_MASK_LEN_MASK)
190 190
191 191
192struct bnx2x_eth_q_stats {
193 u32 total_bytes_received_hi;
194 u32 total_bytes_received_lo;
195 u32 total_bytes_transmitted_hi;
196 u32 total_bytes_transmitted_lo;
197 u32 total_unicast_packets_received_hi;
198 u32 total_unicast_packets_received_lo;
199 u32 total_multicast_packets_received_hi;
200 u32 total_multicast_packets_received_lo;
201 u32 total_broadcast_packets_received_hi;
202 u32 total_broadcast_packets_received_lo;
203 u32 total_unicast_packets_transmitted_hi;
204 u32 total_unicast_packets_transmitted_lo;
205 u32 total_multicast_packets_transmitted_hi;
206 u32 total_multicast_packets_transmitted_lo;
207 u32 total_broadcast_packets_transmitted_hi;
208 u32 total_broadcast_packets_transmitted_lo;
209 u32 valid_bytes_received_hi;
210 u32 valid_bytes_received_lo;
211
212 u32 error_bytes_received_hi;
213 u32 error_bytes_received_lo;
214 u32 etherstatsoverrsizepkts_hi;
215 u32 etherstatsoverrsizepkts_lo;
216 u32 no_buff_discard_hi;
217 u32 no_buff_discard_lo;
218
219 u32 driver_xoff;
220 u32 rx_err_discard_pkt;
221 u32 rx_skb_alloc_failed;
222 u32 hw_csum_err;
223};
224
225#define BNX2X_NUM_Q_STATS 11
226#define Q_STATS_OFFSET32(stat_name) \
227 (offsetof(struct bnx2x_eth_q_stats, stat_name) / 4)
228
192struct bnx2x_fastpath { 229struct bnx2x_fastpath {
193 230
194 struct napi_struct napi; 231 struct napi_struct napi;
@@ -268,6 +305,11 @@ struct bnx2x_fastpath {
268 u64 tpa_queue_used; 305 u64 tpa_queue_used;
269#endif 306#endif
270 307
308 struct tstorm_per_client_stats old_tclient;
309 struct ustorm_per_client_stats old_uclient;
310 struct xstorm_per_client_stats old_xclient;
311 struct bnx2x_eth_q_stats eth_q_stats;
312
271 char name[IFNAMSIZ]; 313 char name[IFNAMSIZ];
272 struct bnx2x *bp; /* parent */ 314 struct bnx2x *bp; /* parent */
273}; 315};
@@ -576,6 +618,10 @@ struct bnx2x_eth_stats {
576 618
577 u32 error_bytes_received_hi; 619 u32 error_bytes_received_hi;
578 u32 error_bytes_received_lo; 620 u32 error_bytes_received_lo;
621 u32 etherstatsoverrsizepkts_hi;
622 u32 etherstatsoverrsizepkts_lo;
623 u32 no_buff_discard_hi;
624 u32 no_buff_discard_lo;
579 625
580 u32 rx_stat_ifhcinbadoctets_hi; 626 u32 rx_stat_ifhcinbadoctets_hi;
581 u32 rx_stat_ifhcinbadoctets_lo; 627 u32 rx_stat_ifhcinbadoctets_lo;
@@ -654,19 +700,20 @@ struct bnx2x_eth_stats {
654 u32 tx_stat_bmac_ufl_hi; 700 u32 tx_stat_bmac_ufl_hi;
655 u32 tx_stat_bmac_ufl_lo; 701 u32 tx_stat_bmac_ufl_lo;
656 702
657 u32 brb_drop_hi; 703 u32 pause_frames_received_hi;
658 u32 brb_drop_lo; 704 u32 pause_frames_received_lo;
659 u32 brb_truncate_hi; 705 u32 pause_frames_sent_hi;
660 u32 brb_truncate_lo; 706 u32 pause_frames_sent_lo;
661
662 u32 jabber_packets_received;
663 707
664 u32 etherstatspkts1024octetsto1522octets_hi; 708 u32 etherstatspkts1024octetsto1522octets_hi;
665 u32 etherstatspkts1024octetsto1522octets_lo; 709 u32 etherstatspkts1024octetsto1522octets_lo;
666 u32 etherstatspktsover1522octets_hi; 710 u32 etherstatspktsover1522octets_hi;
667 u32 etherstatspktsover1522octets_lo; 711 u32 etherstatspktsover1522octets_lo;
668 712
669 u32 no_buff_discard; 713 u32 brb_drop_hi;
714 u32 brb_drop_lo;
715 u32 brb_truncate_hi;
716 u32 brb_truncate_lo;
670 717
671 u32 mac_filter_discard; 718 u32 mac_filter_discard;
672 u32 xxoverflow_discard; 719 u32 xxoverflow_discard;
@@ -677,8 +724,11 @@ struct bnx2x_eth_stats {
677 u32 rx_err_discard_pkt; 724 u32 rx_err_discard_pkt;
678 u32 rx_skb_alloc_failed; 725 u32 rx_skb_alloc_failed;
679 u32 hw_csum_err; 726 u32 hw_csum_err;
727
728 u32 nig_timer_max;
680}; 729};
681 730
731#define BNX2X_NUM_STATS 41
682#define STATS_OFFSET32(stat_name) \ 732#define STATS_OFFSET32(stat_name) \
683 (offsetof(struct bnx2x_eth_stats, stat_name) / 4) 733 (offsetof(struct bnx2x_eth_stats, stat_name) / 4)
684 734
@@ -906,8 +956,6 @@ struct bnx2x {
906 int executer_idx; 956 int executer_idx;
907 957
908 u16 stats_counter; 958 u16 stats_counter;
909 struct tstorm_per_client_stats old_tclient;
910 struct xstorm_per_client_stats old_xclient;
911 struct bnx2x_eth_stats eth_stats; 959 struct bnx2x_eth_stats eth_stats;
912 960
913 struct z_stream_s *strm; 961 struct z_stream_s *strm;
@@ -1008,7 +1056,6 @@ static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms,
1008#define PCICFG_LINK_SPEED_SHIFT 16 1056#define PCICFG_LINK_SPEED_SHIFT 16
1009 1057
1010 1058
1011#define BNX2X_NUM_STATS 42
1012#define BNX2X_NUM_TESTS 7 1059#define BNX2X_NUM_TESTS 7
1013 1060
1014#define BNX2X_MAC_LOOPBACK 0 1061#define BNX2X_MAC_LOOPBACK 0