[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/nxge/include/xgehal-stats.h

Version: -  FREEBSD  -  FREEBSD8  -  FREEBSD7  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  OPENSOLARIS  -  minix-3-1-1  -  FREEBSD-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  excerpts  -  bigexcerpts 

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

Cache object: ad4c5c27f4d86e422f35b5e3167a54c7


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.