2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
5 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License (GPL) Version 2 as
9 * published by the Free Software Foundation
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
17 #ifndef __PHYPORT_DEFS_H__
18 #define __PHYPORT_DEFS_H__
20 #define BNA_TXF_ID_MAX 64
21 #define BNA_RXF_ID_MAX 64
28 * TxF Frame Statistics
30 struct bna_stats_txf {
44 u64 filter_vlan; /* frames filtered due to VLAN */
45 u64 filter_mac_sa; /* frames filtered due to SA check */
49 * RxF Frame Statistics
51 struct bna_stats_rxf {
67 * FC Tx Frame Statistics
69 struct bna_stats_fc_tx {
82 u64 txf_parity_errors;
84 u64 txf_fid_parity_errors;
88 * FC Rx Frame Statistics
90 struct bna_stats_fc_rx {
105 * RAD Frame Statistics
107 struct cna_stats_rad {
130 struct cna_stats_bpc_tx {
132 u64 tx_zero_pause[8]; /* Pause cancellation */
133 u64 tx_first_pause[8]; /* Pause initiation rather
140 struct cna_stats_bpc_rx {
142 u64 rx_zero_pause[8]; /* Pause cancellation */
143 u64 rx_first_pause[8]; /* Pause initiation rather
150 struct cna_stats_mac_rx {
151 u64 frame_64; /* both rx and tx counter */
152 u64 frame_65_127; /* both rx and tx counter */
153 u64 frame_128_255; /* both rx and tx counter */
154 u64 frame_256_511; /* both rx and tx counter */
155 u64 frame_512_1023; /* both rx and tx counter */
156 u64 frame_1024_1518; /* both rx and tx counter */
157 u64 frame_1518_1522; /* both rx and tx counter */
163 u64 rx_control_frames;
165 u64 rx_unknown_opcode;
166 u64 rx_alignment_error;
167 u64 rx_frame_length_error;
169 u64 rx_carrier_sense_error;
180 struct cna_stats_mac_tx {
187 u64 tx_excessive_deferral;
188 u64 tx_single_collision;
189 u64 tx_muliple_collision;
190 u64 tx_late_collision;
191 u64 tx_excessive_collision;
192 u64 tx_total_collision;
193 u64 tx_pause_honored;
197 u64 tx_control_frame;
204 * Complete statistics
207 struct cna_stats_mac_rx mac_rx_stats;
208 struct cna_stats_bpc_rx bpc_rx_stats;
209 struct cna_stats_rad rad_stats;
210 struct bna_stats_fc_rx fc_rx_stats;
211 struct cna_stats_mac_tx mac_tx_stats;
212 struct cna_stats_bpc_tx bpc_tx_stats;
213 struct bna_stats_fc_tx fc_tx_stats;
214 struct bna_stats_rxf rxf_stats[BNA_TXF_ID_MAX];
215 struct bna_stats_txf txf_stats[BNA_RXF_ID_MAX];