1a23fd118Syl /* 2a23fd118Syl * CDDL HEADER START 3a23fd118Syl * 4a23fd118Syl * The contents of this file are subject to the terms of the 5a23fd118Syl * Common Development and Distribution License (the "License"). 6a23fd118Syl * You may not use this file except in compliance with the License. 7a23fd118Syl * 8a23fd118Syl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9a23fd118Syl * or http://www.opensolaris.org/os/licensing. 10a23fd118Syl * See the License for the specific language governing permissions 11a23fd118Syl * and limitations under the License. 12a23fd118Syl * 13a23fd118Syl * When distributing Covered Code, include this CDDL HEADER in each 14a23fd118Syl * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15a23fd118Syl * If applicable, add the following below this CDDL HEADER, with the 16a23fd118Syl * fields enclosed by brackets "[]" replaced with your own identifying 17a23fd118Syl * information: Portions Copyright [yyyy] [name of copyright owner] 18a23fd118Syl * 19a23fd118Syl * CDDL HEADER END 20a23fd118Syl * 218347601bSyl * Copyright (c) 2002-2006 Neterion, Inc. 22a23fd118Syl */ 23a23fd118Syl 24a23fd118Syl #ifndef XGE_HAL_STATS_H 25a23fd118Syl #define XGE_HAL_STATS_H 26a23fd118Syl 27a23fd118Syl #include "xge-os-pal.h" 28a23fd118Syl #include "xge-debug.h" 29a23fd118Syl #include "xgehal-types.h" 30a23fd118Syl #include "xgehal-config.h" 31a23fd118Syl 328347601bSyl __EXTERN_BEGIN_DECLS 338347601bSyl 34a23fd118Syl /** 35a23fd118Syl * struct xge_hal_stats_hw_info_t - Xframe hardware statistics. 36a23fd118Syl * Transmit MAC Statistics: 37a23fd118Syl * 38a23fd118Syl * @tmac_frms: Count of successfully transmitted MAC 39a23fd118Syl * frames Note that this statistic may be inaccurate. The correct statistic may 40a23fd118Syl * be derived by calcualating (tmac_ttl_octets - tmac_ttl_less_fb_octets) / 8 41a23fd118Syl * 42a23fd118Syl * @tmac_data_octets: Count of data and padding octets of successfully 43a23fd118Syl * transmitted frames. 44a23fd118Syl * 45a23fd118Syl * @tmac_drop_frms: Count of frames that could not be sent for no other reason 46a23fd118Syl * than internal MAC processing. Increments once whenever the 47a23fd118Syl * transmit buffer is flushed (due to an ECC error on a memory descriptor). 48a23fd118Syl * 49a23fd118Syl * @tmac_mcst_frms: Count of successfully transmitted frames to a multicast 50a23fd118Syl * address. Does not include frames sent to the broadcast address. 51a23fd118Syl * 52a23fd118Syl * @tmac_bcst_frms: Count of successfully transmitted frames to the broadcast 53a23fd118Syl * address. 54a23fd118Syl * 55a23fd118Syl * @tmac_pause_ctrl_frms: Count of MAC PAUSE control frames that are 56a23fd118Syl * transmitted. Since, the only control frames supported by this device 57a23fd118Syl * are PAUSE frames, this register is a count of all transmitted MAC control 58a23fd118Syl * frames. 59a23fd118Syl * 60a23fd118Syl * @tmac_ttl_octets: Count of total octets of transmitted frames, including 61a23fd118Syl * framing characters. 62a23fd118Syl * 63a23fd118Syl * @tmac_ucst_frms: Count of transmitted frames containing a unicast address. 64a23fd118Syl * @tmac_nucst_frms: Count of transmitted frames containing a non-unicast 65a23fd118Syl * (broadcast, multicast) address. 66a23fd118Syl * 67a23fd118Syl * @tmac_any_err_frms: Count of transmitted frames containing any error that 68a23fd118Syl * prevents them from being passed to the network. Increments if there is an ECC 69a23fd118Syl * while reading the frame out of the transmit buffer. 70a23fd118Syl * 71a23fd118Syl * @tmac_ttl_less_fb_octets: Count of total octets of transmitted 72a23fd118Syl * frames, not including framing characters (i.e. less framing bits) 73a23fd118Syl * 74a23fd118Syl * @tmac_vld_ip_octets: Count of total octets of transmitted IP datagrams that 75a23fd118Syl * were passed to the network. Frames that are padded by the host have 76a23fd118Syl * their padding counted as part of the IP datagram. 77a23fd118Syl * 78a23fd118Syl * @tmac_vld_ip: Count of transmitted IP datagrams that were passed to the 79a23fd118Syl * network. 80a23fd118Syl * 81a23fd118Syl * @tmac_drop_ip: Count of transmitted IP datagrams that could not be passed to 82a23fd118Syl * the network. Increments because of 1) an internal processing error (such as 83a23fd118Syl * an uncorrectable ECC error); 2) a frame parsing error during IP checksum 84a23fd118Syl * calculation. 85a23fd118Syl * 86a23fd118Syl * @tmac_icmp: Count of transmitted ICMP messages. Includes messages not sent 87a23fd118Syl * due to problems within ICMP. 88a23fd118Syl * 89a23fd118Syl * @tmac_rst_tcp: Count of transmitted TCP segments containing the RST flag. 90a23fd118Syl * 91a23fd118Syl * @tmac_tcp: Count of transmitted TCP segments. Note that Xena has 92a23fd118Syl * no knowledge of retransmission. 93a23fd118Syl * 94a23fd118Syl * @tmac_udp: Count of transmitted UDP datagrams. 95a23fd118Syl * @reserved_0: Reserved. 96a23fd118Syl * 97a23fd118Syl * Receive MAC Statistics: 98a23fd118Syl * @rmac_vld_frms: Count of successfully received MAC frames. Does not include 99a23fd118Syl * frames received with frame-too-long, FCS, or length errors. 100a23fd118Syl * 101a23fd118Syl * @rmac_data_octets: Count of data and padding octets of successfully received 102a23fd118Syl * frames. Does not include frames received with frame-too-long, FCS, or length 103a23fd118Syl * errors. 104a23fd118Syl * 105a23fd118Syl * @rmac_fcs_err_frms: Count of received MAC frames that do not pass FCS. Does 106a23fd118Syl * not include frames received with frame-too-long or frame-too-short error. 107a23fd118Syl * 108a23fd118Syl * @rmac_drop_frms: Count of received frames that could not be passed to the 109a23fd118Syl * host because of 1) Random Early Discard (RED); 2) Frame steering algorithm 110a23fd118Syl * found no available queue; 3) Receive ingress buffer overflow. 111a23fd118Syl * 112a23fd118Syl * @rmac_vld_mcst_frms: Count of successfully received MAC frames containing a 113a23fd118Syl * multicast address. Does not include frames received with frame-too-long, FCS, 114a23fd118Syl * or length errors. 115a23fd118Syl * 116a23fd118Syl * @rmac_vld_bcst_frms: Count of successfully received MAC frames containing a 117a23fd118Syl * broadcast address. Does not include frames received with frame-too-long, FCS, 118a23fd118Syl * or length errors. 119a23fd118Syl * 120a23fd118Syl * @rmac_in_rng_len_err_frms: Count of received frames with a length/type field 121a23fd118Syl * value between 46 (42 for VLANtagged frames) and 1500 (also 1500 for 122a23fd118Syl * VLAN-tagged frames), inclusive, that does not match the number of data octets 123a23fd118Syl * (including pad) received. Also contains a count of received frames with a 124a23fd118Syl * length/type field less than 46 (42 for VLAN-tagged frames) and the number of 125a23fd118Syl * data octets (including pad) received is greater than 46 (42 for VLAN-tagged 126a23fd118Syl * frames). 127a23fd118Syl * 128a23fd118Syl * @rmac_out_rng_len_err_frms: Count of received frames with length/type field 129a23fd118Syl * between 1501 and 1535 decimal, inclusive. 130a23fd118Syl * 131a23fd118Syl * @rmac_long_frms: Count of received frames that are longer than 132a23fd118Syl * rmac_max_pyld_len + 18 bytes (+22 bytes if VLAN-tagged). 133a23fd118Syl * 134a23fd118Syl * @rmac_pause_ctrl_frms: Count of received MAC PAUSE control frames. 135a23fd118Syl * 136a23fd118Syl * @rmac_unsup_ctrl_frms: Count of received MAC control frames 137a23fd118Syl * that do not contain the PAUSE opcode. The sum of MAC_PAUSE_CTRL_FRMS and this 138a23fd118Syl * register is a count of all received MAC control frames. 139a23fd118Syl * 140a23fd118Syl * @rmac_ttl_octets: Count of total octets of received frames, including framing 141a23fd118Syl * characters. 142a23fd118Syl * 143a23fd118Syl * @rmac_accepted_ucst_frms: Count of successfully received frames 144a23fd118Syl * containing a unicast address. Only includes frames that are passed to the 145a23fd118Syl * system. 146a23fd118Syl * 147a23fd118Syl * @rmac_accepted_nucst_frms: Count of successfully received frames 148a23fd118Syl * containing a non-unicast (broadcast or multicast) address. Only includes 149a23fd118Syl * frames that are passed to the system. Could include, for instance, 150a23fd118Syl * non-unicast frames that contain FCS errors if the MAC_ERROR_CFG register is 151a23fd118Syl * set to pass FCSerrored frames to the host. 152a23fd118Syl * 153a23fd118Syl * @rmac_discarded_frms: Count of received frames containing any error that 154a23fd118Syl * prevents them from being passed to the system. Includes, for example, 155a23fd118Syl * received pause frames that are discarded by the MAC and frames discarded 156a23fd118Syl * because of their destination address. 157a23fd118Syl * 158a23fd118Syl * @rmac_drop_events: Because the RMAC drops one frame at a time, this stat 159a23fd118Syl * matches rmac_drop_frms. 160a23fd118Syl * 161a23fd118Syl * @reserved_1: Reserved. 162a23fd118Syl * @rmac_ttl_less_fb_octets: Count of total octets of received frames, 163a23fd118Syl * not including framing characters (i.e. less framing bits). 164a23fd118Syl * 165a23fd118Syl * @rmac_ttl_frms: Count of all received MAC frames, including frames received 166a23fd118Syl * with frame-too-long, FCS, or length errors. 167a23fd118Syl * 168a23fd118Syl * @reserved_2: Reserved. 169a23fd118Syl * @reserved_3: Reserved. 170a23fd118Syl * @rmac_usized_frms: Count of received frames of length (including FCS, but not 171a23fd118Syl * framing bits) less than 64 octets, that are otherwise well-formed. 172a23fd118Syl * 173a23fd118Syl * @rmac_osized_frms: Count of received frames of length (including FCS, but not 174a23fd118Syl * framing bits) more than 1518 octets, that are otherwise well-formed. 175a23fd118Syl * 176a23fd118Syl * @rmac_frag_frms: Count of received frames of length (including FCS, but not 177a23fd118Syl * framing bits) less than 64 octets that had bad FCS. In other words, counts 178a23fd118Syl * fragments (i.e. runts). 179a23fd118Syl * 180a23fd118Syl * @rmac_jabber_frms: Count of received frames of length (including FCS, but not 181a23fd118Syl * framing bits) more than MTU octets that had bad FCS. In other words, counts 182a23fd118Syl * jabbers. 183a23fd118Syl * 184a23fd118Syl * @reserved_4: Reserved. 185a23fd118Syl * @rmac_ttl_64_frms: Count of all received MAC frames with length (including 186a23fd118Syl * FCS, but not framing bits) of exactly 64 octets. Includes frames received 187a23fd118Syl * with frame-too-long, FCS, or length errors. 188a23fd118Syl * 189a23fd118Syl * @rmac_ttl_65_127_frms: Count of all received MAC frames with length 190a23fd118Syl * (including FCS, but not framing bits) of between 65 and 127 octets 191a23fd118Syl * inclusive. Includes frames received with frame-too-long, FCS, or length 192a23fd118Syl * errors. 193a23fd118Syl * @reserved_5: Reserved. 194a23fd118Syl * @rmac_ttl_128_255_frms: Count of all received MAC frames with length 195a23fd118Syl * (including FCS, but not framing bits) of between 128 and 255 octets 196a23fd118Syl * inclusive. Includes frames received with frame-too-long, FCS, or length 197a23fd118Syl * errors. 198a23fd118Syl * 199a23fd118Syl * @rmac_ttl_256_511_frms: Count of all received MAC frames with length 200a23fd118Syl * (including FCS, but not framing bits) of between 256 and 511 octets 201a23fd118Syl * inclusive. Includes frames received with frame-too-long, FCS, or length 202a23fd118Syl * errors. 203a23fd118Syl * 204a23fd118Syl * @reserved_6: Reserved. 205a23fd118Syl * @rmac_ttl_512_1023_frms: Count of all received MAC frames with length 206a23fd118Syl * (including FCS, but not framing bits) of between 512 and 1023 octets 207a23fd118Syl * inclusive. Includes frames received with frame-too-long, FCS, or length 208a23fd118Syl * errors. 209a23fd118Syl * 210a23fd118Syl * @rmac_ttl_1024_1518_frms: Count of all received MAC frames with length 211a23fd118Syl * (including FCS, but not framing bits) of between 1024 and 1518 octets 212a23fd118Syl * inclusive. Includes frames received with frame-too-long, FCS, or length 213a23fd118Syl * errors. 214a23fd118Syl * @reserved_7: Reserved. 215a23fd118Syl * @rmac_ip: Count of received IP datagrams. Includes errored IP datagrams. 216a23fd118Syl * 217a23fd118Syl * @rmac_ip_octets: Count of number of octets in received IP datagrams. Includes 218a23fd118Syl * errored IP datagrams. 219a23fd118Syl * 220a23fd118Syl * @rmac_hdr_err_ip: Count of received IP datagrams that are discarded due to IP 221a23fd118Syl * header errors. 222a23fd118Syl * 223a23fd118Syl * @rmac_drop_ip: Count of received IP datagrams that could not be passed to the 224a23fd118Syl * host because of 1) Random Early Discard (RED); 2) Frame steering algorithm 225a23fd118Syl * found no available queue; 3) Receive ingress buffer overflow. 226a23fd118Syl * @rmac_icmp: Count of received ICMP messages. Includes errored ICMP messages 227a23fd118Syl * (due to ICMP checksum fail). 228a23fd118Syl * 229a23fd118Syl * @reserved_8: Reserved. 230a23fd118Syl * @rmac_tcp: Count of received TCP segments. Since Xena is unaware of 231a23fd118Syl * connection context, counts all received TCP segments, regardless of whether 232a23fd118Syl * or not they pertain to an established connection. 233a23fd118Syl * 234a23fd118Syl * @rmac_udp: Count of received UDP datagrams. 235a23fd118Syl * @rmac_err_drp_udp: Count of received UDP datagrams that were not delivered to 236a23fd118Syl * the system because of 1) Random Early Discard (RED); 2) Frame steering 237a23fd118Syl * algorithm found no available queue; 3) Receive ingress buffer overflow. 238a23fd118Syl * 239a23fd118Syl * @rmac_xgmii_err_sym: Count of the number of symbol errors in the received 240a23fd118Syl * XGMII data (i.e. PHY indicates "Receive Error" on the XGMII). Only includes 241a23fd118Syl * symbol errors that are observed between the XGMII Start Frame Delimiter 242a23fd118Syl * and End Frame Delimiter, inclusive. And only increments the count by one for 243a23fd118Syl * each frame. 244a23fd118Syl * 245a23fd118Syl * @rmac_frms_q0: Count of number of frames that pass through queue 0 of receive 246a23fd118Syl * buffer. 247a23fd118Syl * @rmac_frms_q1: Count of number of frames that pass through queue 1 of receive 248a23fd118Syl * buffer. 249a23fd118Syl * @rmac_frms_q2: Count of number of frames that pass through queue 2 of receive 250a23fd118Syl * buffer. 251a23fd118Syl * @rmac_frms_q3: Count of number of frames that pass through queue 3 of receive 252a23fd118Syl * buffer. 253a23fd118Syl * @rmac_frms_q4: Count of number of frames that pass through queue 4 of receive 254a23fd118Syl * buffer. 255a23fd118Syl * @rmac_frms_q5: Count of number of frames that pass through queue 5 of receive 256a23fd118Syl * buffer. 257a23fd118Syl * @rmac_frms_q6: Count of number of frames that pass through queue 6 of receive 258a23fd118Syl * buffer. 259a23fd118Syl * @rmac_frms_q7: Count of number of frames that pass through queue 7 of receive 260a23fd118Syl * buffer. 261a23fd118Syl * @rmac_full_q0: Count of number of times that receive buffer queue 0 has 262a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 263a23fd118Syl * 1 when MAC receives its first frame. 264a23fd118Syl * 265a23fd118Syl * @rmac_full_q1: Count of number of times that receive buffer queue 1 has 266a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 267a23fd118Syl * 1 when MAC receives its first frame. 268a23fd118Syl * 269a23fd118Syl * @rmac_full_q2: Count of number of times that receive buffer queue 2 has 270a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 271a23fd118Syl * 1 when MAC receives its first frame. 272a23fd118Syl * 273a23fd118Syl * @rmac_full_q3: Count of number of times that receive buffer queue 3 has 274a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 275a23fd118Syl * 1 when MAC receives its first frame. 276a23fd118Syl * 277a23fd118Syl * @rmac_full_q4: Count of number of times that receive buffer queue 4 has 278a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 279a23fd118Syl * 1 when MAC receives its first frame. 280a23fd118Syl * 281a23fd118Syl * @rmac_full_q5: Count of number of times that receive buffer queue 5 has 282a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 283a23fd118Syl * 1 when MAC receives its first frame. 284a23fd118Syl * 285a23fd118Syl * @rmac_full_q6: Count of number of times that receive buffer queue 6 has 286a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 287a23fd118Syl * 1 when MAC receives its first frame. 288a23fd118Syl * 289a23fd118Syl * @rmac_full_q7: Count of number of times that receive buffer queue 7 has 290a23fd118Syl * filled up. If a queue is size 0, then this stat is incremented to a value of 291a23fd118Syl * 1 when MAC receives its first frame. 292a23fd118Syl * 293a23fd118Syl * @rmac_pause_cnt: Count of number of pause quanta that the MAC has been in the 294a23fd118Syl * paused state. Recall, one pause quantum equates to 512 bit times. 295a23fd118Syl * @reserved_9: Reserved. 296a23fd118Syl * @rmac_xgmii_data_err_cnt: This counter is incremented when either 1) The 297a23fd118Syl * Reconcilliation Sublayer (RS) is expecting one control character and gets 298a23fd118Syl * another (i.e. expecting Start control character and gets another control 299a23fd118Syl * character); 2) Start control character is not in lane 0 or lane 4; 3) The RS 300a23fd118Syl * gets a Start control character, but the start frame delimiter is not found in 301a23fd118Syl * the correct location. 302a23fd118Syl * @rmac_xgmii_ctrl_err_cnt: Maintains a count of unexpected or 303a23fd118Syl * misplaced control characters occuring outside of normal data transmission 304a23fd118Syl * (i.e. not included in RMAC_XGMII_DATA_ERR_CNT). 305a23fd118Syl * 306a23fd118Syl * @rmac_accepted_ip: Count of received IP datagrams that were passed to the 307a23fd118Syl * system. 308a23fd118Syl * 309a23fd118Syl * @rmac_err_tcp: Count of received TCP segments containing errors. For example, 310a23fd118Syl * bad TCP checksum. 311a23fd118Syl * 312a23fd118Syl * PCI (bus) Statistics: 313a23fd118Syl * @rd_req_cnt: Counts the total number of read requests made by the device. 314a23fd118Syl * @new_rd_req_cnt: Counts the requests made for a new read sequence (request 315a23fd118Syl * made for the same sequence after a retry or disconnect response are not 316a23fd118Syl * counted). 317a23fd118Syl * @new_rd_req_rtry_cnt: Counts the Retry responses received on the start of 318a23fd118Syl * the new read sequences. 319a23fd118Syl * @rd_rtry_cnt: Counts the Retry responses received for read requests. 320a23fd118Syl * @wr_rtry_rd_ack_cnt: Increments whenever a read request is accepted by 321a23fd118Syl * the target after a write request was terminated with retry. 322a23fd118Syl * @wr_req_cnt: Counts the total number of Write requests made by the device. 323a23fd118Syl * @new_wr_req_cnt: Counts the requests made for a new write sequence (request 324a23fd118Syl * made for the same sequence after a retry or disconnect response are not 325a23fd118Syl * counted). 326a23fd118Syl * @new_wr_req_rtry_cnt: Counts the requests made for a new write sequence 327a23fd118Syl * (request made for the same sequence after a retry or disconnect response are 328a23fd118Syl * not counted). 329a23fd118Syl * 330a23fd118Syl * @wr_rtry_cnt: Counts the Retry responses received for write requests. 331a23fd118Syl * @wr_disc_cnt: Write Disconnect. Counts the target initiated disconnects 332a23fd118Syl * on write transactions. 333a23fd118Syl * @rd_rtry_wr_ack_cnt: Increments whenever a write request is accepted by the 334a23fd118Syl * target after a read request was terminated with retry. 335a23fd118Syl * 336a23fd118Syl * @txp_wr_cnt: Counts the host write transactions to the Tx Pointer 337a23fd118Syl * FIFOs. 338a23fd118Syl * @txd_rd_cnt: Count of the Transmit Descriptor (TxD) read requests. 339a23fd118Syl * @txd_wr_cnt: Count of the TxD write requests. 340a23fd118Syl * @rxd_rd_cnt: Count of the Receive Descriptor (RxD) read requests. 341a23fd118Syl * @rxd_wr_cnt: Count of the RxD write requests. 342a23fd118Syl * @txf_rd_cnt: Count of transmit frame read requests. This will not 343a23fd118Syl * equal the number of frames transmitted, as frame data is typically spread 344a23fd118Syl * across multiple PCI transactions. 345a23fd118Syl * @rxf_wr_cnt: Count of receive frame write requests. 346a23fd118Syl * 3478347601bSyl * @tmac_frms_oflow: tbd 3488347601bSyl * @tmac_data_octets_oflow: tbd 3498347601bSyl * @tmac_mcst_frms_oflow: tbd 3508347601bSyl * @tmac_bcst_frms_oflow: tbd 3518347601bSyl * @tmac_ttl_octets_oflow: tbd 3528347601bSyl * @tmac_ucst_frms_oflow: tbd 3538347601bSyl * @tmac_nucst_frms_oflow: tbd 3548347601bSyl * @tmac_any_err_frms_oflow: tbd 3558347601bSyl * @tmac_vlan_frms: tbd 3568347601bSyl * @tmac_vld_ip_oflow: tbd 3578347601bSyl * @tmac_drop_ip_oflow: tbd 3588347601bSyl * @tmac_icmp_oflow: tbd 3598347601bSyl * @tmac_rst_tcp_oflow: tbd 3608347601bSyl * @tmac_udp_oflow: tbd 361*7eced415Sxw * @reserved_10: tbd 3628347601bSyl * @tpa_unknown_protocol: tbd 3638347601bSyl * @tpa_parse_failure: tbd 3648347601bSyl * @rmac_vld_frms_oflow: tbd 3658347601bSyl * @rmac_data_octets_oflow: tbd 3668347601bSyl * @rmac_vld_mcst_frms_oflow: tbd 3678347601bSyl * @rmac_vld_bcst_frms_oflow: tbd 3688347601bSyl * @rmac_ttl_octets_oflow: tbd 3698347601bSyl * @rmac_accepted_ucst_frms_oflow: tbd 3708347601bSyl * @rmac_accepted_nucst_frms_oflow: tbd 3718347601bSyl * @rmac_discarded_frms_oflow: tbd 3728347601bSyl * @rmac_drop_events_oflow: tbd 3738347601bSyl * @rmac_usized_frms_oflow: tbd 3748347601bSyl * @rmac_osized_frms_oflow: tbd 3758347601bSyl * @rmac_frag_frms_oflow: tbd 3768347601bSyl * @rmac_jabber_frms_oflow: tbd 3778347601bSyl * @rmac_ip_oflow: tbd 3788347601bSyl * @rmac_drop_ip_oflow: tbd 3798347601bSyl * @rmac_icmp_oflow: tbd 3808347601bSyl * @rmac_udp_oflow: tbd 381*7eced415Sxw * @reserved_11: tbd 3828347601bSyl * @rmac_err_drp_udp_oflow: tbd 3838347601bSyl * @rmac_pause_cnt_oflow: tbd 3848347601bSyl * @rmac_ttl_1519_4095_frms: tbd 3858347601bSyl * @rmac_ttl_4096_8191_frms: tbd 3868347601bSyl * @rmac_ttl_8192_max_frms: tbd 3878347601bSyl * @rmac_ttl_gt_max_frms: tbd 3888347601bSyl * @rmac_osized_alt_frms: tbd 3898347601bSyl * @rmac_jabber_alt_frms: tbd 3908347601bSyl * @rmac_gt_max_alt_frms: tbd 3918347601bSyl * @rmac_vlan_frms: tbd 3928347601bSyl * @rmac_fcs_discard: tbd 3938347601bSyl * @rmac_len_discard: tbd 3948347601bSyl * @rmac_da_discard: tbd 3958347601bSyl * @rmac_pf_discard: tbd 3968347601bSyl * @rmac_rts_discard: tbd 397*7eced415Sxw * @rmac_wol_discard: tbd 3988347601bSyl * @rmac_red_discard: tbd 3998347601bSyl * @rmac_ingm_full_discard: tbd 4008347601bSyl * @rmac_accepted_ip_oflow: tbd 401*7eced415Sxw * @reserved_12: tbd 4028347601bSyl * @link_fault_cnt: TBD 403*7eced415Sxw * @reserved_13: tbd 404a23fd118Syl * Xframe hardware statistics. 405a23fd118Syl */ 406a23fd118Syl typedef struct xge_hal_stats_hw_info_t { 407a23fd118Syl #ifdef XGE_OS_HOST_BIG_ENDIAN 408a23fd118Syl /* Tx MAC statistics counters. */ 409a23fd118Syl u32 tmac_frms; 410a23fd118Syl u32 tmac_data_octets; 411a23fd118Syl u64 tmac_drop_frms; 412a23fd118Syl u32 tmac_mcst_frms; 413a23fd118Syl u32 tmac_bcst_frms; 414a23fd118Syl u64 tmac_pause_ctrl_frms; 415a23fd118Syl u32 tmac_ttl_octets; 416a23fd118Syl u32 tmac_ucst_frms; 417a23fd118Syl u32 tmac_nucst_frms; 418a23fd118Syl u32 tmac_any_err_frms; 419a23fd118Syl u64 tmac_ttl_less_fb_octets; 420a23fd118Syl u64 tmac_vld_ip_octets; 421a23fd118Syl u32 tmac_vld_ip; 422a23fd118Syl u32 tmac_drop_ip; 423a23fd118Syl u32 tmac_icmp; 424a23fd118Syl u32 tmac_rst_tcp; 425a23fd118Syl u64 tmac_tcp; 426a23fd118Syl u32 tmac_udp; 427a23fd118Syl u32 reserved_0; 428a23fd118Syl 429a23fd118Syl /* Rx MAC Statistics counters. */ 430a23fd118Syl u32 rmac_vld_frms; 431a23fd118Syl u32 rmac_data_octets; 432a23fd118Syl u64 rmac_fcs_err_frms; 433a23fd118Syl u64 rmac_drop_frms; 434a23fd118Syl u32 rmac_vld_mcst_frms; 435a23fd118Syl u32 rmac_vld_bcst_frms; 436a23fd118Syl u32 rmac_in_rng_len_err_frms; 437a23fd118Syl u32 rmac_out_rng_len_err_frms; 438a23fd118Syl u64 rmac_long_frms; 439a23fd118Syl u64 rmac_pause_ctrl_frms; 440a23fd118Syl u64 rmac_unsup_ctrl_frms; 441a23fd118Syl u32 rmac_ttl_octets; 442a23fd118Syl u32 rmac_accepted_ucst_frms; 443a23fd118Syl u32 rmac_accepted_nucst_frms; 444a23fd118Syl u32 rmac_discarded_frms; 445a23fd118Syl u32 rmac_drop_events; 446a23fd118Syl u32 reserved_1; 447a23fd118Syl u64 rmac_ttl_less_fb_octets; 448a23fd118Syl u64 rmac_ttl_frms; 449a23fd118Syl u64 reserved_2; 450a23fd118Syl u32 reserved_3; 451a23fd118Syl u32 rmac_usized_frms; 452a23fd118Syl u32 rmac_osized_frms; 453a23fd118Syl u32 rmac_frag_frms; 454a23fd118Syl u32 rmac_jabber_frms; 455a23fd118Syl u32 reserved_4; 456a23fd118Syl u64 rmac_ttl_64_frms; 457a23fd118Syl u64 rmac_ttl_65_127_frms; 458a23fd118Syl u64 reserved_5; 459a23fd118Syl u64 rmac_ttl_128_255_frms; 460a23fd118Syl u64 rmac_ttl_256_511_frms; 461a23fd118Syl u64 reserved_6; 462a23fd118Syl u64 rmac_ttl_512_1023_frms; 463a23fd118Syl u64 rmac_ttl_1024_1518_frms; 464a23fd118Syl u32 reserved_7; 465a23fd118Syl u32 rmac_ip; 466a23fd118Syl u64 rmac_ip_octets; 467a23fd118Syl u32 rmac_hdr_err_ip; 468a23fd118Syl u32 rmac_drop_ip; 469a23fd118Syl u32 rmac_icmp; 470a23fd118Syl u32 reserved_8; 471a23fd118Syl u64 rmac_tcp; 472a23fd118Syl u32 rmac_udp; 473a23fd118Syl u32 rmac_err_drp_udp; 474a23fd118Syl u64 rmac_xgmii_err_sym; 475a23fd118Syl u64 rmac_frms_q0; 476a23fd118Syl u64 rmac_frms_q1; 477a23fd118Syl u64 rmac_frms_q2; 478a23fd118Syl u64 rmac_frms_q3; 479a23fd118Syl u64 rmac_frms_q4; 480a23fd118Syl u64 rmac_frms_q5; 481a23fd118Syl u64 rmac_frms_q6; 482a23fd118Syl u64 rmac_frms_q7; 483a23fd118Syl u16 rmac_full_q0; 484a23fd118Syl u16 rmac_full_q1; 485a23fd118Syl u16 rmac_full_q2; 486a23fd118Syl u16 rmac_full_q3; 487a23fd118Syl u16 rmac_full_q4; 488a23fd118Syl u16 rmac_full_q5; 489a23fd118Syl u16 rmac_full_q6; 490a23fd118Syl u16 rmac_full_q7; 491a23fd118Syl u32 rmac_pause_cnt; 492a23fd118Syl u32 reserved_9; 493a23fd118Syl u64 rmac_xgmii_data_err_cnt; 494a23fd118Syl u64 rmac_xgmii_ctrl_err_cnt; 495a23fd118Syl u32 rmac_accepted_ip; 496a23fd118Syl u32 rmac_err_tcp; 497a23fd118Syl 498a23fd118Syl /* PCI/PCI-X Read transaction statistics. */ 499a23fd118Syl u32 rd_req_cnt; 500a23fd118Syl u32 new_rd_req_cnt; 501a23fd118Syl u32 new_rd_req_rtry_cnt; 502a23fd118Syl u32 rd_rtry_cnt; 503a23fd118Syl u32 wr_rtry_rd_ack_cnt; 504a23fd118Syl 505a23fd118Syl /* PCI/PCI-X write transaction statistics. */ 506a23fd118Syl u32 wr_req_cnt; 507a23fd118Syl u32 new_wr_req_cnt; 508a23fd118Syl u32 new_wr_req_rtry_cnt; 509a23fd118Syl u32 wr_rtry_cnt; 510a23fd118Syl u32 wr_disc_cnt; 511a23fd118Syl u32 rd_rtry_wr_ack_cnt; 512a23fd118Syl 513a23fd118Syl /* DMA Transaction statistics. */ 514a23fd118Syl u32 txp_wr_cnt; 515a23fd118Syl u32 txd_rd_cnt; 516a23fd118Syl u32 txd_wr_cnt; 517a23fd118Syl u32 rxd_rd_cnt; 518a23fd118Syl u32 rxd_wr_cnt; 519a23fd118Syl u32 txf_rd_cnt; 520a23fd118Syl u32 rxf_wr_cnt; 521a23fd118Syl 522a23fd118Syl /* Enhanced Herc statistics */ 523a23fd118Syl u32 tmac_frms_oflow; 524a23fd118Syl u32 tmac_data_octets_oflow; 525a23fd118Syl u32 tmac_mcst_frms_oflow; 526a23fd118Syl u32 tmac_bcst_frms_oflow; 527a23fd118Syl u32 tmac_ttl_octets_oflow; 528a23fd118Syl u32 tmac_ucst_frms_oflow; 529a23fd118Syl u32 tmac_nucst_frms_oflow; 530a23fd118Syl u32 tmac_any_err_frms_oflow; 531a23fd118Syl u64 tmac_vlan_frms; 532a23fd118Syl u32 tmac_vld_ip_oflow; 533a23fd118Syl u32 tmac_drop_ip_oflow; 534a23fd118Syl u32 tmac_icmp_oflow; 535a23fd118Syl u32 tmac_rst_tcp_oflow; 536a23fd118Syl u32 tmac_udp_oflow; 537a23fd118Syl u32 tpa_unknown_protocol; 538a23fd118Syl u32 tpa_parse_failure; 5398347601bSyl u32 reserved_10; 540a23fd118Syl u32 rmac_vld_frms_oflow; 541a23fd118Syl u32 rmac_data_octets_oflow; 542a23fd118Syl u32 rmac_vld_mcst_frms_oflow; 543a23fd118Syl u32 rmac_vld_bcst_frms_oflow; 544a23fd118Syl u32 rmac_ttl_octets_oflow; 545a23fd118Syl u32 rmac_accepted_ucst_frms_oflow; 546a23fd118Syl u32 rmac_accepted_nucst_frms_oflow; 547a23fd118Syl u32 rmac_discarded_frms_oflow; 548a23fd118Syl u32 rmac_drop_events_oflow; 549a23fd118Syl u32 rmac_usized_frms_oflow; 550a23fd118Syl u32 rmac_osized_frms_oflow; 551a23fd118Syl u32 rmac_frag_frms_oflow; 552a23fd118Syl u32 rmac_jabber_frms_oflow; 553a23fd118Syl u32 rmac_ip_oflow; 554a23fd118Syl u32 rmac_drop_ip_oflow; 555a23fd118Syl u32 rmac_icmp_oflow; 556a23fd118Syl u32 rmac_udp_oflow; 557a23fd118Syl u32 rmac_err_drp_udp_oflow; 558a23fd118Syl u32 rmac_pause_cnt_oflow; 5598347601bSyl u32 reserved_11; 560a23fd118Syl u64 rmac_ttl_1519_4095_frms; 561a23fd118Syl u64 rmac_ttl_4096_8191_frms; 562a23fd118Syl u64 rmac_ttl_8192_max_frms; 563a23fd118Syl u64 rmac_ttl_gt_max_frms; 564a23fd118Syl u64 rmac_osized_alt_frms; 565a23fd118Syl u64 rmac_jabber_alt_frms; 566a23fd118Syl u64 rmac_gt_max_alt_frms; 567a23fd118Syl u64 rmac_vlan_frms; 568a23fd118Syl u32 rmac_fcs_discard; 569a23fd118Syl u32 rmac_len_discard; 570a23fd118Syl u32 rmac_da_discard; 571a23fd118Syl u32 rmac_pf_discard; 572a23fd118Syl u32 rmac_rts_discard; 5738347601bSyl u32 rmac_wol_discard; 574a23fd118Syl u32 rmac_red_discard; 575a23fd118Syl u32 rmac_ingm_full_discard; 576a23fd118Syl u32 rmac_accepted_ip_oflow; 5778347601bSyl u32 reserved_12; 578a23fd118Syl u32 link_fault_cnt; 5798347601bSyl u32 reserved_13; 580a23fd118Syl #else 581a23fd118Syl /* Tx MAC statistics counters. */ 582a23fd118Syl u32 tmac_data_octets; 583a23fd118Syl u32 tmac_frms; 584a23fd118Syl u64 tmac_drop_frms; 585a23fd118Syl u32 tmac_bcst_frms; 586a23fd118Syl u32 tmac_mcst_frms; 587a23fd118Syl u64 tmac_pause_ctrl_frms; 588a23fd118Syl u32 tmac_ucst_frms; 589a23fd118Syl u32 tmac_ttl_octets; 590a23fd118Syl u32 tmac_any_err_frms; 591a23fd118Syl u32 tmac_nucst_frms; 592a23fd118Syl u64 tmac_ttl_less_fb_octets; 593a23fd118Syl u64 tmac_vld_ip_octets; 594a23fd118Syl u32 tmac_drop_ip; 595a23fd118Syl u32 tmac_vld_ip; 596a23fd118Syl u32 tmac_rst_tcp; 597a23fd118Syl u32 tmac_icmp; 598a23fd118Syl u64 tmac_tcp; 599a23fd118Syl u32 reserved_0; 600a23fd118Syl u32 tmac_udp; 601a23fd118Syl 602a23fd118Syl /* Rx MAC Statistics counters. */ 603a23fd118Syl u32 rmac_data_octets; 604a23fd118Syl u32 rmac_vld_frms; 605a23fd118Syl u64 rmac_fcs_err_frms; 606a23fd118Syl u64 rmac_drop_frms; 607a23fd118Syl u32 rmac_vld_bcst_frms; 608a23fd118Syl u32 rmac_vld_mcst_frms; 609a23fd118Syl u32 rmac_out_rng_len_err_frms; 610a23fd118Syl u32 rmac_in_rng_len_err_frms; 611a23fd118Syl u64 rmac_long_frms; 612a23fd118Syl u64 rmac_pause_ctrl_frms; 613a23fd118Syl u64 rmac_unsup_ctrl_frms; 614a23fd118Syl u32 rmac_accepted_ucst_frms; 615a23fd118Syl u32 rmac_ttl_octets; 616a23fd118Syl u32 rmac_discarded_frms; 617a23fd118Syl u32 rmac_accepted_nucst_frms; 618a23fd118Syl u32 reserved_1; 619a23fd118Syl u32 rmac_drop_events; 620a23fd118Syl u64 rmac_ttl_less_fb_octets; 621a23fd118Syl u64 rmac_ttl_frms; 622a23fd118Syl u64 reserved_2; 623a23fd118Syl u32 rmac_usized_frms; 624a23fd118Syl u32 reserved_3; 625a23fd118Syl u32 rmac_frag_frms; 626a23fd118Syl u32 rmac_osized_frms; 627a23fd118Syl u32 reserved_4; 628a23fd118Syl u32 rmac_jabber_frms; 629a23fd118Syl u64 rmac_ttl_64_frms; 630a23fd118Syl u64 rmac_ttl_65_127_frms; 631a23fd118Syl u64 reserved_5; 632a23fd118Syl u64 rmac_ttl_128_255_frms; 633a23fd118Syl u64 rmac_ttl_256_511_frms; 634a23fd118Syl u64 reserved_6; 635a23fd118Syl u64 rmac_ttl_512_1023_frms; 636a23fd118Syl u64 rmac_ttl_1024_1518_frms; 637a23fd118Syl u32 rmac_ip; 638a23fd118Syl u32 reserved_7; 639a23fd118Syl u64 rmac_ip_octets; 640a23fd118Syl u32 rmac_drop_ip; 641a23fd118Syl u32 rmac_hdr_err_ip; 642a23fd118Syl u32 reserved_8; 643a23fd118Syl u32 rmac_icmp; 644a23fd118Syl u64 rmac_tcp; 645a23fd118Syl u32 rmac_err_drp_udp; 646a23fd118Syl u32 rmac_udp; 647a23fd118Syl u64 rmac_xgmii_err_sym; 648a23fd118Syl u64 rmac_frms_q0; 649a23fd118Syl u64 rmac_frms_q1; 650a23fd118Syl u64 rmac_frms_q2; 651a23fd118Syl u64 rmac_frms_q3; 652a23fd118Syl u64 rmac_frms_q4; 653a23fd118Syl u64 rmac_frms_q5; 654a23fd118Syl u64 rmac_frms_q6; 655a23fd118Syl u64 rmac_frms_q7; 656a23fd118Syl u16 rmac_full_q3; 657a23fd118Syl u16 rmac_full_q2; 658a23fd118Syl u16 rmac_full_q1; 659a23fd118Syl u16 rmac_full_q0; 660a23fd118Syl u16 rmac_full_q7; 661a23fd118Syl u16 rmac_full_q6; 662a23fd118Syl u16 rmac_full_q5; 663a23fd118Syl u16 rmac_full_q4; 664a23fd118Syl u32 reserved_9; 665a23fd118Syl u32 rmac_pause_cnt; 666a23fd118Syl u64 rmac_xgmii_data_err_cnt; 667a23fd118Syl u64 rmac_xgmii_ctrl_err_cnt; 668a23fd118Syl u32 rmac_err_tcp; 669a23fd118Syl u32 rmac_accepted_ip; 670a23fd118Syl 671a23fd118Syl /* PCI/PCI-X Read transaction statistics. */ 672a23fd118Syl u32 new_rd_req_cnt; 673a23fd118Syl u32 rd_req_cnt; 674a23fd118Syl u32 rd_rtry_cnt; 675a23fd118Syl u32 new_rd_req_rtry_cnt; 676a23fd118Syl 677a23fd118Syl /* PCI/PCI-X Write/Read transaction statistics. */ 678a23fd118Syl u32 wr_req_cnt; 679a23fd118Syl u32 wr_rtry_rd_ack_cnt; 680a23fd118Syl u32 new_wr_req_rtry_cnt; 681a23fd118Syl u32 new_wr_req_cnt; 682a23fd118Syl u32 wr_disc_cnt; 683a23fd118Syl u32 wr_rtry_cnt; 684a23fd118Syl 685a23fd118Syl /* PCI/PCI-X Write / DMA Transaction statistics. */ 686a23fd118Syl u32 txp_wr_cnt; 687a23fd118Syl u32 rd_rtry_wr_ack_cnt; 688a23fd118Syl u32 txd_wr_cnt; 689a23fd118Syl u32 txd_rd_cnt; 690a23fd118Syl u32 rxd_wr_cnt; 691a23fd118Syl u32 rxd_rd_cnt; 692a23fd118Syl u32 rxf_wr_cnt; 693a23fd118Syl u32 txf_rd_cnt; 694a23fd118Syl 695a23fd118Syl /* Enhanced Herc statistics */ 696a23fd118Syl u32 tmac_data_octets_oflow; 697a23fd118Syl u32 tmac_frms_oflow; 698a23fd118Syl u32 tmac_bcst_frms_oflow; 699a23fd118Syl u32 tmac_mcst_frms_oflow; 700a23fd118Syl u32 tmac_ucst_frms_oflow; 701a23fd118Syl u32 tmac_ttl_octets_oflow; 702a23fd118Syl u32 tmac_any_err_frms_oflow; 703a23fd118Syl u32 tmac_nucst_frms_oflow; 704a23fd118Syl u64 tmac_vlan_frms; 705a23fd118Syl u32 tmac_drop_ip_oflow; 706a23fd118Syl u32 tmac_vld_ip_oflow; 707a23fd118Syl u32 tmac_rst_tcp_oflow; 708a23fd118Syl u32 tmac_icmp_oflow; 709a23fd118Syl u32 tpa_unknown_protocol; 710a23fd118Syl u32 tmac_udp_oflow; 7118347601bSyl u32 reserved_10; 712a23fd118Syl u32 tpa_parse_failure; 713a23fd118Syl u32 rmac_data_octets_oflow; 7148347601bSyl u32 rmac_vld_frms_oflow; 715a23fd118Syl u32 rmac_vld_bcst_frms_oflow; 7168347601bSyl u32 rmac_vld_mcst_frms_oflow; 717a23fd118Syl u32 rmac_accepted_ucst_frms_oflow; 7188347601bSyl u32 rmac_ttl_octets_oflow; 719a23fd118Syl u32 rmac_discarded_frms_oflow; 7208347601bSyl u32 rmac_accepted_nucst_frms_oflow; 721a23fd118Syl u32 rmac_usized_frms_oflow; 7228347601bSyl u32 rmac_drop_events_oflow; 723a23fd118Syl u32 rmac_frag_frms_oflow; 7248347601bSyl u32 rmac_osized_frms_oflow; 725a23fd118Syl u32 rmac_ip_oflow; 7268347601bSyl u32 rmac_jabber_frms_oflow; 727a23fd118Syl u32 rmac_icmp_oflow; 7288347601bSyl u32 rmac_drop_ip_oflow; 729a23fd118Syl u32 rmac_err_drp_udp_oflow; 7308347601bSyl u32 rmac_udp_oflow; 7318347601bSyl u32 reserved_11; 7328347601bSyl u32 rmac_pause_cnt_oflow; 733a23fd118Syl u64 rmac_ttl_1519_4095_frms; 734a23fd118Syl u64 rmac_ttl_4096_8191_frms; 735a23fd118Syl u64 rmac_ttl_8192_max_frms; 736a23fd118Syl u64 rmac_ttl_gt_max_frms; 737a23fd118Syl u64 rmac_osized_alt_frms; 738a23fd118Syl u64 rmac_jabber_alt_frms; 739a23fd118Syl u64 rmac_gt_max_alt_frms; 740a23fd118Syl u64 rmac_vlan_frms; 741a23fd118Syl u32 rmac_len_discard; 742a23fd118Syl u32 rmac_fcs_discard; 743a23fd118Syl u32 rmac_pf_discard; 744a23fd118Syl u32 rmac_da_discard; 7458347601bSyl u32 rmac_wol_discard; 746a23fd118Syl u32 rmac_rts_discard; 747a23fd118Syl u32 rmac_ingm_full_discard; 7488347601bSyl u32 rmac_red_discard; 7498347601bSyl u32 reserved_12; 7508347601bSyl u32 rmac_accepted_ip_oflow; 7518347601bSyl u32 reserved_13; 752a23fd118Syl u32 link_fault_cnt; 753a23fd118Syl #endif 754a23fd118Syl } xge_hal_stats_hw_info_t; 755a23fd118Syl 756a23fd118Syl /** 757a23fd118Syl * struct xge_hal_stats_channel_into_t - HAL channel statistics. 758*7eced415Sxw * @full_cnt: TBD 759*7eced415Sxw * @usage_max: TBD 760a23fd118Syl * @reserve_free_swaps_cnt: Reserve/free swap counter. Internal usage. 761a23fd118Syl * @max_compl_per_intr_cnt: Maximum number of completions per interrupt. 762a23fd118Syl * @avg_compl_per_intr_cnt: Average number of completions per interrupt. 763a23fd118Syl * Note that a total number of completed descriptors 764a23fd118Syl * for the given channel can be calculated as 765a23fd118Syl * (@traffic_intr_cnt * @avg_compl_per_intr_cnt). 766a23fd118Syl * @total_compl_cnt: Total completion count. 767a23fd118Syl * @total_compl_cnt == (@traffic_intr_cnt * @avg_compl_per_intr_cnt). 768a23fd118Syl * @total_posts: Total number of descriptor postings on the channel. 769a23fd118Syl * Counts the number of xge_hal_ring_dtr_post() 770a23fd118Syl * or xge_hal_fifo_dtr_post() calls by ULD, for ring and fifo 771a23fd118Syl * channel, respectively. 772a23fd118Syl * @total_posts_many: Total number of posts on the channel that involved 773a23fd118Syl * more than one descriptor. Counts the number of 774a23fd118Syl * xge_hal_fifo_dtr_post_many() calls performed by ULD. 775a23fd118Syl * @total_buffers: Total number of buffers posted on the channel. 776*7eced415Sxw * @copied_frags: TBD 777*7eced415Sxw * @copied_buffers: TBD 778a23fd118Syl * @avg_buffers_per_post: Average number of buffers transferred in a single 779a23fd118Syl * post operation. 780a23fd118Syl * Calculated as @total_buffers/@total_posts. 781a23fd118Syl * @avg_buffer_size: Average buffer size transferred by a single post 782a23fd118Syl * operation on a fifo channel. The counter is not supported for a ring 783a23fd118Syl * channel. Calculated as a total number of transmitted octets divided 784a23fd118Syl * by @total_buffers. 785a23fd118Syl * @avg_post_size: Average amount of data transferred by a single post. 786a23fd118Syl * Calculated as a total number of transmitted octets divided by 787a23fd118Syl * @total_posts. 788a23fd118Syl * @ring_bump_cnt: Ring "bump" count. Number of times the hardware could 789a23fd118Syl * not post receive data (and had to continue keeping it on-board) 790a23fd118Syl * because of unavailable receive descriptor(s). 791a23fd118Syl * @total_posts_dtrs_many: Total number of posts on the channel that involving 792*7eced415Sxw * more than one descriptor. 793*7eced415Sxw * @total_posts_frags_many: Total number of fragments posted on the channel 794*7eced415Sxw * during post requests of multiple descriptors. 795a23fd118Syl * @total_posts_dang_dtrs: Total number of posts on the channel involving 796a23fd118Syl * dangling descriptors. 797*7eced415Sxw * @total_posts_dang_frags: Total number of dangling fragments posted on the channel 798*7eced415Sxw * during post request containing multiple descriptors. 799a23fd118Syl * 800a23fd118Syl * HAL channel counters. 801a23fd118Syl * See also: xge_hal_stats_device_info_t{}. 802a23fd118Syl */ 803a23fd118Syl typedef struct xge_hal_stats_channel_info_t { 8048347601bSyl u32 full_cnt; 8058347601bSyl u32 usage_max; 806a23fd118Syl u32 reserve_free_swaps_cnt; 807a23fd118Syl u32 avg_compl_per_intr_cnt; 808a23fd118Syl u32 total_compl_cnt; 809a23fd118Syl u32 total_posts; 810a23fd118Syl u32 total_posts_many; 811a23fd118Syl u32 total_buffers; 8128347601bSyl u32 copied_frags; 8138347601bSyl u32 copied_buffers; 814a23fd118Syl u32 avg_buffers_per_post; 815a23fd118Syl u32 avg_buffer_size; 816a23fd118Syl u32 avg_post_size; 817a23fd118Syl u32 ring_bump_cnt; 818a23fd118Syl u32 total_posts_dtrs_many; 819a23fd118Syl u32 total_posts_frags_many; 820a23fd118Syl u32 total_posts_dang_dtrs; 821a23fd118Syl u32 total_posts_dang_frags; 822a23fd118Syl } xge_hal_stats_channel_info_t; 823a23fd118Syl 8248347601bSyl /** 8258347601bSyl * struct xge_hal_xpak_counter_t - HAL xpak error counters 8268347601bSyl * @excess_temp: excess transceiver_temperature count 8278347601bSyl * @excess_bias_current: excess laser_bias_current count 8288347601bSyl * @excess_laser_output: excess laser_output_power count 8298347601bSyl * @tick_period: tick count for each cycle 8308347601bSyl */ 8318347601bSyl typedef struct xge_hal_xpak_counter_t { 8328347601bSyl u32 excess_temp; 8338347601bSyl u32 excess_bias_current; 8348347601bSyl u32 excess_laser_output; 8358347601bSyl u32 tick_period; 8368347601bSyl } xge_hal_xpak_counter_t; 8378347601bSyl 8388347601bSyl /** 8398347601bSyl * struct xge_hal_stats_xpak_t - HAL xpak stats 8408347601bSyl * @alarm_transceiver_temp_high: alarm_transceiver_temp_high count value 8418347601bSyl * @alarm_transceiver_temp_low : alarm_transceiver_temp_low count value 8428347601bSyl * @alarm_laser_bias_current_high: alarm_laser_bias_current_high count value 8438347601bSyl * @alarm_laser_bias_current_low: alarm_laser_bias_current_low count value 8448347601bSyl * @alarm_laser_output_power_high: alarm_laser_output_power_high count value 8458347601bSyl * @alarm_laser_output_power_low: alarm_laser_output_power_low count value 8468347601bSyl * @warn_transceiver_temp_high: warn_transceiver_temp_high count value 8478347601bSyl * @warn_transceiver_temp_low: warn_transceiver_temp_low count value 8488347601bSyl * @warn_laser_bias_current_high: warn_laser_bias_current_high count value 8498347601bSyl * @warn_laser_bias_current_low: warn_laser_bias_current_low count value 8508347601bSyl * @warn_laser_output_power_high: warn_laser_output_power_high count value 8518347601bSyl * @warn_laser_output_power_low: warn_laser_output_power_low count value 8528347601bSyl */ 8538347601bSyl typedef struct xge_hal_stats_xpak_t { 8548347601bSyl u16 alarm_transceiver_temp_high; 8558347601bSyl u16 alarm_transceiver_temp_low; 8568347601bSyl u16 alarm_laser_bias_current_high; 8578347601bSyl u16 alarm_laser_bias_current_low; 8588347601bSyl u16 alarm_laser_output_power_high; 8598347601bSyl u16 alarm_laser_output_power_low; 8608347601bSyl u16 warn_transceiver_temp_high; 8618347601bSyl u16 warn_transceiver_temp_low; 8628347601bSyl u16 warn_laser_bias_current_high; 8638347601bSyl u16 warn_laser_bias_current_low; 8648347601bSyl u16 warn_laser_output_power_high; 8658347601bSyl u16 warn_laser_output_power_low; 8668347601bSyl } xge_hal_stats_xpak_t; 8678347601bSyl 8688347601bSyl 869a23fd118Syl 870a23fd118Syl /** 871a23fd118Syl * struct xge_hal_stats_sw_err_t - HAL device error statistics. 8728347601bSyl * @sm_err_cnt: TBD 8738347601bSyl * @single_ecc_err_cnt: TBD 8748347601bSyl * @double_ecc_err_cnt: TBD 875a23fd118Syl * @ecc_err_cnt: ECC error count. 876a23fd118Syl * @parity_err_cnt: Parity error count. 877a23fd118Syl * @serr_cnt: Number of exceptions indicated to the host via PCI SERR#. 878a23fd118Syl * @rxd_t_code_err_cnt: Array of receive transfer codes. The position 879a23fd118Syl * (index) in this array reflects the transfer code type, for instance 880a23fd118Syl * 0x7 - for "invalid receive buffer size", or 0x8 - for ECC. 881a23fd118Syl * Value rxd_t_code_err_cnt[i] reflects the 882a23fd118Syl * number of times the corresponding transfer code was encountered. 883a23fd118Syl * 884a23fd118Syl * @txd_t_code_err_cnt: Array of transmit transfer codes. The position 885a23fd118Syl * (index) in this array reflects the transfer code type, for instance 886a23fd118Syl * 0xA - "loss of link". 887a23fd118Syl * Value txd_t_code_err_cnt[i] reflects the 888a23fd118Syl * number of times the corresponding transfer code was encountered. 889*7eced415Sxw * @stats_xpak: TBD 890*7eced415Sxw * @xpak_counter: TBD 891a23fd118Syl */ 892a23fd118Syl typedef struct xge_hal_stats_sw_err_t { 893a23fd118Syl u32 sm_err_cnt; 894a23fd118Syl u32 single_ecc_err_cnt; 895a23fd118Syl u32 double_ecc_err_cnt; 896a23fd118Syl u32 ecc_err_cnt; 897a23fd118Syl u32 parity_err_cnt; 898a23fd118Syl u32 serr_cnt; 899a23fd118Syl u32 rxd_t_code_err_cnt[16]; 900a23fd118Syl u32 txd_t_code_err_cnt[16]; 9018347601bSyl xge_hal_stats_xpak_t stats_xpak; 9028347601bSyl xge_hal_xpak_counter_t xpak_counter; 903a23fd118Syl } xge_hal_stats_sw_err_t; 904a23fd118Syl 905a23fd118Syl /** 906a23fd118Syl * struct xge_hal_stats_device_info_t - HAL own per-device statistics. 907*7eced415Sxw * 9088347601bSyl * @rx_traffic_intr_cnt: TBD 9098347601bSyl * @tx_traffic_intr_cnt: TBD 9108347601bSyl * @txpic_intr_cnt: TBD 9118347601bSyl * @txdma_intr_cnt: TBD 9128347601bSyl * @txmac_intr_cnt: TBD 9138347601bSyl * @txxgxs_intr_cnt: TBD 9148347601bSyl * @rxpic_intr_cnt: TBD 9158347601bSyl * @rxdma_intr_cnt: TBD 9168347601bSyl * @rxmac_intr_cnt: TBD 9178347601bSyl * @rxxgxs_intr_cnt: TBD 9188347601bSyl * @mc_intr_cnt: TBD 919a23fd118Syl * @not_traffic_intr_cnt: Number of times the host was interrupted 920a23fd118Syl * without new completions. 921a23fd118Syl * "Non-traffic interrupt counter". 922*7eced415Sxw * @not_xge_intr_cnt: TBD 923a23fd118Syl * @traffic_intr_cnt: Number of traffic interrupts for the device. 924a23fd118Syl * @total_intr_cnt: Total number of traffic interrupts for the device. 925a23fd118Syl * @total_intr_cnt == @traffic_intr_cnt + 926a23fd118Syl * @not_traffic_intr_cnt 927a23fd118Syl * @soft_reset_cnt: Number of times soft reset is done on this device. 928a23fd118Syl * @rxufca_hi_adjust_cnt: TODO 929a23fd118Syl * @rxufca_lo_adjust_cnt: TODO 930*7eced415Sxw * @bimodal_hi_adjust_cnt: TODO 931*7eced415Sxw * @bimodal_lo_adjust_cnt: TODO 932*7eced415Sxw * 9338347601bSyl * @tot_frms_lroised: TBD 9348347601bSyl * @tot_lro_sessions: TBD 9358347601bSyl * @lro_frm_len_exceed_cnt: TBD 9368347601bSyl * @lro_sg_exceed_cnt: TBD 9378347601bSyl * @lro_out_of_seq_pkt_cnt: TBD 9388347601bSyl * @lro_dup_pkt_cnt: TBD 939a23fd118Syl * 940a23fd118Syl * HAL per-device statistics. 941a23fd118Syl * See also: xge_hal_stats_channel_info_t{}. 942a23fd118Syl */ 943a23fd118Syl typedef struct xge_hal_stats_device_info_t { 944a23fd118Syl u32 rx_traffic_intr_cnt; 945a23fd118Syl u32 tx_traffic_intr_cnt; 9468347601bSyl u32 txpic_intr_cnt; 9478347601bSyl u32 txdma_intr_cnt; 948*7eced415Sxw u32 pfc_err_cnt; 949*7eced415Sxw u32 tda_err_cnt; 950*7eced415Sxw u32 pcc_err_cnt; 951*7eced415Sxw u32 tti_err_cnt; 952*7eced415Sxw u32 lso_err_cnt; 953*7eced415Sxw u32 tpa_err_cnt; 954*7eced415Sxw u32 sm_err_cnt; 9558347601bSyl u32 txmac_intr_cnt; 956*7eced415Sxw u32 mac_tmac_err_cnt; 9578347601bSyl u32 txxgxs_intr_cnt; 958*7eced415Sxw u32 xgxs_txgxs_err_cnt; 9598347601bSyl u32 rxpic_intr_cnt; 9608347601bSyl u32 rxdma_intr_cnt; 961*7eced415Sxw u32 rc_err_cnt; 962*7eced415Sxw u32 rpa_err_cnt; 963*7eced415Sxw u32 rda_err_cnt; 964*7eced415Sxw u32 rti_err_cnt; 9658347601bSyl u32 rxmac_intr_cnt; 966*7eced415Sxw u32 mac_rmac_err_cnt; 9678347601bSyl u32 rxxgxs_intr_cnt; 968*7eced415Sxw u32 xgxs_rxgxs_err_cnt; 9698347601bSyl u32 mc_intr_cnt; 970a23fd118Syl u32 not_traffic_intr_cnt; 971*7eced415Sxw u32 not_xge_intr_cnt; 972a23fd118Syl u32 traffic_intr_cnt; 973a23fd118Syl u32 total_intr_cnt; 974a23fd118Syl u32 soft_reset_cnt; 975a23fd118Syl u32 rxufca_hi_adjust_cnt; 976a23fd118Syl u32 rxufca_lo_adjust_cnt; 9778347601bSyl u32 bimodal_hi_adjust_cnt; 9788347601bSyl u32 bimodal_lo_adjust_cnt; 979a23fd118Syl #ifdef XGE_HAL_CONFIG_LRO 980a23fd118Syl u32 tot_frms_lroised; 981a23fd118Syl u32 tot_lro_sessions; 9828347601bSyl u32 lro_frm_len_exceed_cnt; 9838347601bSyl u32 lro_sg_exceed_cnt; 9848347601bSyl u32 lro_out_of_seq_pkt_cnt; 9858347601bSyl u32 lro_dup_pkt_cnt; 986a23fd118Syl #endif 987a23fd118Syl } xge_hal_stats_device_info_t; 988a23fd118Syl 989*7eced415Sxw /* ========================== XFRAME ER STATISTICS ======================== */ 990*7eced415Sxw #define XGE_HAL_MAC_LINKS 3 991*7eced415Sxw #define XGE_HAL_MAC_AGGREGATORS 2 992*7eced415Sxw #define XGE_HAL_VPATHS 17 993*7eced415Sxw /** 994*7eced415Sxw * struct xge_hal_stats_link_info_t - XGMAC statistics for a link 995*7eced415Sxw * 996*7eced415Sxw * @tx_frms: Count of transmitted MAC frames for mac the link. 997*7eced415Sxw * @tx_ttl_eth_octets: Count of total octets of transmitted frames 998*7eced415Sxw * for mac the link. 999*7eced415Sxw * @tx_data_octets: Count of data and padding octets of transmitted 1000*7eced415Sxw * frames for mac the link. 1001*7eced415Sxw * @tx_mcst_frms: Count of multicast MAC frames for mac the link. 1002*7eced415Sxw * @tx_bcst_frms: Count of broadcast MAC frames for mac the link. 1003*7eced415Sxw * @tx_ucst_frms: Count of unicast MAC frames for mac the link. 1004*7eced415Sxw * @tx_tagged_frms: Count of transmitted frames containing a VLAN tag 1005*7eced415Sxw * for mac the link. 1006*7eced415Sxw * @tx_vld_ip: Count of transmitted IP datagrams for mac the link. 1007*7eced415Sxw * @tx_vld_ip_octets: Count of transmitted IP octets for mac the link. 1008*7eced415Sxw * @tx_icmp: Count of transmitted ICMP messages for mac the link. 1009*7eced415Sxw * @tx_tcp: Count of transmitted TCP segments for mac the link. 1010*7eced415Sxw * @tx_rst_tcp: Count of transmitted TCP segments containing the RST 1011*7eced415Sxw * flag mac the link. 1012*7eced415Sxw * @tx_udp: Count of transmitted UDP datagrams for mac the link. 1013*7eced415Sxw * @tx_unknown_protocol: Count of transmitted packets of unknown 1014*7eced415Sxw * protocol for mac the link. 1015*7eced415Sxw * @tx_parse_error: Count of transmitted packets with parsing errors 1016*7eced415Sxw * for mac the link. 1017*7eced415Sxw * @tx_pause_ctrl_frms: Count of MAC PAUSE control frames for mac 1018*7eced415Sxw * the link. 1019*7eced415Sxw * @tx_lacpdu_frms: Count of LACPDUs transmitted for mac the link. 1020*7eced415Sxw * @tx_marker_pdu_frms: Count of Marker PDUs transmitted for mac the 1021*7eced415Sxw * link. 1022*7eced415Sxw * @tx_marker_resp_pdu_frms: Count of Marker Response PDUs transmitted 1023*7eced415Sxw * for mac the link. 1024*7eced415Sxw * @tx_drop_ip: Count of dropped IP packets from the transmission path 1025*7eced415Sxw * for mac the link. 1026*7eced415Sxw * @tx_xgmii_char1_match: Count of the number of transmitted XGMII 1027*7eced415Sxw * characters that match first pattern, for mac the link. 1028*7eced415Sxw * @tx_xgmii_char2_match: Count of the number of transmitted XGMII 1029*7eced415Sxw * characters that match second pattern, for mac the link. 1030*7eced415Sxw * @tx_xgmii_column1_match: Count of the number of transmitted XGMII 1031*7eced415Sxw * columns that match first pattern, for mac the link. 1032*7eced415Sxw * @tx_xgmii_column2_match: Count of the number of transmitted XGMII 1033*7eced415Sxw * columns that match second pattern, for mac the link. 1034*7eced415Sxw * @tx_drop_frms: Count of frames dropped due to internal errors during 1035*7eced415Sxw * transmission for mac the link. 1036*7eced415Sxw * @tx_any_err_frms: Count of frames dropped due to any error during 1037*7eced415Sxw * transmission for mac the link. 1038*7eced415Sxw * @rx_ttl_frms: Count of all received MAC frames for mac the link. 1039*7eced415Sxw * @rx_vld_frms: Count of all successfully received MAC frames for mac 1040*7eced415Sxw * the link. 1041*7eced415Sxw * @rx_offld_frms: Count of all offloaded received MAC frames for mac 1042*7eced415Sxw * the link. 1043*7eced415Sxw * @rx_ttl_eth_octets: Count of total octets of received frames, not 1044*7eced415Sxw * including framing characters for mac the link. 1045*7eced415Sxw * @rx_data_octets: Count of data and padding octets of successfully 1046*7eced415Sxw * received frames for mac the link. 1047*7eced415Sxw * @rx_offld_octets: Count of total octets, not including framing 1048*7eced415Sxw * characters, of offloaded received frames for mac the link. 1049*7eced415Sxw * @rx_vld_mcst_frms: Count of successfully received multicast MAC 1050*7eced415Sxw * frames for mac the link. 1051*7eced415Sxw * @rx_vld_bcst_frms: Count of successfully received broadcast MAC 1052*7eced415Sxw * frames for mac the link. 1053*7eced415Sxw * @rx_accepted_ucst_frms: Count of successfully received unicast MAC 1054*7eced415Sxw * frames for mac the link. 1055*7eced415Sxw * @rx_accepted_nucst_frms: Count of successfully received non-unicast 1056*7eced415Sxw * MAC frames for mac the link. 1057*7eced415Sxw * @rx_tagged_frms: Count of received frames containing a VLAN tag for 1058*7eced415Sxw * mac the link. 1059*7eced415Sxw * @rx_long_frms: Count of received frames that are longer than 1060*7eced415Sxw * RX_MAX_PYLD_LEN + 18 bytes (+ 22 bytes if VLAN-tagged) for mac the link. 1061*7eced415Sxw * @rx_usized_frms: Count of received frames of length less than 64 1062*7eced415Sxw * octets, for mac the link. 1063*7eced415Sxw * @rx_osized_frms: Count of received frames of length more than 1518 1064*7eced415Sxw * octets for mac the link. 1065*7eced415Sxw * @rx_frag_frms: Count of received frames of length less than 64 1066*7eced415Sxw * octets that had bad FCS, for mac the link. 1067*7eced415Sxw * @rx_jabber_frms: Count of received frames of length more than 1518 1068*7eced415Sxw * octets that had bad FCS, for mac the link. 1069*7eced415Sxw * @rx_ttl_64_frms: Count of all received MAC frames with length of 1070*7eced415Sxw * exactly 64 octets, for mac the link. 1071*7eced415Sxw * @rx_ttl_65_127_frms: Count of all received MAC frames with length 1072*7eced415Sxw * of between 65 and 127 octets inclusive, for mac the link. 1073*7eced415Sxw * @rx_ttl_128_255_frms: Count of all received MAC frames with length 1074*7eced415Sxw * of between 128 and 255 octets inclusive, for mac the link. 1075*7eced415Sxw * @rx_ttl_256_511_frms: Count of all received MAC frames with length 1076*7eced415Sxw * of between 246 and 511 octets inclusive, for mac the link. 1077*7eced415Sxw * @rx_ttl_512_1023_frms: Count of all received MAC frames with length 1078*7eced415Sxw * of between 512 and 1023 octets inclusive, for mac the link. 1079*7eced415Sxw * @rx_ttl_1024_1518_frms: Count of all received MAC frames with length 1080*7eced415Sxw * of between 1024 and 1518 octets inclusive, for mac the link. 1081*7eced415Sxw * @rx_ttl_1519_4095_frms: Count of all received MAC frames with length 1082*7eced415Sxw * of between 1519 and 4095 octets inclusive, for mac the link. 1083*7eced415Sxw * @rx_ttl_40956_8191_frms: Count of all received MAC frames with length 1084*7eced415Sxw * of between 4096 and 8191 octets inclusive, for mac the link. 1085*7eced415Sxw * @rx_ttl_8192_max_frms: Count of all received MAC frames with length 1086*7eced415Sxw * of between 8192 and RX_MAX_PYLD_LEN+18 octets inclusive, for mac the link. 1087*7eced415Sxw * @rx_ttl_gt_max_frms: Count of all received MAC frames with length 1088*7eced415Sxw * exceeding RX_MAX_PYLD_LEN+18 octets inclusive, for mac the link. 1089*7eced415Sxw * @rx_ip: Count of received IP datagrams, for mac the link. 1090*7eced415Sxw * @rx_accepted_ip: Count of received and accepted IP datagrams, 1091*7eced415Sxw * for mac the link. 1092*7eced415Sxw * @rx_ip_octets: Count of number of octets in received IP datagrams, 1093*7eced415Sxw * for mac the link. 1094*7eced415Sxw * @rx_hdr_err_ip: Count of received IP datagrams that are discarded 1095*7eced415Sxw * due to IP header errors, for mac the link. 1096*7eced415Sxw * @rx_icmp: Count of received ICMP messages for mac the link. 1097*7eced415Sxw * @rx_tcp: Count of received TCP segments for mac the link. 1098*7eced415Sxw * @rx_udp: Count of received UDP datagrams for mac the link. 1099*7eced415Sxw * @rx_err_tcp: Count of received TCP segments containing errors for 1100*7eced415Sxw * mac the link. 1101*7eced415Sxw * @rx_pause_cnt: Count of number of pause quanta that the MAC has 1102*7eced415Sxw * been in the paused state, for mac the link. 1103*7eced415Sxw * @rx_pause_ctrl_frms: Count of received MAC PAUSE control frames for 1104*7eced415Sxw * mac the link. 1105*7eced415Sxw * @rx_unsup_ctrl_frms: Count of received MAC control frames that do 1106*7eced415Sxw * not contain the PAUSE opcode for mac the link. 1107*7eced415Sxw * @rx_fcs_err_frms: Count of received MAC frames that do not pass FCS 1108*7eced415Sxw * for mac the link. 1109*7eced415Sxw * @rx_in_rng_len_err_frms: Count of received frames with a length/type 1110*7eced415Sxw * field value between 46 and 1500 inclusive, that does not match the number 1111*7eced415Sxw * of data octets received, for mac the link. 1112*7eced415Sxw * @rx_out_rng_len_err_frms: Count of received frames with length/type 1113*7eced415Sxw * field between 1501 and 1535 decimal, inclusive. for mac the link. 1114*7eced415Sxw * @rx_drop_frms: Count of dropped frames from receive path for mac 1115*7eced415Sxw * the link. 1116*7eced415Sxw * @rx_discarded_frms: Count of discarded frames from receive path for 1117*7eced415Sxw * mac the link. 1118*7eced415Sxw * @rx_drop_ip: Count of droppen IP datagrams from receive path for 1119*7eced415Sxw * mac the link. 1120*7eced415Sxw * @rx_err_drp_udp: Count of droppen UDP datagrams from receive path 1121*7eced415Sxw * for mac the link. 1122*7eced415Sxw * @rx_lacpdu_frms: Count of valid LACPDUs received for mac the link. 1123*7eced415Sxw * @rx_marker_pdu_frms: Count of valid Marker PDUs received for mac 1124*7eced415Sxw * the link. 1125*7eced415Sxw * @rx_marker_resp_pdu_frms: Count of valid Marker Response PDUs 1126*7eced415Sxw * received for mac the link. 1127*7eced415Sxw * @rx_unknown_pdu_frms: Count of unknown PDUs received for mac the link. 1128*7eced415Sxw * @rx_illegal_pdu_frms: Count of illegal PDUs received for mac the link. 1129*7eced415Sxw * @rx_fcs_discard: Count of discarded PDUs received for mac the link. 1130*7eced415Sxw * @rx_len_discard: Count of received frames that were discarded 1131*7eced415Sxw * because of an invalid frame length, for mac the link. 1132*7eced415Sxw * @rx_len_discard: Count of received frames that were discarded 1133*7eced415Sxw * because of an invalid destination MAC address, for mac the link. 1134*7eced415Sxw * @rx_pf_discard: Count of received frames that were discarded for 1135*7eced415Sxw * mac the link. 1136*7eced415Sxw * @rx_trash_discard: Count of received frames that were steered to the 1137*7eced415Sxw * trash queue for mac the link. 1138*7eced415Sxw * @rx_rts_discard: Count of received frames that were discarded by RTS 1139*7eced415Sxw * logic for mac the link. 1140*7eced415Sxw * @rx_wol_discard: Count of received frames that were discarded by WOL 1141*7eced415Sxw * logic for mac the link. 1142*7eced415Sxw * @rx_red_discard: Count of received frames that were discarded by RED 1143*7eced415Sxw * logic for mac the link. 1144*7eced415Sxw * @rx_ingm_full_discard: Count of received frames that were discarded 1145*7eced415Sxw * because the internal ingress memory was full for mac the link. 1146*7eced415Sxw * @rx_xgmii_data_err_cnt: Count of unexpected control characters 1147*7eced415Sxw * during normal data transmission for mac the link. 1148*7eced415Sxw * @rx_xgmii_ctrl_err_cnt: Count of unexpected or misplaced control 1149*7eced415Sxw * characters occuring between times of normal data transmission for mac 1150*7eced415Sxw * the link. 1151*7eced415Sxw * @rx_xgmii_err_sym: Count of the number of symbol errors in the 1152*7eced415Sxw * received XGMII data for mac the link. 1153*7eced415Sxw * @rx_xgmii_char1_match: Count of the number of XGMII characters 1154*7eced415Sxw * that match first pattern defined in MAC_STATS_RX_XGMII_CHAR_LINK_N. 1155*7eced415Sxw * @rx_xgmii_char2_match: Count of the number of XGMII characters 1156*7eced415Sxw * that match second pattern defined in MAC_STATS_RX_XGMII_CHAR_LINK_N. 1157*7eced415Sxw * @rx_xgmii_column1_match: Count of the number of XGMII columns 1158*7eced415Sxw * that match a pattern defined in MAC_STATS_RX_XGMII_COLUMN1_LINK_N. 1159*7eced415Sxw * @rx_xgmii_column2_match: Count of the number of XGMII columns 1160*7eced415Sxw * that match a pattern defined in MAC_STATS_RX_XGMII_COLUMN1_LINK_N. 1161*7eced415Sxw * @rx_local_fault: Count of the number of local faults for mac the link. 1162*7eced415Sxw * @rx_remote_fault: Count of the number of remote faults for mac the 1163*7eced415Sxw * link. 1164*7eced415Sxw * @rx_queue_full: Count of the number of frame destined for a full 1165*7eced415Sxw * queue for mac the link. 1166*7eced415Sxw */ 1167*7eced415Sxw typedef struct xge_hal_stats_link_info_t { 1168*7eced415Sxw u64 tx_frms; 1169*7eced415Sxw u64 tx_ttl_eth_octets; 1170*7eced415Sxw u64 tx_data_octets; 1171*7eced415Sxw u64 tx_mcst_frms; 1172*7eced415Sxw u64 tx_bcst_frms; 1173*7eced415Sxw u64 tx_ucst_frms; 1174*7eced415Sxw u64 tx_tagged_frms; 1175*7eced415Sxw u64 tx_vld_ip; 1176*7eced415Sxw u64 tx_vld_ip_octets; 1177*7eced415Sxw u64 tx_icmp; 1178*7eced415Sxw u64 tx_tcp; 1179*7eced415Sxw u64 tx_rst_tcp; 1180*7eced415Sxw u64 tx_udp; 1181*7eced415Sxw u64 tx_unknown_protocol; 1182*7eced415Sxw u64 tx_parse_error; 1183*7eced415Sxw u64 tx_pause_ctrl_frms; 1184*7eced415Sxw u64 tx_lacpdu_frms; 1185*7eced415Sxw u64 tx_marker_pdu_frms; 1186*7eced415Sxw u64 tx_marker_resp_pdu_frms; 1187*7eced415Sxw u64 tx_drop_ip; 1188*7eced415Sxw u64 tx_xgmii_char1_match; 1189*7eced415Sxw u64 tx_xgmii_char2_match; 1190*7eced415Sxw u64 tx_xgmii_column1_match; 1191*7eced415Sxw u64 tx_xgmii_column2_match; 1192*7eced415Sxw u64 tx_drop_frms; 1193*7eced415Sxw u64 tx_any_err_frms; 1194*7eced415Sxw u64 rx_ttl_frms; 1195*7eced415Sxw u64 rx_vld_frms; 1196*7eced415Sxw u64 rx_offld_frms; 1197*7eced415Sxw u64 rx_ttl_eth_octets; 1198*7eced415Sxw u64 rx_data_octets; 1199*7eced415Sxw u64 rx_offld_octets; 1200*7eced415Sxw u64 rx_vld_mcst_frms; 1201*7eced415Sxw u64 rx_vld_bcst_frms; 1202*7eced415Sxw u64 rx_accepted_ucst_frms; 1203*7eced415Sxw u64 rx_accepted_nucst_frms; 1204*7eced415Sxw u64 rx_tagged_frms; 1205*7eced415Sxw u64 rx_long_frms; 1206*7eced415Sxw u64 rx_usized_frms; 1207*7eced415Sxw u64 rx_osized_frms; 1208*7eced415Sxw u64 rx_frag_frms; 1209*7eced415Sxw u64 rx_jabber_frms; 1210*7eced415Sxw u64 rx_ttl_64_frms; 1211*7eced415Sxw u64 rx_ttl_65_127_frms; 1212*7eced415Sxw u64 rx_ttl_128_255_frms; 1213*7eced415Sxw u64 rx_ttl_256_511_frms; 1214*7eced415Sxw u64 rx_ttl_512_1023_frms; 1215*7eced415Sxw u64 rx_ttl_1024_1518_frms; 1216*7eced415Sxw u64 rx_ttl_1519_4095_frms; 1217*7eced415Sxw u64 rx_ttl_40956_8191_frms; 1218*7eced415Sxw u64 rx_ttl_8192_max_frms; 1219*7eced415Sxw u64 rx_ttl_gt_max_frms; 1220*7eced415Sxw u64 rx_ip; 1221*7eced415Sxw u64 rx_ip_octets; 1222*7eced415Sxw u64 rx_hdr_err_ip; 1223*7eced415Sxw u64 rx_icmp; 1224*7eced415Sxw u64 rx_tcp; 1225*7eced415Sxw u64 rx_udp; 1226*7eced415Sxw u64 rx_err_tcp; 1227*7eced415Sxw u64 rx_pause_cnt; 1228*7eced415Sxw u64 rx_pause_ctrl_frms; 1229*7eced415Sxw u64 rx_unsup_ctrl_frms; 1230*7eced415Sxw u64 rx_in_rng_len_err_frms; 1231*7eced415Sxw u64 rx_out_rng_len_err_frms; 1232*7eced415Sxw u64 rx_drop_frms; 1233*7eced415Sxw u64 rx_discarded_frms; 1234*7eced415Sxw u64 rx_drop_ip; 1235*7eced415Sxw u64 rx_err_drp_udp; 1236*7eced415Sxw u64 rx_lacpdu_frms; 1237*7eced415Sxw u64 rx_marker_pdu_frms; 1238*7eced415Sxw u64 rx_marker_resp_pdu_frms; 1239*7eced415Sxw u64 rx_unknown_pdu_frms; 1240*7eced415Sxw u64 rx_illegal_pdu_frms; 1241*7eced415Sxw u64 rx_fcs_discard; 1242*7eced415Sxw u64 rx_len_discard; 1243*7eced415Sxw u64 rx_pf_discard; 1244*7eced415Sxw u64 rx_trash_discard; 1245*7eced415Sxw u64 rx_rts_discard; 1246*7eced415Sxw u64 rx_wol_discard; 1247*7eced415Sxw u64 rx_red_discard; 1248*7eced415Sxw u64 rx_ingm_full_discard; 1249*7eced415Sxw u64 rx_xgmii_data_err_cnt; 1250*7eced415Sxw u64 rx_xgmii_ctrl_err_cnt; 1251*7eced415Sxw u64 rx_xgmii_err_sym; 1252*7eced415Sxw u64 rx_xgmii_char1_match; 1253*7eced415Sxw u64 rx_xgmii_char2_match; 1254*7eced415Sxw u64 rx_xgmii_column1_match; 1255*7eced415Sxw u64 rx_xgmii_column2_match; 1256*7eced415Sxw u64 rx_local_fault; 1257*7eced415Sxw u64 rx_remote_fault; 1258*7eced415Sxw u64 rx_queue_full; 1259*7eced415Sxw }xge_hal_stats_link_info_t; 1260*7eced415Sxw 1261*7eced415Sxw /** 1262*7eced415Sxw * struct xge_hal_stats_aggr_info_t - XGMAC statistics for an aggregator 1263*7eced415Sxw * 1264*7eced415Sxw * @tx_frms: Count of data frames transmitted for the aggregator. 1265*7eced415Sxw * @tx_mcst_frms: Count of multicast data frames transmitted for 1266*7eced415Sxw * the aggregator. 1267*7eced415Sxw * @tx_bcst_frms: Count of broadcast data frames transmitted for 1268*7eced415Sxw * the aggregator. 1269*7eced415Sxw * @tx_discarded_frms: Count of discarded data frames transmitted for 1270*7eced415Sxw * the aggregator. 1271*7eced415Sxw * @tx_errored_frms: Count of errored data frames transmitted for 1272*7eced415Sxw * the aggregator. 1273*7eced415Sxw * @rx_frms: Count of received frames for aggregators 1274*7eced415Sxw * @rx_data_octets: Count of data and padding octets of frames received 1275*7eced415Sxw * the aggregator. 1276*7eced415Sxw * @rx_mcst_frms: Count of multicast frames received the aggregator. 1277*7eced415Sxw * @rx_bcst_frms: Count of broadast frames received the aggregator. 1278*7eced415Sxw * @rx_discarded_frms: Count of discarded frames received the aggregator. 1279*7eced415Sxw * @rx_errored_frms: Count of errored frames received the aggregator. 1280*7eced415Sxw * @rx_unknown_protocol_frms: Count of unknown protocol frames received 1281*7eced415Sxw * the aggregator. 1282*7eced415Sxw */ 1283*7eced415Sxw typedef struct xge_hal_stats_aggr_info_t { 1284*7eced415Sxw u64 tx_frms; 1285*7eced415Sxw u64 tx_mcst_frms; 1286*7eced415Sxw u64 tx_bcst_frms; 1287*7eced415Sxw u64 tx_discarded_frms; 1288*7eced415Sxw u64 tx_errored_frms; 1289*7eced415Sxw u64 rx_frms; 1290*7eced415Sxw u64 rx_data_octets; 1291*7eced415Sxw u64 rx_mcst_frms; 1292*7eced415Sxw u64 rx_bcst_frms; 1293*7eced415Sxw u64 rx_discarded_frms; 1294*7eced415Sxw u64 rx_errored_frms; 1295*7eced415Sxw u64 rx_unknown_protocol_frms; 1296*7eced415Sxw }xge_hal_stats_aggr_info_t; 1297*7eced415Sxw 1298*7eced415Sxw /** 1299*7eced415Sxw * struct xge_hal_stats_vpath_info_t - XGMAC statistics for a vpath. 1300*7eced415Sxw * 1301*7eced415Sxw * @tx_frms: Count of transmitted MAC frames for the vpath. 1302*7eced415Sxw * @tx_ttl_eth_octets: Count of total octets of transmitted frames 1303*7eced415Sxw * for the vpath. 1304*7eced415Sxw * @tx_data_octets: Count of data and padding octets of transmitted 1305*7eced415Sxw * frames for the vpath. 1306*7eced415Sxw * @tx_mcst_frms: Count of multicast MAC frames for the vpath. 1307*7eced415Sxw * @tx_bcst_frms: Count of broadcast MAC frames for the vpath. 1308*7eced415Sxw * @tx_ucst_frms: Count of unicast MAC frames for the vpath. 1309*7eced415Sxw * @tx_tagged_frms: Count of transmitted frames containing a VLAN 1310*7eced415Sxw * tag for the vpath. 1311*7eced415Sxw * @tx_vld_ip: Count of transmitted IP datagrams for the vpath. 1312*7eced415Sxw * @tx_vld_ip_octets: Count of transmitted IP octets for the vpath. 1313*7eced415Sxw * @tx_icmp: Count of transmitted ICMP messages for the vpath. 1314*7eced415Sxw * @tx_tcp: Count of transmitted TCP segments for the vpath. 1315*7eced415Sxw * @tx_rst_tcp: Count of transmitted TCP segments containing the RST 1316*7eced415Sxw * flag the vpath. 1317*7eced415Sxw * @tx_udp: Count of transmitted UDP datagrams for the vpath. 1318*7eced415Sxw * @tx_unknown_protocol: Count of transmitted packets of unknown 1319*7eced415Sxw * protocol for the vpath. 1320*7eced415Sxw * @tx_parse_error: Count of transmitted packets with parsing errors 1321*7eced415Sxw * for the vpath. 1322*7eced415Sxw * @rx_ttl_frms: Count of all received MAC frames for the vpath. 1323*7eced415Sxw * @rx_vld_frms: Count of all successfully received MAC frames for 1324*7eced415Sxw * the vpath. 1325*7eced415Sxw * @rx_offld_frms: Count of all offloaded received MAC frames for 1326*7eced415Sxw * the vpath. 1327*7eced415Sxw * @rx_ttl_eth_octets: Count of total octets of received frames, not 1328*7eced415Sxw * including framing characters for the vpath. 1329*7eced415Sxw * @rx_data_octets: Count of data and padding octets of successfully 1330*7eced415Sxw * received frames for the vpath. 1331*7eced415Sxw * @rx_offld_octets: Count of total octets, not including framing 1332*7eced415Sxw * characters, of offloaded received frames for the vpath. 1333*7eced415Sxw * @rx_vld_mcst_frms: Count of successfully received multicast MAC 1334*7eced415Sxw * frames for the vpath. 1335*7eced415Sxw * @rx_vld_bcst_frms: Count of successfully received broadcast MAC 1336*7eced415Sxw * frames for the vpath. 1337*7eced415Sxw * @rx_accepted_ucst_frms: Count of successfully received unicast 1338*7eced415Sxw * MAC frames for the vpath. 1339*7eced415Sxw * @rx_accepted_nucst_frms: Count of successfully received 1340*7eced415Sxw * non-unicast MAC frames for the vpath. 1341*7eced415Sxw * @rx_tagged_frms: Count of received frames containing a VLAN tag 1342*7eced415Sxw * for the vpath. 1343*7eced415Sxw * @rx_long_frms: Count of received frames that are longer than 1344*7eced415Sxw * RX_MAX_PYLD_LEN + 18 bytes (+ 22 bytes if VLAN-tagged) for the vpath. 1345*7eced415Sxw * @rx_usized_frms: Count of received frames of length less than 64 1346*7eced415Sxw * octets, for the vpath. 1347*7eced415Sxw * @rx_usized_frms: Count of received frames of length more than 1348*7eced415Sxw * 1518 octets, for the vpath. 1349*7eced415Sxw * @rx_osized_frms: Count of received frames of length more than 1350*7eced415Sxw * 1518 octets for the vpath. 1351*7eced415Sxw * @rx_frag_frms: Count of received frames of length less than 64 1352*7eced415Sxw * octets that had bad FCS, for the vpath. 1353*7eced415Sxw * @rx_jabber_frms: Count of received frames of length more than 1354*7eced415Sxw * 1518 octets that had bad FCS, for the vpath. 1355*7eced415Sxw * @rx_ttl_64_frms: Count of all received MAC frames with length of 1356*7eced415Sxw * exactly 64 octets, for the vpath. 1357*7eced415Sxw * @rx_ttl_65_127_frms: Count of all received MAC frames with length 1358*7eced415Sxw * of between 65 and 127 octets inclusive, for the vpath. 1359*7eced415Sxw * @rx_ttl_128_255_frms: Count of all received MAC frames with 1360*7eced415Sxw * length of between 128 and 255 octets inclusive, for the vpath. 1361*7eced415Sxw * @rx_ttl_256_511_frms: Count of all received MAC frames with 1362*7eced415Sxw * length of between 246 and 511 octets inclusive, for the vpath. 1363*7eced415Sxw * @rx_ttl_512_1023_frms: Count of all received MAC frames with 1364*7eced415Sxw * length of between 512 and 1023 octets inclusive, for the vpath. 1365*7eced415Sxw * @rx_ttl_1024_1518_frms: Count of all received MAC frames with 1366*7eced415Sxw * length of between 1024 and 1518 octets inclusive, for the vpath. 1367*7eced415Sxw * @rx_ttl_1519_4095_frms: Count of all received MAC frames with 1368*7eced415Sxw * length of between 1519 and 4095 octets inclusive, for the vpath. 1369*7eced415Sxw * @rx_ttl_40956_8191_frms: Count of all received MAC frames with 1370*7eced415Sxw * of between 4096 and 8191 octets inclusive, for the vpath. 1371*7eced415Sxw * @rx_ttl_8192_max_frms: Count of all received MAC frames with 1372*7eced415Sxw * length of between 8192 and RX_MAX_PYLD_LEN+18 octets inclusive, for the 1373*7eced415Sxw * vpath. 1374*7eced415Sxw * @rx_ttl_gt_max_frms: Count of all received MAC frames with length 1375*7eced415Sxw * exceeding RX_MAX_PYLD_LEN+18 octets inclusive, for the vpath. 1376*7eced415Sxw * @rx_ip: Count of received IP datagrams, for the vpath. 1377*7eced415Sxw * @rx_accepted_ip: Count of received and accepted IP datagrams, 1378*7eced415Sxw * for the vpath. 1379*7eced415Sxw * @rx_ip_octets: Count of number of octets in received IP datagrams 1380*7eced415Sxw * for the vpath. 1381*7eced415Sxw * @rx_hdr_err_ip: Count of received IP datagrams that are discarded 1382*7eced415Sxw * due to IP header errors, for the vpath. 1383*7eced415Sxw * @rx_icmp: Count of received ICMP messages for the vpath. 1384*7eced415Sxw * @rx_tcp: Count of received TCP segments for the vpath. 1385*7eced415Sxw * @rx_udp: Count of received UDP datagrams for the vpath. 1386*7eced415Sxw * @rx_err_tcp: Count of received TCP segments containing errors for 1387*7eced415Sxw * the vpath. 1388*7eced415Sxw * @rx_mpa_ok_frms: Count of received frames that pass the MPA 1389*7eced415Sxw * checks for vptah. 1390*7eced415Sxw * @rx_mpa_crc_fail_frms: Count of received frames that fail the MPA 1391*7eced415Sxw * CRC check for the vpath. 1392*7eced415Sxw * @rx_mpa_mrk_fail_frms: Count of received frames that fail the 1393*7eced415Sxw * MPA marker check for the vpath. 1394*7eced415Sxw * @rx_mpa_len_fail_frms: Count of received frames that fail the MPA 1395*7eced415Sxw * length check for the vpath. 1396*7eced415Sxw * @rx_wol_frms: Count of received "magic packet" frames for 1397*7eced415Sxw * the vpath. 1398*7eced415Sxw */ 1399*7eced415Sxw typedef struct xge_hal_stats_vpath_info_t { 1400*7eced415Sxw u64 tx_frms; 1401*7eced415Sxw u64 tx_ttl_eth_octets; 1402*7eced415Sxw u64 tx_data_octets; 1403*7eced415Sxw u64 tx_mcst_frms; 1404*7eced415Sxw u64 tx_bcst_frms; 1405*7eced415Sxw u64 tx_ucst_frms; 1406*7eced415Sxw u64 tx_tagged_frms; 1407*7eced415Sxw u64 tx_vld_ip; 1408*7eced415Sxw u64 tx_vld_ip_octets; 1409*7eced415Sxw u64 tx_icmp; 1410*7eced415Sxw u64 tx_tcp; 1411*7eced415Sxw u64 tx_rst_tcp; 1412*7eced415Sxw u64 tx_udp; 1413*7eced415Sxw u64 tx_unknown_protocol; 1414*7eced415Sxw u64 tx_parse_error; 1415*7eced415Sxw u64 rx_ttl_frms; 1416*7eced415Sxw u64 rx_vld_frms; 1417*7eced415Sxw u64 rx_offld_frms; 1418*7eced415Sxw u64 rx_ttl_eth_octets; 1419*7eced415Sxw u64 rx_data_octets; 1420*7eced415Sxw u64 rx_offld_octets; 1421*7eced415Sxw u64 rx_vld_mcst_frms; 1422*7eced415Sxw u64 rx_vld_bcst_frms; 1423*7eced415Sxw u64 rx_accepted_ucst_frms; 1424*7eced415Sxw u64 rx_accepted_nucst_frms; 1425*7eced415Sxw u64 rx_tagged_frms; 1426*7eced415Sxw u64 rx_long_frms; 1427*7eced415Sxw u64 rx_usized_frms; 1428*7eced415Sxw u64 rx_osized_frms; 1429*7eced415Sxw u64 rx_frag_frms; 1430*7eced415Sxw u64 rx_jabber_frms; 1431*7eced415Sxw u64 rx_ttl_64_frms; 1432*7eced415Sxw u64 rx_ttl_65_127_frms; 1433*7eced415Sxw u64 rx_ttl_128_255_frms; 1434*7eced415Sxw u64 rx_ttl_256_511_frms; 1435*7eced415Sxw u64 rx_ttl_512_1023_frms; 1436*7eced415Sxw u64 rx_ttl_1024_1518_frms; 1437*7eced415Sxw u64 rx_ttl_1519_4095_frms; 1438*7eced415Sxw u64 rx_ttl_40956_8191_frms; 1439*7eced415Sxw u64 rx_ttl_8192_max_frms; 1440*7eced415Sxw u64 rx_ttl_gt_max_frms; 1441*7eced415Sxw u64 rx_ip; 1442*7eced415Sxw u64 rx_accepted_ip; 1443*7eced415Sxw u64 rx_ip_octets; 1444*7eced415Sxw u64 rx_hdr_err_ip; 1445*7eced415Sxw u64 rx_icmp; 1446*7eced415Sxw u64 rx_tcp; 1447*7eced415Sxw u64 rx_udp; 1448*7eced415Sxw u64 rx_err_tcp; 1449*7eced415Sxw u64 rx_mpa_ok_frms; 1450*7eced415Sxw u64 rx_mpa_crc_fail_frms; 1451*7eced415Sxw u64 rx_mpa_mrk_fail_frms; 1452*7eced415Sxw u64 rx_mpa_len_fail_frms; 1453*7eced415Sxw u64 rx_wol_frms; 1454*7eced415Sxw }xge_hal_stats_vpath_info_t; 1455*7eced415Sxw 1456*7eced415Sxw /** 1457*7eced415Sxw * struct xge_hal_stats_pcim_info_t - Contains PCIM statistics 1458*7eced415Sxw * 1459*7eced415Sxw * @link_info: PCIM links info for link 0, 1, and 2. 1460*7eced415Sxw * @aggr_info: PCIM aggregators info for aggregator 0 and 1. 1461*7eced415Sxw * See also: xge_hal_stats_link_info_t{}, xge_hal_stats_aggr_info_t{}. 1462*7eced415Sxw */ 1463*7eced415Sxw typedef struct xge_hal_stats_pcim_info_t { 1464*7eced415Sxw xge_hal_stats_link_info_t link_info[XGE_HAL_MAC_LINKS]; 1465*7eced415Sxw xge_hal_stats_aggr_info_t aggr_info[XGE_HAL_MAC_AGGREGATORS]; 1466*7eced415Sxw }xge_hal_stats_pcim_info_t; 1467*7eced415Sxw 1468a23fd118Syl /** 1469a23fd118Syl * struct xge_hal_stats_t - Contains HAL per-device statistics, 1470a23fd118Syl * including hw. 1471a23fd118Syl * @devh: HAL device handle. 1472a23fd118Syl * @dma_addr: DMA addres of the %hw_info. Given to device to fill-in the stats. 1473a23fd118Syl * @hw_info_dmah: DMA handle used to map hw statistics onto the device memory 1474a23fd118Syl * space. 1475a23fd118Syl * @hw_info_dma_acch: One more DMA handle used subsequently to free the 1476a23fd118Syl * DMA object. Note that this and the previous handle have 1477a23fd118Syl * physical meaning for Solaris; on Windows and Linux the 1478a23fd118Syl * corresponding value will be simply pointer to PCI device. 1479a23fd118Syl * 1480a23fd118Syl * @hw_info: Xframe statistics maintained by the hardware. 14818347601bSyl * @hw_info_saved: TBD 14828347601bSyl * @hw_info_latest: TBD 1483*7eced415Sxw * @pcim_info: Xframe PCIM statistics maintained by the hardware. 1484*7eced415Sxw * @pcim_info_saved: TBD 1485*7eced415Sxw * @pcim_info_latest: TBD 1486a23fd118Syl * @sw_dev_info_stats: HAL's "soft" device informational statistics, e.g. number 1487a23fd118Syl * of completions per interrupt. 1488a23fd118Syl * @sw_dev_err_stats: HAL's "soft" device error statistics. 1489a23fd118Syl * 1490a23fd118Syl * @is_initialized: True, if all the subordinate structures are allocated and 1491a23fd118Syl * initialized. 1492a23fd118Syl * @is_enabled: True, if device stats collection is enabled. 1493a23fd118Syl * 1494a23fd118Syl * Structure-container of HAL per-device statistics. Note that per-channel 1495a23fd118Syl * statistics are kept in separate structures under HAL's fifo and ring 1496a23fd118Syl * channels. 1497a23fd118Syl * See also: xge_hal_stats_hw_info_t{}, xge_hal_stats_sw_err_t{}, 1498a23fd118Syl * xge_hal_stats_device_info_t{}. 1499a23fd118Syl * See also: xge_hal_stats_channel_info_t{}. 1500a23fd118Syl */ 1501a23fd118Syl typedef struct xge_hal_stats_t { 1502a23fd118Syl /* handles */ 1503a23fd118Syl xge_hal_device_h devh; 1504a23fd118Syl dma_addr_t dma_addr; 1505a23fd118Syl pci_dma_h hw_info_dmah; 1506a23fd118Syl pci_dma_acc_h hw_info_dma_acch; 1507a23fd118Syl 1508a23fd118Syl /* HAL device hardware statistics */ 1509a23fd118Syl xge_hal_stats_hw_info_t *hw_info; 1510a23fd118Syl xge_hal_stats_hw_info_t hw_info_saved; 1511a23fd118Syl xge_hal_stats_hw_info_t hw_info_latest; 1512a23fd118Syl 1513*7eced415Sxw /* HAL device hardware statistics for XFRAME ER */ 1514*7eced415Sxw xge_hal_stats_pcim_info_t *pcim_info; 1515*7eced415Sxw xge_hal_stats_pcim_info_t *pcim_info_saved; 1516*7eced415Sxw xge_hal_stats_pcim_info_t *pcim_info_latest; 1517*7eced415Sxw 1518a23fd118Syl /* HAL device "soft" stats */ 1519a23fd118Syl xge_hal_stats_sw_err_t sw_dev_err_stats; 1520a23fd118Syl xge_hal_stats_device_info_t sw_dev_info_stats; 1521a23fd118Syl 1522a23fd118Syl /* flags */ 1523a23fd118Syl int is_initialized; 1524a23fd118Syl int is_enabled; 1525a23fd118Syl } xge_hal_stats_t; 1526a23fd118Syl 1527a23fd118Syl /* ========================== STATS PRIVATE API ========================= */ 1528a23fd118Syl 1529a23fd118Syl xge_hal_status_e __hal_stats_initialize(xge_hal_stats_t *stats, 1530a23fd118Syl xge_hal_device_h devh); 1531a23fd118Syl 1532a23fd118Syl void __hal_stats_terminate(xge_hal_stats_t *stats); 1533a23fd118Syl 1534a23fd118Syl void __hal_stats_enable(xge_hal_stats_t *stats); 1535a23fd118Syl 1536a23fd118Syl void __hal_stats_disable(xge_hal_stats_t *stats); 1537a23fd118Syl 1538a23fd118Syl void __hal_stats_soft_reset(xge_hal_device_h devh, int reset_all); 1539a23fd118Syl 1540a23fd118Syl /* ========================== STATS PUBLIC API ========================= */ 1541a23fd118Syl 1542a23fd118Syl xge_hal_status_e xge_hal_stats_hw(xge_hal_device_h devh, 1543a23fd118Syl xge_hal_stats_hw_info_t **hw_info); 1544a23fd118Syl 1545*7eced415Sxw xge_hal_status_e xge_hal_stats_pcim(xge_hal_device_h devh, 1546*7eced415Sxw xge_hal_stats_pcim_info_t **pcim_info); 1547*7eced415Sxw 1548a23fd118Syl xge_hal_status_e xge_hal_stats_device(xge_hal_device_h devh, 1549a23fd118Syl xge_hal_stats_device_info_t **device_info); 1550a23fd118Syl 1551a23fd118Syl xge_hal_status_e xge_hal_stats_channel(xge_hal_channel_h channelh, 1552a23fd118Syl xge_hal_stats_channel_info_t **channel_info); 1553a23fd118Syl 1554a23fd118Syl xge_hal_status_e xge_hal_stats_reset(xge_hal_device_h devh); 1555a23fd118Syl 1556*7eced415Sxw 15578347601bSyl __EXTERN_END_DECLS 15588347601bSyl 1559a23fd118Syl #endif /* XGE_HAL_STATS_H */ 1560