1*4882a593Smuzhiyun /****************************************************************************** 2*4882a593Smuzhiyun * This software may be used and distributed according to the terms of 3*4882a593Smuzhiyun * the GNU General Public License (GPL), incorporated herein by reference. 4*4882a593Smuzhiyun * Drivers based on or derived from this code fall under the GPL and must 5*4882a593Smuzhiyun * retain the authorship, copyright and license notice. This file is not 6*4882a593Smuzhiyun * a complete program and may only be used when the entire operating 7*4882a593Smuzhiyun * system is licensed under the GPL. 8*4882a593Smuzhiyun * See the file COPYING in this distribution for more information. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * vxge-traffic.h: Driver for Exar Corp's X3100 Series 10GbE PCIe I/O 11*4882a593Smuzhiyun * Virtualized Server Adapter. 12*4882a593Smuzhiyun * Copyright(c) 2002-2010 Exar Corp. 13*4882a593Smuzhiyun ******************************************************************************/ 14*4882a593Smuzhiyun #ifndef VXGE_TRAFFIC_H 15*4882a593Smuzhiyun #define VXGE_TRAFFIC_H 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun #include "vxge-reg.h" 18*4882a593Smuzhiyun #include "vxge-version.h" 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #define VXGE_HW_DTR_MAX_T_CODE 16 21*4882a593Smuzhiyun #define VXGE_HW_ALL_FOXES 0xFFFFFFFFFFFFFFFFULL 22*4882a593Smuzhiyun #define VXGE_HW_INTR_MASK_ALL 0xFFFFFFFFFFFFFFFFULL 23*4882a593Smuzhiyun #define VXGE_HW_MAX_VIRTUAL_PATHS 17 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #define VXGE_HW_MAC_MAX_MAC_PORT_ID 2 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #define VXGE_HW_DEFAULT_32 0xffffffff 28*4882a593Smuzhiyun /* frames sizes */ 29*4882a593Smuzhiyun #define VXGE_HW_HEADER_802_2_SIZE 3 30*4882a593Smuzhiyun #define VXGE_HW_HEADER_SNAP_SIZE 5 31*4882a593Smuzhiyun #define VXGE_HW_HEADER_VLAN_SIZE 4 32*4882a593Smuzhiyun #define VXGE_HW_MAC_HEADER_MAX_SIZE \ 33*4882a593Smuzhiyun (ETH_HLEN + \ 34*4882a593Smuzhiyun VXGE_HW_HEADER_802_2_SIZE + \ 35*4882a593Smuzhiyun VXGE_HW_HEADER_VLAN_SIZE + \ 36*4882a593Smuzhiyun VXGE_HW_HEADER_SNAP_SIZE) 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun /* 32bit alignments */ 39*4882a593Smuzhiyun #define VXGE_HW_HEADER_ETHERNET_II_802_3_ALIGN 2 40*4882a593Smuzhiyun #define VXGE_HW_HEADER_802_2_SNAP_ALIGN 2 41*4882a593Smuzhiyun #define VXGE_HW_HEADER_802_2_ALIGN 3 42*4882a593Smuzhiyun #define VXGE_HW_HEADER_SNAP_ALIGN 1 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun #define VXGE_HW_L3_CKSUM_OK 0xFFFF 45*4882a593Smuzhiyun #define VXGE_HW_L4_CKSUM_OK 0xFFFF 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun /* Forward declarations */ 48*4882a593Smuzhiyun struct __vxge_hw_device; 49*4882a593Smuzhiyun struct __vxge_hw_vpath_handle; 50*4882a593Smuzhiyun struct vxge_hw_vp_config; 51*4882a593Smuzhiyun struct __vxge_hw_virtualpath; 52*4882a593Smuzhiyun struct __vxge_hw_channel; 53*4882a593Smuzhiyun struct __vxge_hw_fifo; 54*4882a593Smuzhiyun struct __vxge_hw_ring; 55*4882a593Smuzhiyun struct vxge_hw_ring_attr; 56*4882a593Smuzhiyun struct vxge_hw_mempool; 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun #ifndef TRUE 59*4882a593Smuzhiyun #define TRUE 1 60*4882a593Smuzhiyun #endif 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun #ifndef FALSE 63*4882a593Smuzhiyun #define FALSE 0 64*4882a593Smuzhiyun #endif 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun /*VXGE_HW_STATUS_H*/ 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun #define VXGE_HW_EVENT_BASE 0 69*4882a593Smuzhiyun #define VXGE_LL_EVENT_BASE 100 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun /** 72*4882a593Smuzhiyun * enum vxge_hw_event- Enumerates slow-path HW events. 73*4882a593Smuzhiyun * @VXGE_HW_EVENT_UNKNOWN: Unknown (and invalid) event. 74*4882a593Smuzhiyun * @VXGE_HW_EVENT_SERR: Serious vpath hardware error event. 75*4882a593Smuzhiyun * @VXGE_HW_EVENT_ECCERR: vpath ECC error event. 76*4882a593Smuzhiyun * @VXGE_HW_EVENT_VPATH_ERR: Error local to the respective vpath 77*4882a593Smuzhiyun * @VXGE_HW_EVENT_FIFO_ERR: FIFO Doorbell fifo error. 78*4882a593Smuzhiyun * @VXGE_HW_EVENT_SRPCIM_SERR: srpcim hardware error event. 79*4882a593Smuzhiyun * @VXGE_HW_EVENT_MRPCIM_SERR: mrpcim hardware error event. 80*4882a593Smuzhiyun * @VXGE_HW_EVENT_MRPCIM_ECCERR: mrpcim ecc error event. 81*4882a593Smuzhiyun * @VXGE_HW_EVENT_RESET_START: Privileged entity is starting device reset 82*4882a593Smuzhiyun * @VXGE_HW_EVENT_RESET_COMPLETE: Device reset has been completed 83*4882a593Smuzhiyun * @VXGE_HW_EVENT_SLOT_FREEZE: Slot-freeze event. Driver tries to distinguish 84*4882a593Smuzhiyun * slot-freeze from the rest critical events (e.g. ECC) when it is 85*4882a593Smuzhiyun * impossible to PIO read "through" the bus, i.e. when getting all-foxes. 86*4882a593Smuzhiyun * 87*4882a593Smuzhiyun * enum vxge_hw_event enumerates slow-path HW eventis. 88*4882a593Smuzhiyun * 89*4882a593Smuzhiyun * See also: struct vxge_hw_uld_cbs{}, vxge_uld_link_up_f{}, 90*4882a593Smuzhiyun * vxge_uld_link_down_f{}. 91*4882a593Smuzhiyun */ 92*4882a593Smuzhiyun enum vxge_hw_event { 93*4882a593Smuzhiyun VXGE_HW_EVENT_UNKNOWN = 0, 94*4882a593Smuzhiyun /* HW events */ 95*4882a593Smuzhiyun VXGE_HW_EVENT_RESET_START = VXGE_HW_EVENT_BASE + 1, 96*4882a593Smuzhiyun VXGE_HW_EVENT_RESET_COMPLETE = VXGE_HW_EVENT_BASE + 2, 97*4882a593Smuzhiyun VXGE_HW_EVENT_LINK_DOWN = VXGE_HW_EVENT_BASE + 3, 98*4882a593Smuzhiyun VXGE_HW_EVENT_LINK_UP = VXGE_HW_EVENT_BASE + 4, 99*4882a593Smuzhiyun VXGE_HW_EVENT_ALARM_CLEARED = VXGE_HW_EVENT_BASE + 5, 100*4882a593Smuzhiyun VXGE_HW_EVENT_ECCERR = VXGE_HW_EVENT_BASE + 6, 101*4882a593Smuzhiyun VXGE_HW_EVENT_MRPCIM_ECCERR = VXGE_HW_EVENT_BASE + 7, 102*4882a593Smuzhiyun VXGE_HW_EVENT_FIFO_ERR = VXGE_HW_EVENT_BASE + 8, 103*4882a593Smuzhiyun VXGE_HW_EVENT_VPATH_ERR = VXGE_HW_EVENT_BASE + 9, 104*4882a593Smuzhiyun VXGE_HW_EVENT_CRITICAL_ERR = VXGE_HW_EVENT_BASE + 10, 105*4882a593Smuzhiyun VXGE_HW_EVENT_SERR = VXGE_HW_EVENT_BASE + 11, 106*4882a593Smuzhiyun VXGE_HW_EVENT_SRPCIM_SERR = VXGE_HW_EVENT_BASE + 12, 107*4882a593Smuzhiyun VXGE_HW_EVENT_MRPCIM_SERR = VXGE_HW_EVENT_BASE + 13, 108*4882a593Smuzhiyun VXGE_HW_EVENT_SLOT_FREEZE = VXGE_HW_EVENT_BASE + 14, 109*4882a593Smuzhiyun }; 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun #define VXGE_HW_SET_LEVEL(a, b) (((a) > (b)) ? (a) : (b)) 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun /* 114*4882a593Smuzhiyun * struct vxge_hw_mempool_dma - Represents DMA objects passed to the 115*4882a593Smuzhiyun caller. 116*4882a593Smuzhiyun */ 117*4882a593Smuzhiyun struct vxge_hw_mempool_dma { 118*4882a593Smuzhiyun dma_addr_t addr; 119*4882a593Smuzhiyun struct pci_dev *handle; 120*4882a593Smuzhiyun struct pci_dev *acc_handle; 121*4882a593Smuzhiyun }; 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun /* 124*4882a593Smuzhiyun * vxge_hw_mempool_item_f - Mempool item alloc/free callback 125*4882a593Smuzhiyun * @mempoolh: Memory pool handle. 126*4882a593Smuzhiyun * @memblock: Address of memory block 127*4882a593Smuzhiyun * @memblock_index: Index of memory block 128*4882a593Smuzhiyun * @item: Item that gets allocated or freed. 129*4882a593Smuzhiyun * @index: Item's index in the memory pool. 130*4882a593Smuzhiyun * @is_last: True, if this item is the last one in the pool; false - otherwise. 131*4882a593Smuzhiyun * userdata: Per-pool user context. 132*4882a593Smuzhiyun * 133*4882a593Smuzhiyun * Memory pool allocation/deallocation callback. 134*4882a593Smuzhiyun */ 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun /* 137*4882a593Smuzhiyun * struct vxge_hw_mempool - Memory pool. 138*4882a593Smuzhiyun */ 139*4882a593Smuzhiyun struct vxge_hw_mempool { 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun void (*item_func_alloc)( 142*4882a593Smuzhiyun struct vxge_hw_mempool *mempoolh, 143*4882a593Smuzhiyun u32 memblock_index, 144*4882a593Smuzhiyun struct vxge_hw_mempool_dma *dma_object, 145*4882a593Smuzhiyun u32 index, 146*4882a593Smuzhiyun u32 is_last); 147*4882a593Smuzhiyun 148*4882a593Smuzhiyun void *userdata; 149*4882a593Smuzhiyun void **memblocks_arr; 150*4882a593Smuzhiyun void **memblocks_priv_arr; 151*4882a593Smuzhiyun struct vxge_hw_mempool_dma *memblocks_dma_arr; 152*4882a593Smuzhiyun struct __vxge_hw_device *devh; 153*4882a593Smuzhiyun u32 memblock_size; 154*4882a593Smuzhiyun u32 memblocks_max; 155*4882a593Smuzhiyun u32 memblocks_allocated; 156*4882a593Smuzhiyun u32 item_size; 157*4882a593Smuzhiyun u32 items_max; 158*4882a593Smuzhiyun u32 items_initial; 159*4882a593Smuzhiyun u32 items_current; 160*4882a593Smuzhiyun u32 items_per_memblock; 161*4882a593Smuzhiyun void **items_arr; 162*4882a593Smuzhiyun u32 items_priv_size; 163*4882a593Smuzhiyun }; 164*4882a593Smuzhiyun 165*4882a593Smuzhiyun #define VXGE_HW_MAX_INTR_PER_VP 4 166*4882a593Smuzhiyun #define VXGE_HW_VPATH_INTR_TX 0 167*4882a593Smuzhiyun #define VXGE_HW_VPATH_INTR_RX 1 168*4882a593Smuzhiyun #define VXGE_HW_VPATH_INTR_EINTA 2 169*4882a593Smuzhiyun #define VXGE_HW_VPATH_INTR_BMAP 3 170*4882a593Smuzhiyun 171*4882a593Smuzhiyun #define VXGE_HW_BLOCK_SIZE 4096 172*4882a593Smuzhiyun 173*4882a593Smuzhiyun /** 174*4882a593Smuzhiyun * struct vxge_hw_tim_intr_config - Titan Tim interrupt configuration. 175*4882a593Smuzhiyun * @intr_enable: Set to 1, if interrupt is enabled. 176*4882a593Smuzhiyun * @btimer_val: Boundary Timer Initialization value in units of 272 ns. 177*4882a593Smuzhiyun * @timer_ac_en: Timer Automatic Cancel. 1 : Automatic Canceling Enable: when 178*4882a593Smuzhiyun * asserted, other interrupt-generating entities will cancel the 179*4882a593Smuzhiyun * scheduled timer interrupt. 180*4882a593Smuzhiyun * @timer_ci_en: Timer Continuous Interrupt. 1 : Continuous Interrupting Enable: 181*4882a593Smuzhiyun * When asserted, an interrupt will be generated every time the 182*4882a593Smuzhiyun * boundary timer expires, even if no traffic has been transmitted 183*4882a593Smuzhiyun * on this interrupt. 184*4882a593Smuzhiyun * @timer_ri_en: Timer Consecutive (Re-) Interrupt 1 : Consecutive 185*4882a593Smuzhiyun * (Re-) Interrupt Enable: When asserted, an interrupt will be 186*4882a593Smuzhiyun * generated the next time the timer expires, even if no traffic has 187*4882a593Smuzhiyun * been transmitted on this interrupt. (This will only happen once 188*4882a593Smuzhiyun * each time that this value is written to the TIM.) This bit is 189*4882a593Smuzhiyun * cleared by H/W at the end of the current-timer-interval when 190*4882a593Smuzhiyun * the interrupt is triggered. 191*4882a593Smuzhiyun * @rtimer_val: Restriction Timer Initialization value in units of 272 ns. 192*4882a593Smuzhiyun * @util_sel: Utilization Selector. Selects which of the workload approximations 193*4882a593Smuzhiyun * to use (e.g. legacy Tx utilization, Tx/Rx utilization, host 194*4882a593Smuzhiyun * specified utilization etc.), selects one of 195*4882a593Smuzhiyun * the 17 host configured values. 196*4882a593Smuzhiyun * 0-Virtual Path 0 197*4882a593Smuzhiyun * 1-Virtual Path 1 198*4882a593Smuzhiyun * ... 199*4882a593Smuzhiyun * 16-Virtual Path 17 200*4882a593Smuzhiyun * 17-Legacy Tx network utilization, provided by TPA 201*4882a593Smuzhiyun * 18-Legacy Rx network utilization, provided by FAU 202*4882a593Smuzhiyun * 19-Average of legacy Rx and Tx utilization calculated from link 203*4882a593Smuzhiyun * utilization values. 204*4882a593Smuzhiyun * 20-31-Invalid configurations 205*4882a593Smuzhiyun * 32-Host utilization for Virtual Path 0 206*4882a593Smuzhiyun * 33-Host utilization for Virtual Path 1 207*4882a593Smuzhiyun * ... 208*4882a593Smuzhiyun * 48-Host utilization for Virtual Path 17 209*4882a593Smuzhiyun * 49-Legacy Tx network utilization, provided by TPA 210*4882a593Smuzhiyun * 50-Legacy Rx network utilization, provided by FAU 211*4882a593Smuzhiyun * 51-Average of legacy Rx and Tx utilization calculated from 212*4882a593Smuzhiyun * link utilization values. 213*4882a593Smuzhiyun * 52-63-Invalid configurations 214*4882a593Smuzhiyun * @ltimer_val: Latency Timer Initialization Value in units of 272 ns. 215*4882a593Smuzhiyun * @txd_cnt_en: TxD Return Event Count Enable. This configuration bit when set 216*4882a593Smuzhiyun * to 1 enables counting of TxD0 returns (signalled by PCC's), 217*4882a593Smuzhiyun * towards utilization event count values. 218*4882a593Smuzhiyun * @urange_a: Defines the upper limit (in percent) for this utilization range 219*4882a593Smuzhiyun * to be active. This range is considered active 220*4882a593Smuzhiyun * if 0 = UTIL = URNG_A 221*4882a593Smuzhiyun * and the UEC_A field (below) is non-zero. 222*4882a593Smuzhiyun * @uec_a: Utilization Event Count A. If this range is active, the adapter will 223*4882a593Smuzhiyun * wait until UEC_A events have occurred on the interrupt before 224*4882a593Smuzhiyun * generating an interrupt. 225*4882a593Smuzhiyun * @urange_b: Link utilization range B. 226*4882a593Smuzhiyun * @uec_b: Utilization Event Count B. 227*4882a593Smuzhiyun * @urange_c: Link utilization range C. 228*4882a593Smuzhiyun * @uec_c: Utilization Event Count C. 229*4882a593Smuzhiyun * @urange_d: Link utilization range D. 230*4882a593Smuzhiyun * @uec_d: Utilization Event Count D. 231*4882a593Smuzhiyun * Traffic Interrupt Controller Module interrupt configuration. 232*4882a593Smuzhiyun */ 233*4882a593Smuzhiyun struct vxge_hw_tim_intr_config { 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun u32 intr_enable; 236*4882a593Smuzhiyun #define VXGE_HW_TIM_INTR_ENABLE 1 237*4882a593Smuzhiyun #define VXGE_HW_TIM_INTR_DISABLE 0 238*4882a593Smuzhiyun #define VXGE_HW_TIM_INTR_DEFAULT 0 239*4882a593Smuzhiyun 240*4882a593Smuzhiyun u32 btimer_val; 241*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_BTIMER_VAL 0 242*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_BTIMER_VAL 67108864 243*4882a593Smuzhiyun #define VXGE_HW_USE_FLASH_DEFAULT (~0) 244*4882a593Smuzhiyun 245*4882a593Smuzhiyun u32 timer_ac_en; 246*4882a593Smuzhiyun #define VXGE_HW_TIM_TIMER_AC_ENABLE 1 247*4882a593Smuzhiyun #define VXGE_HW_TIM_TIMER_AC_DISABLE 0 248*4882a593Smuzhiyun 249*4882a593Smuzhiyun u32 timer_ci_en; 250*4882a593Smuzhiyun #define VXGE_HW_TIM_TIMER_CI_ENABLE 1 251*4882a593Smuzhiyun #define VXGE_HW_TIM_TIMER_CI_DISABLE 0 252*4882a593Smuzhiyun 253*4882a593Smuzhiyun u32 timer_ri_en; 254*4882a593Smuzhiyun #define VXGE_HW_TIM_TIMER_RI_ENABLE 1 255*4882a593Smuzhiyun #define VXGE_HW_TIM_TIMER_RI_DISABLE 0 256*4882a593Smuzhiyun 257*4882a593Smuzhiyun u32 rtimer_val; 258*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_RTIMER_VAL 0 259*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_RTIMER_VAL 67108864 260*4882a593Smuzhiyun 261*4882a593Smuzhiyun u32 util_sel; 262*4882a593Smuzhiyun #define VXGE_HW_TIM_UTIL_SEL_LEGACY_TX_NET_UTIL 17 263*4882a593Smuzhiyun #define VXGE_HW_TIM_UTIL_SEL_LEGACY_RX_NET_UTIL 18 264*4882a593Smuzhiyun #define VXGE_HW_TIM_UTIL_SEL_LEGACY_TX_RX_AVE_NET_UTIL 19 265*4882a593Smuzhiyun #define VXGE_HW_TIM_UTIL_SEL_PER_VPATH 63 266*4882a593Smuzhiyun 267*4882a593Smuzhiyun u32 ltimer_val; 268*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_LTIMER_VAL 0 269*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_LTIMER_VAL 67108864 270*4882a593Smuzhiyun 271*4882a593Smuzhiyun /* Line utilization interrupts */ 272*4882a593Smuzhiyun u32 urange_a; 273*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_URANGE_A 0 274*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_URANGE_A 100 275*4882a593Smuzhiyun 276*4882a593Smuzhiyun u32 uec_a; 277*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_UEC_A 0 278*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_UEC_A 65535 279*4882a593Smuzhiyun 280*4882a593Smuzhiyun u32 urange_b; 281*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_URANGE_B 0 282*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_URANGE_B 100 283*4882a593Smuzhiyun 284*4882a593Smuzhiyun u32 uec_b; 285*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_UEC_B 0 286*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_UEC_B 65535 287*4882a593Smuzhiyun 288*4882a593Smuzhiyun u32 urange_c; 289*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_URANGE_C 0 290*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_URANGE_C 100 291*4882a593Smuzhiyun 292*4882a593Smuzhiyun u32 uec_c; 293*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_UEC_C 0 294*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_UEC_C 65535 295*4882a593Smuzhiyun 296*4882a593Smuzhiyun u32 uec_d; 297*4882a593Smuzhiyun #define VXGE_HW_MIN_TIM_UEC_D 0 298*4882a593Smuzhiyun #define VXGE_HW_MAX_TIM_UEC_D 65535 299*4882a593Smuzhiyun }; 300*4882a593Smuzhiyun 301*4882a593Smuzhiyun #define VXGE_HW_STATS_OP_READ 0 302*4882a593Smuzhiyun #define VXGE_HW_STATS_OP_CLEAR_STAT 1 303*4882a593Smuzhiyun #define VXGE_HW_STATS_OP_CLEAR_ALL_VPATH_STATS 2 304*4882a593Smuzhiyun #define VXGE_HW_STATS_OP_CLEAR_ALL_STATS_OF_LOC 2 305*4882a593Smuzhiyun #define VXGE_HW_STATS_OP_CLEAR_ALL_STATS 3 306*4882a593Smuzhiyun 307*4882a593Smuzhiyun #define VXGE_HW_STATS_LOC_AGGR 17 308*4882a593Smuzhiyun #define VXGE_HW_STATS_AGGRn_OFFSET 0x00720 309*4882a593Smuzhiyun 310*4882a593Smuzhiyun #define VXGE_HW_STATS_VPATH_TX_OFFSET 0x0 311*4882a593Smuzhiyun #define VXGE_HW_STATS_VPATH_RX_OFFSET 0x00090 312*4882a593Smuzhiyun 313*4882a593Smuzhiyun #define VXGE_HW_STATS_VPATH_PROG_EVENT_VNUM0_OFFSET (0x001d0 >> 3) 314*4882a593Smuzhiyun #define VXGE_HW_STATS_GET_VPATH_PROG_EVENT_VNUM0(bits) \ 315*4882a593Smuzhiyun vxge_bVALn(bits, 0, 32) 316*4882a593Smuzhiyun 317*4882a593Smuzhiyun #define VXGE_HW_STATS_GET_VPATH_PROG_EVENT_VNUM1(bits) \ 318*4882a593Smuzhiyun vxge_bVALn(bits, 32, 32) 319*4882a593Smuzhiyun 320*4882a593Smuzhiyun #define VXGE_HW_STATS_VPATH_PROG_EVENT_VNUM2_OFFSET (0x001d8 >> 3) 321*4882a593Smuzhiyun #define VXGE_HW_STATS_GET_VPATH_PROG_EVENT_VNUM2(bits) \ 322*4882a593Smuzhiyun vxge_bVALn(bits, 0, 32) 323*4882a593Smuzhiyun 324*4882a593Smuzhiyun #define VXGE_HW_STATS_GET_VPATH_PROG_EVENT_VNUM3(bits) \ 325*4882a593Smuzhiyun vxge_bVALn(bits, 32, 32) 326*4882a593Smuzhiyun 327*4882a593Smuzhiyun /** 328*4882a593Smuzhiyun * struct vxge_hw_xmac_aggr_stats - Per-Aggregator XMAC Statistics 329*4882a593Smuzhiyun * 330*4882a593Smuzhiyun * @tx_frms: Count of data frames transmitted on this Aggregator on all 331*4882a593Smuzhiyun * its Aggregation ports. Does not include LACPDUs or Marker PDUs. 332*4882a593Smuzhiyun * However, does include frames discarded by the Distribution 333*4882a593Smuzhiyun * function. 334*4882a593Smuzhiyun * @tx_data_octets: Count of data and padding octets of frames transmitted 335*4882a593Smuzhiyun * on this Aggregator on all its Aggregation ports. Does not include 336*4882a593Smuzhiyun * octets of LACPDUs or Marker PDUs. However, does include octets of 337*4882a593Smuzhiyun * frames discarded by the Distribution function. 338*4882a593Smuzhiyun * @tx_mcast_frms: Count of data frames transmitted (to a group destination 339*4882a593Smuzhiyun * address other than the broadcast address) on this Aggregator on 340*4882a593Smuzhiyun * all its Aggregation ports. Does not include LACPDUs or Marker 341*4882a593Smuzhiyun * PDUs. However, does include frames discarded by the Distribution 342*4882a593Smuzhiyun * function. 343*4882a593Smuzhiyun * @tx_bcast_frms: Count of broadcast data frames transmitted on this Aggregator 344*4882a593Smuzhiyun * on all its Aggregation ports. Does not include LACPDUs or Marker 345*4882a593Smuzhiyun * PDUs. However, does include frames discarded by the Distribution 346*4882a593Smuzhiyun * function. 347*4882a593Smuzhiyun * @tx_discarded_frms: Count of data frames to be transmitted on this Aggregator 348*4882a593Smuzhiyun * that are discarded by the Distribution function. This occurs when 349*4882a593Smuzhiyun * conversation are allocated to different ports and have to be 350*4882a593Smuzhiyun * flushed on old ports 351*4882a593Smuzhiyun * @tx_errored_frms: Count of data frames transmitted on this Aggregator that 352*4882a593Smuzhiyun * experience transmission errors on its Aggregation ports. 353*4882a593Smuzhiyun * @rx_frms: Count of data frames received on this Aggregator on all its 354*4882a593Smuzhiyun * Aggregation ports. Does not include LACPDUs or Marker PDUs. 355*4882a593Smuzhiyun * Also, does not include frames discarded by the Collection 356*4882a593Smuzhiyun * function. 357*4882a593Smuzhiyun * @rx_data_octets: Count of data and padding octets of frames received on this 358*4882a593Smuzhiyun * Aggregator on all its Aggregation ports. Does not include octets 359*4882a593Smuzhiyun * of LACPDUs or Marker PDUs. Also, does not include 360*4882a593Smuzhiyun * octets of frames 361*4882a593Smuzhiyun * discarded by the Collection function. 362*4882a593Smuzhiyun * @rx_mcast_frms: Count of data frames received (from a group destination 363*4882a593Smuzhiyun * address other than the broadcast address) on this Aggregator on 364*4882a593Smuzhiyun * all its Aggregation ports. Does not include LACPDUs or Marker 365*4882a593Smuzhiyun * PDUs. Also, does not include frames discarded by the Collection 366*4882a593Smuzhiyun * function. 367*4882a593Smuzhiyun * @rx_bcast_frms: Count of broadcast data frames received on this Aggregator on 368*4882a593Smuzhiyun * all its Aggregation ports. Does not include LACPDUs or Marker 369*4882a593Smuzhiyun * PDUs. Also, does not include frames discarded by the Collection 370*4882a593Smuzhiyun * function. 371*4882a593Smuzhiyun * @rx_discarded_frms: Count of data frames received on this Aggregator that are 372*4882a593Smuzhiyun * discarded by the Collection function because the Collection 373*4882a593Smuzhiyun * function was disabled on the port which the frames are received. 374*4882a593Smuzhiyun * @rx_errored_frms: Count of data frames received on this Aggregator that are 375*4882a593Smuzhiyun * discarded by its Aggregation ports, or are discarded by the 376*4882a593Smuzhiyun * Collection function of the Aggregator, or that are discarded by 377*4882a593Smuzhiyun * the Aggregator due to detection of an illegal Slow Protocols PDU. 378*4882a593Smuzhiyun * @rx_unknown_slow_proto_frms: Count of data frames received on this Aggregator 379*4882a593Smuzhiyun * that are discarded by its Aggregation ports due to detection of 380*4882a593Smuzhiyun * an unknown Slow Protocols PDU. 381*4882a593Smuzhiyun * 382*4882a593Smuzhiyun * Per aggregator XMAC RX statistics. 383*4882a593Smuzhiyun */ 384*4882a593Smuzhiyun struct vxge_hw_xmac_aggr_stats { 385*4882a593Smuzhiyun /*0x000*/ u64 tx_frms; 386*4882a593Smuzhiyun /*0x008*/ u64 tx_data_octets; 387*4882a593Smuzhiyun /*0x010*/ u64 tx_mcast_frms; 388*4882a593Smuzhiyun /*0x018*/ u64 tx_bcast_frms; 389*4882a593Smuzhiyun /*0x020*/ u64 tx_discarded_frms; 390*4882a593Smuzhiyun /*0x028*/ u64 tx_errored_frms; 391*4882a593Smuzhiyun /*0x030*/ u64 rx_frms; 392*4882a593Smuzhiyun /*0x038*/ u64 rx_data_octets; 393*4882a593Smuzhiyun /*0x040*/ u64 rx_mcast_frms; 394*4882a593Smuzhiyun /*0x048*/ u64 rx_bcast_frms; 395*4882a593Smuzhiyun /*0x050*/ u64 rx_discarded_frms; 396*4882a593Smuzhiyun /*0x058*/ u64 rx_errored_frms; 397*4882a593Smuzhiyun /*0x060*/ u64 rx_unknown_slow_proto_frms; 398*4882a593Smuzhiyun } __packed; 399*4882a593Smuzhiyun 400*4882a593Smuzhiyun /** 401*4882a593Smuzhiyun * struct vxge_hw_xmac_port_stats - XMAC Port Statistics 402*4882a593Smuzhiyun * 403*4882a593Smuzhiyun * @tx_ttl_frms: Count of successfully transmitted MAC frames 404*4882a593Smuzhiyun * @tx_ttl_octets: Count of total octets of transmitted frames, not including 405*4882a593Smuzhiyun * framing characters (i.e. less framing bits). To determine the 406*4882a593Smuzhiyun * total octets of transmitted frames, including framing characters, 407*4882a593Smuzhiyun * multiply PORTn_TX_TTL_FRMS by 8 and add it to this stat (unless 408*4882a593Smuzhiyun * otherwise configured, this stat only counts frames that have 409*4882a593Smuzhiyun * 8 bytes of preamble for each frame). This stat can be configured 410*4882a593Smuzhiyun * (see XMAC_STATS_GLOBAL_CFG.TTL_FRMS_HANDLING) to count everything 411*4882a593Smuzhiyun * including the preamble octets. 412*4882a593Smuzhiyun * @tx_data_octets: Count of data and padding octets of successfully transmitted 413*4882a593Smuzhiyun * frames. 414*4882a593Smuzhiyun * @tx_mcast_frms: Count of successfully transmitted frames to a group address 415*4882a593Smuzhiyun * other than the broadcast address. 416*4882a593Smuzhiyun * @tx_bcast_frms: Count of successfully transmitted frames to the broadcast 417*4882a593Smuzhiyun * group address. 418*4882a593Smuzhiyun * @tx_ucast_frms: Count of transmitted frames containing a unicast address. 419*4882a593Smuzhiyun * Includes discarded frames that are not sent to the network. 420*4882a593Smuzhiyun * @tx_tagged_frms: Count of transmitted frames containing a VLAN tag. 421*4882a593Smuzhiyun * @tx_vld_ip: Count of transmitted IP datagrams that are passed to the network. 422*4882a593Smuzhiyun * @tx_vld_ip_octets: Count of total octets of transmitted IP datagrams that 423*4882a593Smuzhiyun * are passed to the network. 424*4882a593Smuzhiyun * @tx_icmp: Count of transmitted ICMP messages. Includes messages not sent 425*4882a593Smuzhiyun * due to problems within ICMP. 426*4882a593Smuzhiyun * @tx_tcp: Count of transmitted TCP segments. Does not include segments 427*4882a593Smuzhiyun * containing retransmitted octets. 428*4882a593Smuzhiyun * @tx_rst_tcp: Count of transmitted TCP segments containing the RST flag. 429*4882a593Smuzhiyun * @tx_udp: Count of transmitted UDP datagrams. 430*4882a593Smuzhiyun * @tx_parse_error: Increments when the TPA is unable to parse a packet. This 431*4882a593Smuzhiyun * generally occurs when a packet is corrupt somehow, including 432*4882a593Smuzhiyun * packets that have IP version mismatches, invalid Layer 2 control 433*4882a593Smuzhiyun * fields, etc. L3/L4 checksums are not offloaded, but the packet 434*4882a593Smuzhiyun * is still be transmitted. 435*4882a593Smuzhiyun * @tx_unknown_protocol: Increments when the TPA encounters an unknown 436*4882a593Smuzhiyun * protocol, such as a new IPv6 extension header, or an unsupported 437*4882a593Smuzhiyun * Routing Type. The packet still has a checksum calculated but it 438*4882a593Smuzhiyun * may be incorrect. 439*4882a593Smuzhiyun * @tx_pause_ctrl_frms: Count of MAC PAUSE control frames that are transmitted. 440*4882a593Smuzhiyun * Since, the only control frames supported by this device are 441*4882a593Smuzhiyun * PAUSE frames, this register is a count of all transmitted MAC 442*4882a593Smuzhiyun * control frames. 443*4882a593Smuzhiyun * @tx_marker_pdu_frms: Count of Marker PDUs transmitted 444*4882a593Smuzhiyun * on this Aggregation port. 445*4882a593Smuzhiyun * @tx_lacpdu_frms: Count of LACPDUs transmitted on this Aggregation port. 446*4882a593Smuzhiyun * @tx_drop_ip: Count of transmitted IP datagrams that could not be passed to 447*4882a593Smuzhiyun * the network. Increments because of: 448*4882a593Smuzhiyun * 1) An internal processing error 449*4882a593Smuzhiyun * (such as an uncorrectable ECC error). 2) A frame parsing error 450*4882a593Smuzhiyun * during IP checksum calculation. 451*4882a593Smuzhiyun * @tx_marker_resp_pdu_frms: Count of Marker Response PDUs transmitted on this 452*4882a593Smuzhiyun * Aggregation port. 453*4882a593Smuzhiyun * @tx_xgmii_char2_match: Maintains a count of the number of transmitted XGMII 454*4882a593Smuzhiyun * characters that match a pattern that is programmable through 455*4882a593Smuzhiyun * register XMAC_STATS_TX_XGMII_CHAR_PORTn. By default, the pattern 456*4882a593Smuzhiyun * is set to /T/ (i.e. the terminate character), thus the statistic 457*4882a593Smuzhiyun * tracks the number of transmitted Terminate characters. 458*4882a593Smuzhiyun * @tx_xgmii_char1_match: Maintains a count of the number of transmitted XGMII 459*4882a593Smuzhiyun * characters that match a pattern that is programmable through 460*4882a593Smuzhiyun * register XMAC_STATS_TX_XGMII_CHAR_PORTn. By default, the pattern 461*4882a593Smuzhiyun * is set to /S/ (i.e. the start character), 462*4882a593Smuzhiyun * thus the statistic tracks 463*4882a593Smuzhiyun * the number of transmitted Start characters. 464*4882a593Smuzhiyun * @tx_xgmii_column2_match: Maintains a count of the number of transmitted XGMII 465*4882a593Smuzhiyun * columns that match a pattern that is programmable through register 466*4882a593Smuzhiyun * XMAC_STATS_TX_XGMII_COLUMN2_PORTn. By default, the pattern is set 467*4882a593Smuzhiyun * to 4 x /E/ (i.e. a column containing all error characters), thus 468*4882a593Smuzhiyun * the statistic tracks the number of Error columns transmitted at 469*4882a593Smuzhiyun * any time. If XMAC_STATS_TX_XGMII_BEHAV_COLUMN2_PORTn.NEAR_COL1 is 470*4882a593Smuzhiyun * set to 1, then this stat increments when COLUMN2 is found within 471*4882a593Smuzhiyun * 'n' clocks after COLUMN1. Here, 'n' is defined by 472*4882a593Smuzhiyun * XMAC_STATS_TX_XGMII_BEHAV_COLUMN2_PORTn.NUM_COL (if 'n' is set 473*4882a593Smuzhiyun * to 0, then it means to search anywhere for COLUMN2). 474*4882a593Smuzhiyun * @tx_xgmii_column1_match: Maintains a count of the number of transmitted XGMII 475*4882a593Smuzhiyun * columns that match a pattern that is programmable through register 476*4882a593Smuzhiyun * XMAC_STATS_TX_XGMII_COLUMN1_PORTn. By default, the pattern is set 477*4882a593Smuzhiyun * to 4 x /I/ (i.e. a column containing all idle characters), 478*4882a593Smuzhiyun * thus the statistic tracks the number of transmitted Idle columns. 479*4882a593Smuzhiyun * @tx_any_err_frms: Count of transmitted frames containing any error that 480*4882a593Smuzhiyun * prevents them from being passed to the network. Increments if 481*4882a593Smuzhiyun * there is an ECC while reading the frame out of the transmit 482*4882a593Smuzhiyun * buffer. Also increments if the transmit protocol assist (TPA) 483*4882a593Smuzhiyun * block determines that the frame should not be sent. 484*4882a593Smuzhiyun * @tx_drop_frms: Count of frames that could not be sent for no other reason 485*4882a593Smuzhiyun * than internal MAC processing. Increments once whenever the 486*4882a593Smuzhiyun * transmit buffer is flushed (due to an ECC error on a memory 487*4882a593Smuzhiyun * descriptor). 488*4882a593Smuzhiyun * @rx_ttl_frms: Count of total received MAC frames, including frames received 489*4882a593Smuzhiyun * with frame-too-long, FCS, or length errors. This stat can be 490*4882a593Smuzhiyun * configured (see XMAC_STATS_GLOBAL_CFG.TTL_FRMS_HANDLING) to count 491*4882a593Smuzhiyun * everything, even "frames" as small one byte of preamble. 492*4882a593Smuzhiyun * @rx_vld_frms: Count of successfully received MAC frames. Does not include 493*4882a593Smuzhiyun * frames received with frame-too-long, FCS, or length errors. 494*4882a593Smuzhiyun * @rx_offload_frms: Count of offloaded received frames that are passed to 495*4882a593Smuzhiyun * the host. 496*4882a593Smuzhiyun * @rx_ttl_octets: Count of total octets of received frames, not including 497*4882a593Smuzhiyun * framing characters (i.e. less framing bits). To determine the 498*4882a593Smuzhiyun * total octets of received frames, including framing characters, 499*4882a593Smuzhiyun * multiply PORTn_RX_TTL_FRMS by 8 and add it to this stat (unless 500*4882a593Smuzhiyun * otherwise configured, this stat only counts frames that have 8 501*4882a593Smuzhiyun * bytes of preamble for each frame). This stat can be configured 502*4882a593Smuzhiyun * (see XMAC_STATS_GLOBAL_CFG.TTL_FRMS_HANDLING) to count everything, 503*4882a593Smuzhiyun * even the preamble octets of "frames" as small one byte of preamble 504*4882a593Smuzhiyun * @rx_data_octets: Count of data and padding octets of successfully received 505*4882a593Smuzhiyun * frames. Does not include frames received with frame-too-long, 506*4882a593Smuzhiyun * FCS, or length errors. 507*4882a593Smuzhiyun * @rx_offload_octets: Count of total octets, not including framing 508*4882a593Smuzhiyun * characters, of offloaded received frames that are passed 509*4882a593Smuzhiyun * to the host. 510*4882a593Smuzhiyun * @rx_vld_mcast_frms: Count of successfully received MAC frames containing a 511*4882a593Smuzhiyun * nonbroadcast group address. Does not include frames received 512*4882a593Smuzhiyun * with frame-too-long, FCS, or length errors. 513*4882a593Smuzhiyun * @rx_vld_bcast_frms: Count of successfully received MAC frames containing 514*4882a593Smuzhiyun * the broadcast group address. Does not include frames received 515*4882a593Smuzhiyun * with frame-too-long, FCS, or length errors. 516*4882a593Smuzhiyun * @rx_accepted_ucast_frms: Count of successfully received frames containing 517*4882a593Smuzhiyun * a unicast address. Only includes frames that are passed to 518*4882a593Smuzhiyun * the system. 519*4882a593Smuzhiyun * @rx_accepted_nucast_frms: Count of successfully received frames containing 520*4882a593Smuzhiyun * a non-unicast (broadcast or multicast) address. Only includes 521*4882a593Smuzhiyun * frames that are passed to the system. Could include, for instance, 522*4882a593Smuzhiyun * non-unicast frames that contain FCS errors if the MAC_ERROR_CFG 523*4882a593Smuzhiyun * register is set to pass FCS-errored frames to the host. 524*4882a593Smuzhiyun * @rx_tagged_frms: Count of received frames containing a VLAN tag. 525*4882a593Smuzhiyun * @rx_long_frms: Count of received frames that are longer than RX_MAX_PYLD_LEN 526*4882a593Smuzhiyun * + 18 bytes (+ 22 bytes if VLAN-tagged). 527*4882a593Smuzhiyun * @rx_usized_frms: Count of received frames of length (including FCS, but not 528*4882a593Smuzhiyun * framing bits) less than 64 octets, that are otherwise well-formed. 529*4882a593Smuzhiyun * In other words, counts runts. 530*4882a593Smuzhiyun * @rx_osized_frms: Count of received frames of length (including FCS, but not 531*4882a593Smuzhiyun * framing bits) more than 1518 octets, that are otherwise 532*4882a593Smuzhiyun * well-formed. Note: If register XMAC_STATS_GLOBAL_CFG.VLAN_HANDLING 533*4882a593Smuzhiyun * is set to 1, then "more than 1518 octets" becomes "more than 1518 534*4882a593Smuzhiyun * (1522 if VLAN-tagged) octets". 535*4882a593Smuzhiyun * @rx_frag_frms: Count of received frames of length (including FCS, but not 536*4882a593Smuzhiyun * framing bits) less than 64 octets that had bad FCS. In other 537*4882a593Smuzhiyun * words, counts fragments. 538*4882a593Smuzhiyun * @rx_jabber_frms: Count of received frames of length (including FCS, but not 539*4882a593Smuzhiyun * framing bits) more than 1518 octets that had bad FCS. In other 540*4882a593Smuzhiyun * words, counts jabbers. Note: If register 541*4882a593Smuzhiyun * XMAC_STATS_GLOBAL_CFG.VLAN_HANDLING is set to 1, then "more than 542*4882a593Smuzhiyun * 1518 octets" becomes "more than 1518 (1522 if VLAN-tagged) 543*4882a593Smuzhiyun * octets". 544*4882a593Smuzhiyun * @rx_ttl_64_frms: Count of total received MAC frames with length (including 545*4882a593Smuzhiyun * FCS, but not framing bits) of exactly 64 octets. Includes frames 546*4882a593Smuzhiyun * received with frame-too-long, FCS, or length errors. 547*4882a593Smuzhiyun * @rx_ttl_65_127_frms: Count of total received MAC frames with length 548*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 65 and 127 549*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 550*4882a593Smuzhiyun * FCS, or length errors. 551*4882a593Smuzhiyun * @rx_ttl_128_255_frms: Count of total received MAC frames with length 552*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 128 and 255 553*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 554*4882a593Smuzhiyun * FCS, or length errors. 555*4882a593Smuzhiyun * @rx_ttl_256_511_frms: Count of total received MAC frames with length 556*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 256 and 511 557*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 558*4882a593Smuzhiyun * FCS, or length errors. 559*4882a593Smuzhiyun * @rx_ttl_512_1023_frms: Count of total received MAC frames with length 560*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 512 and 1023 561*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 562*4882a593Smuzhiyun * FCS, or length errors. 563*4882a593Smuzhiyun * @rx_ttl_1024_1518_frms: Count of total received MAC frames with length 564*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 1024 and 1518 565*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 566*4882a593Smuzhiyun * FCS, or length errors. 567*4882a593Smuzhiyun * @rx_ttl_1519_4095_frms: Count of total received MAC frames with length 568*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 1519 and 4095 569*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 570*4882a593Smuzhiyun * FCS, or length errors. 571*4882a593Smuzhiyun * @rx_ttl_4096_8191_frms: Count of total received MAC frames with length 572*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 4096 and 8191 573*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 574*4882a593Smuzhiyun * FCS, or length errors. 575*4882a593Smuzhiyun * @rx_ttl_8192_max_frms: Count of total received MAC frames with length 576*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 8192 and 577*4882a593Smuzhiyun * RX_MAX_PYLD_LEN+18 octets inclusive. Includes frames received 578*4882a593Smuzhiyun * with frame-too-long, FCS, or length errors. 579*4882a593Smuzhiyun * @rx_ttl_gt_max_frms: Count of total received MAC frames with length 580*4882a593Smuzhiyun * (including FCS, but not framing bits) exceeding 581*4882a593Smuzhiyun * RX_MAX_PYLD_LEN+18 (+22 bytes if VLAN-tagged) octets inclusive. 582*4882a593Smuzhiyun * Includes frames received with frame-too-long, 583*4882a593Smuzhiyun * FCS, or length errors. 584*4882a593Smuzhiyun * @rx_ip: Count of received IP datagrams. Includes errored IP datagrams. 585*4882a593Smuzhiyun * @rx_accepted_ip: Count of received IP datagrams that 586*4882a593Smuzhiyun * are passed to the system. 587*4882a593Smuzhiyun * @rx_ip_octets: Count of number of octets in received IP datagrams. Includes 588*4882a593Smuzhiyun * errored IP datagrams. 589*4882a593Smuzhiyun * @rx_err_ip: Count of received IP datagrams containing errors. For example, 590*4882a593Smuzhiyun * bad IP checksum. 591*4882a593Smuzhiyun * @rx_icmp: Count of received ICMP messages. Includes errored ICMP messages. 592*4882a593Smuzhiyun * @rx_tcp: Count of received TCP segments. Includes errored TCP segments. 593*4882a593Smuzhiyun * Note: This stat contains a count of all received TCP segments, 594*4882a593Smuzhiyun * regardless of whether or not they pertain to an established 595*4882a593Smuzhiyun * connection. 596*4882a593Smuzhiyun * @rx_udp: Count of received UDP datagrams. 597*4882a593Smuzhiyun * @rx_err_tcp: Count of received TCP segments containing errors. For example, 598*4882a593Smuzhiyun * bad TCP checksum. 599*4882a593Smuzhiyun * @rx_pause_count: Count of number of pause quanta that the MAC has been in 600*4882a593Smuzhiyun * the paused state. Recall, one pause quantum equates to 512 601*4882a593Smuzhiyun * bit times. 602*4882a593Smuzhiyun * @rx_pause_ctrl_frms: Count of received MAC PAUSE control frames. 603*4882a593Smuzhiyun * @rx_unsup_ctrl_frms: Count of received MAC control frames that do not 604*4882a593Smuzhiyun * contain the PAUSE opcode. The sum of RX_PAUSE_CTRL_FRMS and 605*4882a593Smuzhiyun * this register is a count of all received MAC control frames. 606*4882a593Smuzhiyun * Note: This stat may be configured to count all layer 2 errors 607*4882a593Smuzhiyun * (i.e. length errors and FCS errors). 608*4882a593Smuzhiyun * @rx_fcs_err_frms: Count of received MAC frames that do not pass FCS. Does 609*4882a593Smuzhiyun * not include frames received with frame-too-long or 610*4882a593Smuzhiyun * frame-too-short error. 611*4882a593Smuzhiyun * @rx_in_rng_len_err_frms: Count of received frames with a length/type field 612*4882a593Smuzhiyun * value between 46 (42 for VLAN-tagged frames) and 1500 (also 1500 613*4882a593Smuzhiyun * for VLAN-tagged frames), inclusive, that does not match the 614*4882a593Smuzhiyun * number of data octets (including pad) received. Also contains 615*4882a593Smuzhiyun * a count of received frames with a length/type field less than 616*4882a593Smuzhiyun * 46 (42 for VLAN-tagged frames) and the number of data octets 617*4882a593Smuzhiyun * (including pad) received is greater than 46 (42 for VLAN-tagged 618*4882a593Smuzhiyun * frames). 619*4882a593Smuzhiyun * @rx_out_rng_len_err_frms: Count of received frames with length/type field 620*4882a593Smuzhiyun * between 1501 and 1535 decimal, inclusive. 621*4882a593Smuzhiyun * @rx_drop_frms: Count of received frames that could not be passed to the host. 622*4882a593Smuzhiyun * See PORTn_RX_L2_MGMT_DISCARD, PORTn_RX_RPA_DISCARD, 623*4882a593Smuzhiyun * PORTn_RX_TRASH_DISCARD, PORTn_RX_RTS_DISCARD, PORTn_RX_RED_DISCARD 624*4882a593Smuzhiyun * for a list of reasons. Because the RMAC drops one frame at a time, 625*4882a593Smuzhiyun * this stat also indicates the number of drop events. 626*4882a593Smuzhiyun * @rx_discarded_frms: Count of received frames containing 627*4882a593Smuzhiyun * any error that prevents 628*4882a593Smuzhiyun * them from being passed to the system. See PORTn_RX_FCS_DISCARD, 629*4882a593Smuzhiyun * PORTn_RX_LEN_DISCARD, and PORTn_RX_SWITCH_DISCARD for a list of 630*4882a593Smuzhiyun * reasons. 631*4882a593Smuzhiyun * @rx_drop_ip: Count of received IP datagrams that could not be passed to the 632*4882a593Smuzhiyun * host. See PORTn_RX_DROP_FRMS for a list of reasons. 633*4882a593Smuzhiyun * @rx_drop_udp: Count of received UDP datagrams that are not delivered to the 634*4882a593Smuzhiyun * host. See PORTn_RX_DROP_FRMS for a list of reasons. 635*4882a593Smuzhiyun * @rx_marker_pdu_frms: Count of valid Marker PDUs received on this Aggregation 636*4882a593Smuzhiyun * port. 637*4882a593Smuzhiyun * @rx_lacpdu_frms: Count of valid LACPDUs received on this Aggregation port. 638*4882a593Smuzhiyun * @rx_unknown_pdu_frms: Count of received frames (on this Aggregation port) 639*4882a593Smuzhiyun * that carry the Slow Protocols EtherType, but contain an unknown 640*4882a593Smuzhiyun * PDU. Or frames that contain the Slow Protocols group MAC address, 641*4882a593Smuzhiyun * but do not carry the Slow Protocols EtherType. 642*4882a593Smuzhiyun * @rx_marker_resp_pdu_frms: Count of valid Marker Response PDUs received on 643*4882a593Smuzhiyun * this Aggregation port. 644*4882a593Smuzhiyun * @rx_fcs_discard: Count of received frames that are discarded because the 645*4882a593Smuzhiyun * FCS check failed. 646*4882a593Smuzhiyun * @rx_illegal_pdu_frms: Count of received frames (on this Aggregation port) 647*4882a593Smuzhiyun * that carry the Slow Protocols EtherType, but contain a badly 648*4882a593Smuzhiyun * formed PDU. Or frames that carry the Slow Protocols EtherType, 649*4882a593Smuzhiyun * but contain an illegal value of Protocol Subtype. 650*4882a593Smuzhiyun * @rx_switch_discard: Count of received frames that are discarded by the 651*4882a593Smuzhiyun * internal switch because they did not have an entry in the 652*4882a593Smuzhiyun * Filtering Database. This includes frames that had an invalid 653*4882a593Smuzhiyun * destination MAC address or VLAN ID. It also includes frames are 654*4882a593Smuzhiyun * discarded because they did not satisfy the length requirements 655*4882a593Smuzhiyun * of the target VPATH. 656*4882a593Smuzhiyun * @rx_len_discard: Count of received frames that are discarded because of an 657*4882a593Smuzhiyun * invalid frame length (includes fragments, oversized frames and 658*4882a593Smuzhiyun * mismatch between frame length and length/type field). This stat 659*4882a593Smuzhiyun * can be configured 660*4882a593Smuzhiyun * (see XMAC_STATS_GLOBAL_CFG.LEN_DISCARD_HANDLING). 661*4882a593Smuzhiyun * @rx_rpa_discard: Count of received frames that were discarded because the 662*4882a593Smuzhiyun * receive protocol assist (RPA) discovered and error in the frame 663*4882a593Smuzhiyun * or was unable to parse the frame. 664*4882a593Smuzhiyun * @rx_l2_mgmt_discard: Count of Layer 2 management frames (eg. pause frames, 665*4882a593Smuzhiyun * Link Aggregation Control Protocol (LACP) frames, etc.) that are 666*4882a593Smuzhiyun * discarded. 667*4882a593Smuzhiyun * @rx_rts_discard: Count of received frames that are discarded by the receive 668*4882a593Smuzhiyun * traffic steering (RTS) logic. Includes those frame discarded 669*4882a593Smuzhiyun * because the SSC response contradicted the switch table, because 670*4882a593Smuzhiyun * the SSC timed out, or because the target queue could not fit the 671*4882a593Smuzhiyun * frame. 672*4882a593Smuzhiyun * @rx_trash_discard: Count of received frames that are discarded because 673*4882a593Smuzhiyun * receive traffic steering (RTS) steered the frame to the trash 674*4882a593Smuzhiyun * queue. 675*4882a593Smuzhiyun * @rx_buff_full_discard: Count of received frames that are discarded because 676*4882a593Smuzhiyun * internal buffers are full. Includes frames discarded because the 677*4882a593Smuzhiyun * RTS logic is waiting for an SSC lookup that has no timeout bound. 678*4882a593Smuzhiyun * Also, includes frames that are dropped because the MAC2FAU buffer 679*4882a593Smuzhiyun * is nearly full -- this can happen if the external receive buffer 680*4882a593Smuzhiyun * is full and the receive path is backing up. 681*4882a593Smuzhiyun * @rx_red_discard: Count of received frames that are discarded because of RED 682*4882a593Smuzhiyun * (Random Early Discard). 683*4882a593Smuzhiyun * @rx_xgmii_ctrl_err_cnt: Maintains a count of unexpected or misplaced control 684*4882a593Smuzhiyun * characters occurring between times of normal data transmission 685*4882a593Smuzhiyun * (i.e. not included in RX_XGMII_DATA_ERR_CNT). This counter is 686*4882a593Smuzhiyun * incremented when either - 687*4882a593Smuzhiyun * 1) The Reconciliation Sublayer (RS) is expecting one control 688*4882a593Smuzhiyun * character and gets another (i.e. is expecting a Start 689*4882a593Smuzhiyun * character, but gets another control character). 690*4882a593Smuzhiyun * 2) Start control character is not in lane 0 691*4882a593Smuzhiyun * Only increments the count by one for each XGMII column. 692*4882a593Smuzhiyun * @rx_xgmii_data_err_cnt: Maintains a count of unexpected control characters 693*4882a593Smuzhiyun * during normal data transmission. If the Reconciliation Sublayer 694*4882a593Smuzhiyun * (RS) receives a control character, other than a terminate control 695*4882a593Smuzhiyun * character, during receipt of data octets then this register is 696*4882a593Smuzhiyun * incremented. Also increments if the start frame delimiter is not 697*4882a593Smuzhiyun * found in the correct location. Only increments the count by one 698*4882a593Smuzhiyun * for each XGMII column. 699*4882a593Smuzhiyun * @rx_xgmii_char1_match: Maintains a count of the number of XGMII characters 700*4882a593Smuzhiyun * that match a pattern that is programmable through register 701*4882a593Smuzhiyun * XMAC_STATS_RX_XGMII_CHAR_PORTn. By default, the pattern is set 702*4882a593Smuzhiyun * to /E/ (i.e. the error character), thus the statistic tracks the 703*4882a593Smuzhiyun * number of Error characters received at any time. 704*4882a593Smuzhiyun * @rx_xgmii_err_sym: Count of the number of symbol errors in the received 705*4882a593Smuzhiyun * XGMII data (i.e. PHY indicates "Receive Error" on the XGMII). 706*4882a593Smuzhiyun * Only includes symbol errors that are observed between the XGMII 707*4882a593Smuzhiyun * Start Frame Delimiter and End Frame Delimiter, inclusive. And 708*4882a593Smuzhiyun * only increments the count by one for each frame. 709*4882a593Smuzhiyun * @rx_xgmii_column1_match: Maintains a count of the number of XGMII columns 710*4882a593Smuzhiyun * that match a pattern that is programmable through register 711*4882a593Smuzhiyun * XMAC_STATS_RX_XGMII_COLUMN1_PORTn. By default, the pattern is set 712*4882a593Smuzhiyun * to 4 x /E/ (i.e. a column containing all error characters), thus 713*4882a593Smuzhiyun * the statistic tracks the number of Error columns received at any 714*4882a593Smuzhiyun * time. 715*4882a593Smuzhiyun * @rx_xgmii_char2_match: Maintains a count of the number of XGMII characters 716*4882a593Smuzhiyun * that match a pattern that is programmable through register 717*4882a593Smuzhiyun * XMAC_STATS_RX_XGMII_CHAR_PORTn. By default, the pattern is set 718*4882a593Smuzhiyun * to /E/ (i.e. the error character), thus the statistic tracks the 719*4882a593Smuzhiyun * number of Error characters received at any time. 720*4882a593Smuzhiyun * @rx_local_fault: Maintains a count of the number of times that link 721*4882a593Smuzhiyun * transitioned from "up" to "down" due to a local fault. 722*4882a593Smuzhiyun * @rx_xgmii_column2_match: Maintains a count of the number of XGMII columns 723*4882a593Smuzhiyun * that match a pattern that is programmable through register 724*4882a593Smuzhiyun * XMAC_STATS_RX_XGMII_COLUMN2_PORTn. By default, the pattern is set 725*4882a593Smuzhiyun * to 4 x /E/ (i.e. a column containing all error characters), thus 726*4882a593Smuzhiyun * the statistic tracks the number of Error columns received at any 727*4882a593Smuzhiyun * time. If XMAC_STATS_RX_XGMII_BEHAV_COLUMN2_PORTn.NEAR_COL1 is set 728*4882a593Smuzhiyun * to 1, then this stat increments when COLUMN2 is found within 'n' 729*4882a593Smuzhiyun * clocks after COLUMN1. Here, 'n' is defined by 730*4882a593Smuzhiyun * XMAC_STATS_RX_XGMII_BEHAV_COLUMN2_PORTn.NUM_COL (if 'n' is set to 731*4882a593Smuzhiyun * 0, then it means to search anywhere for COLUMN2). 732*4882a593Smuzhiyun * @rx_jettison: Count of received frames that are jettisoned because internal 733*4882a593Smuzhiyun * buffers are full. 734*4882a593Smuzhiyun * @rx_remote_fault: Maintains a count of the number of times that link 735*4882a593Smuzhiyun * transitioned from "up" to "down" due to a remote fault. 736*4882a593Smuzhiyun * 737*4882a593Smuzhiyun * XMAC Port Statistics. 738*4882a593Smuzhiyun */ 739*4882a593Smuzhiyun struct vxge_hw_xmac_port_stats { 740*4882a593Smuzhiyun /*0x000*/ u64 tx_ttl_frms; 741*4882a593Smuzhiyun /*0x008*/ u64 tx_ttl_octets; 742*4882a593Smuzhiyun /*0x010*/ u64 tx_data_octets; 743*4882a593Smuzhiyun /*0x018*/ u64 tx_mcast_frms; 744*4882a593Smuzhiyun /*0x020*/ u64 tx_bcast_frms; 745*4882a593Smuzhiyun /*0x028*/ u64 tx_ucast_frms; 746*4882a593Smuzhiyun /*0x030*/ u64 tx_tagged_frms; 747*4882a593Smuzhiyun /*0x038*/ u64 tx_vld_ip; 748*4882a593Smuzhiyun /*0x040*/ u64 tx_vld_ip_octets; 749*4882a593Smuzhiyun /*0x048*/ u64 tx_icmp; 750*4882a593Smuzhiyun /*0x050*/ u64 tx_tcp; 751*4882a593Smuzhiyun /*0x058*/ u64 tx_rst_tcp; 752*4882a593Smuzhiyun /*0x060*/ u64 tx_udp; 753*4882a593Smuzhiyun /*0x068*/ u32 tx_parse_error; 754*4882a593Smuzhiyun /*0x06c*/ u32 tx_unknown_protocol; 755*4882a593Smuzhiyun /*0x070*/ u64 tx_pause_ctrl_frms; 756*4882a593Smuzhiyun /*0x078*/ u32 tx_marker_pdu_frms; 757*4882a593Smuzhiyun /*0x07c*/ u32 tx_lacpdu_frms; 758*4882a593Smuzhiyun /*0x080*/ u32 tx_drop_ip; 759*4882a593Smuzhiyun /*0x084*/ u32 tx_marker_resp_pdu_frms; 760*4882a593Smuzhiyun /*0x088*/ u32 tx_xgmii_char2_match; 761*4882a593Smuzhiyun /*0x08c*/ u32 tx_xgmii_char1_match; 762*4882a593Smuzhiyun /*0x090*/ u32 tx_xgmii_column2_match; 763*4882a593Smuzhiyun /*0x094*/ u32 tx_xgmii_column1_match; 764*4882a593Smuzhiyun /*0x098*/ u32 unused1; 765*4882a593Smuzhiyun /*0x09c*/ u16 tx_any_err_frms; 766*4882a593Smuzhiyun /*0x09e*/ u16 tx_drop_frms; 767*4882a593Smuzhiyun /*0x0a0*/ u64 rx_ttl_frms; 768*4882a593Smuzhiyun /*0x0a8*/ u64 rx_vld_frms; 769*4882a593Smuzhiyun /*0x0b0*/ u64 rx_offload_frms; 770*4882a593Smuzhiyun /*0x0b8*/ u64 rx_ttl_octets; 771*4882a593Smuzhiyun /*0x0c0*/ u64 rx_data_octets; 772*4882a593Smuzhiyun /*0x0c8*/ u64 rx_offload_octets; 773*4882a593Smuzhiyun /*0x0d0*/ u64 rx_vld_mcast_frms; 774*4882a593Smuzhiyun /*0x0d8*/ u64 rx_vld_bcast_frms; 775*4882a593Smuzhiyun /*0x0e0*/ u64 rx_accepted_ucast_frms; 776*4882a593Smuzhiyun /*0x0e8*/ u64 rx_accepted_nucast_frms; 777*4882a593Smuzhiyun /*0x0f0*/ u64 rx_tagged_frms; 778*4882a593Smuzhiyun /*0x0f8*/ u64 rx_long_frms; 779*4882a593Smuzhiyun /*0x100*/ u64 rx_usized_frms; 780*4882a593Smuzhiyun /*0x108*/ u64 rx_osized_frms; 781*4882a593Smuzhiyun /*0x110*/ u64 rx_frag_frms; 782*4882a593Smuzhiyun /*0x118*/ u64 rx_jabber_frms; 783*4882a593Smuzhiyun /*0x120*/ u64 rx_ttl_64_frms; 784*4882a593Smuzhiyun /*0x128*/ u64 rx_ttl_65_127_frms; 785*4882a593Smuzhiyun /*0x130*/ u64 rx_ttl_128_255_frms; 786*4882a593Smuzhiyun /*0x138*/ u64 rx_ttl_256_511_frms; 787*4882a593Smuzhiyun /*0x140*/ u64 rx_ttl_512_1023_frms; 788*4882a593Smuzhiyun /*0x148*/ u64 rx_ttl_1024_1518_frms; 789*4882a593Smuzhiyun /*0x150*/ u64 rx_ttl_1519_4095_frms; 790*4882a593Smuzhiyun /*0x158*/ u64 rx_ttl_4096_8191_frms; 791*4882a593Smuzhiyun /*0x160*/ u64 rx_ttl_8192_max_frms; 792*4882a593Smuzhiyun /*0x168*/ u64 rx_ttl_gt_max_frms; 793*4882a593Smuzhiyun /*0x170*/ u64 rx_ip; 794*4882a593Smuzhiyun /*0x178*/ u64 rx_accepted_ip; 795*4882a593Smuzhiyun /*0x180*/ u64 rx_ip_octets; 796*4882a593Smuzhiyun /*0x188*/ u64 rx_err_ip; 797*4882a593Smuzhiyun /*0x190*/ u64 rx_icmp; 798*4882a593Smuzhiyun /*0x198*/ u64 rx_tcp; 799*4882a593Smuzhiyun /*0x1a0*/ u64 rx_udp; 800*4882a593Smuzhiyun /*0x1a8*/ u64 rx_err_tcp; 801*4882a593Smuzhiyun /*0x1b0*/ u64 rx_pause_count; 802*4882a593Smuzhiyun /*0x1b8*/ u64 rx_pause_ctrl_frms; 803*4882a593Smuzhiyun /*0x1c0*/ u64 rx_unsup_ctrl_frms; 804*4882a593Smuzhiyun /*0x1c8*/ u64 rx_fcs_err_frms; 805*4882a593Smuzhiyun /*0x1d0*/ u64 rx_in_rng_len_err_frms; 806*4882a593Smuzhiyun /*0x1d8*/ u64 rx_out_rng_len_err_frms; 807*4882a593Smuzhiyun /*0x1e0*/ u64 rx_drop_frms; 808*4882a593Smuzhiyun /*0x1e8*/ u64 rx_discarded_frms; 809*4882a593Smuzhiyun /*0x1f0*/ u64 rx_drop_ip; 810*4882a593Smuzhiyun /*0x1f8*/ u64 rx_drop_udp; 811*4882a593Smuzhiyun /*0x200*/ u32 rx_marker_pdu_frms; 812*4882a593Smuzhiyun /*0x204*/ u32 rx_lacpdu_frms; 813*4882a593Smuzhiyun /*0x208*/ u32 rx_unknown_pdu_frms; 814*4882a593Smuzhiyun /*0x20c*/ u32 rx_marker_resp_pdu_frms; 815*4882a593Smuzhiyun /*0x210*/ u32 rx_fcs_discard; 816*4882a593Smuzhiyun /*0x214*/ u32 rx_illegal_pdu_frms; 817*4882a593Smuzhiyun /*0x218*/ u32 rx_switch_discard; 818*4882a593Smuzhiyun /*0x21c*/ u32 rx_len_discard; 819*4882a593Smuzhiyun /*0x220*/ u32 rx_rpa_discard; 820*4882a593Smuzhiyun /*0x224*/ u32 rx_l2_mgmt_discard; 821*4882a593Smuzhiyun /*0x228*/ u32 rx_rts_discard; 822*4882a593Smuzhiyun /*0x22c*/ u32 rx_trash_discard; 823*4882a593Smuzhiyun /*0x230*/ u32 rx_buff_full_discard; 824*4882a593Smuzhiyun /*0x234*/ u32 rx_red_discard; 825*4882a593Smuzhiyun /*0x238*/ u32 rx_xgmii_ctrl_err_cnt; 826*4882a593Smuzhiyun /*0x23c*/ u32 rx_xgmii_data_err_cnt; 827*4882a593Smuzhiyun /*0x240*/ u32 rx_xgmii_char1_match; 828*4882a593Smuzhiyun /*0x244*/ u32 rx_xgmii_err_sym; 829*4882a593Smuzhiyun /*0x248*/ u32 rx_xgmii_column1_match; 830*4882a593Smuzhiyun /*0x24c*/ u32 rx_xgmii_char2_match; 831*4882a593Smuzhiyun /*0x250*/ u32 rx_local_fault; 832*4882a593Smuzhiyun /*0x254*/ u32 rx_xgmii_column2_match; 833*4882a593Smuzhiyun /*0x258*/ u32 rx_jettison; 834*4882a593Smuzhiyun /*0x25c*/ u32 rx_remote_fault; 835*4882a593Smuzhiyun } __packed; 836*4882a593Smuzhiyun 837*4882a593Smuzhiyun /** 838*4882a593Smuzhiyun * struct vxge_hw_xmac_vpath_tx_stats - XMAC Vpath Tx Statistics 839*4882a593Smuzhiyun * 840*4882a593Smuzhiyun * @tx_ttl_eth_frms: Count of successfully transmitted MAC frames. 841*4882a593Smuzhiyun * @tx_ttl_eth_octets: Count of total octets of transmitted frames, 842*4882a593Smuzhiyun * not including framing characters (i.e. less framing bits). 843*4882a593Smuzhiyun * To determine the total octets of transmitted frames, including 844*4882a593Smuzhiyun * framing characters, multiply TX_TTL_ETH_FRMS by 8 and add it to 845*4882a593Smuzhiyun * this stat (the device always prepends 8 bytes of preamble for 846*4882a593Smuzhiyun * each frame) 847*4882a593Smuzhiyun * @tx_data_octets: Count of data and padding octets of successfully transmitted 848*4882a593Smuzhiyun * frames. 849*4882a593Smuzhiyun * @tx_mcast_frms: Count of successfully transmitted frames to a group address 850*4882a593Smuzhiyun * other than the broadcast address. 851*4882a593Smuzhiyun * @tx_bcast_frms: Count of successfully transmitted frames to the broadcast 852*4882a593Smuzhiyun * group address. 853*4882a593Smuzhiyun * @tx_ucast_frms: Count of transmitted frames containing a unicast address. 854*4882a593Smuzhiyun * Includes discarded frames that are not sent to the network. 855*4882a593Smuzhiyun * @tx_tagged_frms: Count of transmitted frames containing a VLAN tag. 856*4882a593Smuzhiyun * @tx_vld_ip: Count of transmitted IP datagrams that are passed to the network. 857*4882a593Smuzhiyun * @tx_vld_ip_octets: Count of total octets of transmitted IP datagrams that 858*4882a593Smuzhiyun * are passed to the network. 859*4882a593Smuzhiyun * @tx_icmp: Count of transmitted ICMP messages. Includes messages not sent due 860*4882a593Smuzhiyun * to problems within ICMP. 861*4882a593Smuzhiyun * @tx_tcp: Count of transmitted TCP segments. Does not include segments 862*4882a593Smuzhiyun * containing retransmitted octets. 863*4882a593Smuzhiyun * @tx_rst_tcp: Count of transmitted TCP segments containing the RST flag. 864*4882a593Smuzhiyun * @tx_udp: Count of transmitted UDP datagrams. 865*4882a593Smuzhiyun * @tx_unknown_protocol: Increments when the TPA encounters an unknown protocol, 866*4882a593Smuzhiyun * such as a new IPv6 extension header, or an unsupported Routing 867*4882a593Smuzhiyun * Type. The packet still has a checksum calculated but it may be 868*4882a593Smuzhiyun * incorrect. 869*4882a593Smuzhiyun * @tx_lost_ip: Count of transmitted IP datagrams that could not be passed 870*4882a593Smuzhiyun * to the network. Increments because of: 1) An internal processing 871*4882a593Smuzhiyun * error (such as an uncorrectable ECC error). 2) A frame parsing 872*4882a593Smuzhiyun * error during IP checksum calculation. 873*4882a593Smuzhiyun * @tx_parse_error: Increments when the TPA is unable to parse a packet. This 874*4882a593Smuzhiyun * generally occurs when a packet is corrupt somehow, including 875*4882a593Smuzhiyun * packets that have IP version mismatches, invalid Layer 2 control 876*4882a593Smuzhiyun * fields, etc. L3/L4 checksums are not offloaded, but the packet 877*4882a593Smuzhiyun * is still be transmitted. 878*4882a593Smuzhiyun * @tx_tcp_offload: For frames belonging to offloaded sessions only, a count 879*4882a593Smuzhiyun * of transmitted TCP segments. Does not include segments containing 880*4882a593Smuzhiyun * retransmitted octets. 881*4882a593Smuzhiyun * @tx_retx_tcp_offload: For frames belonging to offloaded sessions only, the 882*4882a593Smuzhiyun * total number of segments retransmitted. Retransmitted segments 883*4882a593Smuzhiyun * that are sourced by the host are counted by the host. 884*4882a593Smuzhiyun * @tx_lost_ip_offload: For frames belonging to offloaded sessions only, a count 885*4882a593Smuzhiyun * of transmitted IP datagrams that could not be passed to the 886*4882a593Smuzhiyun * network. 887*4882a593Smuzhiyun * 888*4882a593Smuzhiyun * XMAC Vpath TX Statistics. 889*4882a593Smuzhiyun */ 890*4882a593Smuzhiyun struct vxge_hw_xmac_vpath_tx_stats { 891*4882a593Smuzhiyun u64 tx_ttl_eth_frms; 892*4882a593Smuzhiyun u64 tx_ttl_eth_octets; 893*4882a593Smuzhiyun u64 tx_data_octets; 894*4882a593Smuzhiyun u64 tx_mcast_frms; 895*4882a593Smuzhiyun u64 tx_bcast_frms; 896*4882a593Smuzhiyun u64 tx_ucast_frms; 897*4882a593Smuzhiyun u64 tx_tagged_frms; 898*4882a593Smuzhiyun u64 tx_vld_ip; 899*4882a593Smuzhiyun u64 tx_vld_ip_octets; 900*4882a593Smuzhiyun u64 tx_icmp; 901*4882a593Smuzhiyun u64 tx_tcp; 902*4882a593Smuzhiyun u64 tx_rst_tcp; 903*4882a593Smuzhiyun u64 tx_udp; 904*4882a593Smuzhiyun u32 tx_unknown_protocol; 905*4882a593Smuzhiyun u32 tx_lost_ip; 906*4882a593Smuzhiyun u32 unused1; 907*4882a593Smuzhiyun u32 tx_parse_error; 908*4882a593Smuzhiyun u64 tx_tcp_offload; 909*4882a593Smuzhiyun u64 tx_retx_tcp_offload; 910*4882a593Smuzhiyun u64 tx_lost_ip_offload; 911*4882a593Smuzhiyun } __packed; 912*4882a593Smuzhiyun 913*4882a593Smuzhiyun /** 914*4882a593Smuzhiyun * struct vxge_hw_xmac_vpath_rx_stats - XMAC Vpath RX Statistics 915*4882a593Smuzhiyun * 916*4882a593Smuzhiyun * @rx_ttl_eth_frms: Count of successfully received MAC frames. 917*4882a593Smuzhiyun * @rx_vld_frms: Count of successfully received MAC frames. Does not include 918*4882a593Smuzhiyun * frames received with frame-too-long, FCS, or length errors. 919*4882a593Smuzhiyun * @rx_offload_frms: Count of offloaded received frames that are passed to 920*4882a593Smuzhiyun * the host. 921*4882a593Smuzhiyun * @rx_ttl_eth_octets: Count of total octets of received frames, not including 922*4882a593Smuzhiyun * framing characters (i.e. less framing bits). Only counts octets 923*4882a593Smuzhiyun * of frames that are at least 14 bytes (18 bytes for VLAN-tagged) 924*4882a593Smuzhiyun * before FCS. To determine the total octets of received frames, 925*4882a593Smuzhiyun * including framing characters, multiply RX_TTL_ETH_FRMS by 8 and 926*4882a593Smuzhiyun * add it to this stat (the stat RX_TTL_ETH_FRMS only counts frames 927*4882a593Smuzhiyun * that have the required 8 bytes of preamble). 928*4882a593Smuzhiyun * @rx_data_octets: Count of data and padding octets of successfully received 929*4882a593Smuzhiyun * frames. Does not include frames received with frame-too-long, 930*4882a593Smuzhiyun * FCS, or length errors. 931*4882a593Smuzhiyun * @rx_offload_octets: Count of total octets, not including framing characters, 932*4882a593Smuzhiyun * of offloaded received frames that are passed to the host. 933*4882a593Smuzhiyun * @rx_vld_mcast_frms: Count of successfully received MAC frames containing a 934*4882a593Smuzhiyun * nonbroadcast group address. Does not include frames received with 935*4882a593Smuzhiyun * frame-too-long, FCS, or length errors. 936*4882a593Smuzhiyun * @rx_vld_bcast_frms: Count of successfully received MAC frames containing the 937*4882a593Smuzhiyun * broadcast group address. Does not include frames received with 938*4882a593Smuzhiyun * frame-too-long, FCS, or length errors. 939*4882a593Smuzhiyun * @rx_accepted_ucast_frms: Count of successfully received frames containing 940*4882a593Smuzhiyun * a unicast address. Only includes frames that are passed to the 941*4882a593Smuzhiyun * system. 942*4882a593Smuzhiyun * @rx_accepted_nucast_frms: Count of successfully received frames containing 943*4882a593Smuzhiyun * a non-unicast (broadcast or multicast) address. Only includes 944*4882a593Smuzhiyun * frames that are passed to the system. Could include, for instance, 945*4882a593Smuzhiyun * non-unicast frames that contain FCS errors if the MAC_ERROR_CFG 946*4882a593Smuzhiyun * register is set to pass FCS-errored frames to the host. 947*4882a593Smuzhiyun * @rx_tagged_frms: Count of received frames containing a VLAN tag. 948*4882a593Smuzhiyun * @rx_long_frms: Count of received frames that are longer than RX_MAX_PYLD_LEN 949*4882a593Smuzhiyun * + 18 bytes (+ 22 bytes if VLAN-tagged). 950*4882a593Smuzhiyun * @rx_usized_frms: Count of received frames of length (including FCS, but not 951*4882a593Smuzhiyun * framing bits) less than 64 octets, that are otherwise well-formed. 952*4882a593Smuzhiyun * In other words, counts runts. 953*4882a593Smuzhiyun * @rx_osized_frms: Count of received frames of length (including FCS, but not 954*4882a593Smuzhiyun * framing bits) more than 1518 octets, that are otherwise 955*4882a593Smuzhiyun * well-formed. 956*4882a593Smuzhiyun * @rx_frag_frms: Count of received frames of length (including FCS, but not 957*4882a593Smuzhiyun * framing bits) less than 64 octets that had bad FCS. 958*4882a593Smuzhiyun * In other words, counts fragments. 959*4882a593Smuzhiyun * @rx_jabber_frms: Count of received frames of length (including FCS, but not 960*4882a593Smuzhiyun * framing bits) more than 1518 octets that had bad FCS. In other 961*4882a593Smuzhiyun * words, counts jabbers. 962*4882a593Smuzhiyun * @rx_ttl_64_frms: Count of total received MAC frames with length (including 963*4882a593Smuzhiyun * FCS, but not framing bits) of exactly 64 octets. Includes frames 964*4882a593Smuzhiyun * received with frame-too-long, FCS, or length errors. 965*4882a593Smuzhiyun * @rx_ttl_65_127_frms: Count of total received MAC frames 966*4882a593Smuzhiyun * with length (including 967*4882a593Smuzhiyun * FCS, but not framing bits) of between 65 and 127 octets inclusive. 968*4882a593Smuzhiyun * Includes frames received with frame-too-long, FCS, 969*4882a593Smuzhiyun * or length errors. 970*4882a593Smuzhiyun * @rx_ttl_128_255_frms: Count of total received MAC frames with length 971*4882a593Smuzhiyun * (including FCS, but not framing bits) 972*4882a593Smuzhiyun * of between 128 and 255 octets 973*4882a593Smuzhiyun * inclusive. Includes frames received with frame-too-long, FCS, 974*4882a593Smuzhiyun * or length errors. 975*4882a593Smuzhiyun * @rx_ttl_256_511_frms: Count of total received MAC frames with length 976*4882a593Smuzhiyun * (including FCS, but not framing bits) 977*4882a593Smuzhiyun * of between 256 and 511 octets 978*4882a593Smuzhiyun * inclusive. Includes frames received with frame-too-long, FCS, or 979*4882a593Smuzhiyun * length errors. 980*4882a593Smuzhiyun * @rx_ttl_512_1023_frms: Count of total received MAC frames with length 981*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 512 and 1023 982*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 983*4882a593Smuzhiyun * FCS, or length errors. 984*4882a593Smuzhiyun * @rx_ttl_1024_1518_frms: Count of total received MAC frames with length 985*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 1024 and 1518 986*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 987*4882a593Smuzhiyun * FCS, or length errors. 988*4882a593Smuzhiyun * @rx_ttl_1519_4095_frms: Count of total received MAC frames with length 989*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 1519 and 4095 990*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 991*4882a593Smuzhiyun * FCS, or length errors. 992*4882a593Smuzhiyun * @rx_ttl_4096_8191_frms: Count of total received MAC frames with length 993*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 4096 and 8191 994*4882a593Smuzhiyun * octets inclusive. Includes frames received with frame-too-long, 995*4882a593Smuzhiyun * FCS, or length errors. 996*4882a593Smuzhiyun * @rx_ttl_8192_max_frms: Count of total received MAC frames with length 997*4882a593Smuzhiyun * (including FCS, but not framing bits) of between 8192 and 998*4882a593Smuzhiyun * RX_MAX_PYLD_LEN+18 octets inclusive. Includes frames received 999*4882a593Smuzhiyun * with frame-too-long, FCS, or length errors. 1000*4882a593Smuzhiyun * @rx_ttl_gt_max_frms: Count of total received MAC frames with length 1001*4882a593Smuzhiyun * (including FCS, but not framing bits) exceeding RX_MAX_PYLD_LEN+18 1002*4882a593Smuzhiyun * (+22 bytes if VLAN-tagged) octets inclusive. Includes frames 1003*4882a593Smuzhiyun * received with frame-too-long, FCS, or length errors. 1004*4882a593Smuzhiyun * @rx_ip: Count of received IP datagrams. Includes errored IP datagrams. 1005*4882a593Smuzhiyun * @rx_accepted_ip: Count of received IP datagrams that 1006*4882a593Smuzhiyun * are passed to the system. 1007*4882a593Smuzhiyun * @rx_ip_octets: Count of number of octets in received IP datagrams. 1008*4882a593Smuzhiyun * Includes errored IP datagrams. 1009*4882a593Smuzhiyun * @rx_err_ip: Count of received IP datagrams containing errors. For example, 1010*4882a593Smuzhiyun * bad IP checksum. 1011*4882a593Smuzhiyun * @rx_icmp: Count of received ICMP messages. Includes errored ICMP messages. 1012*4882a593Smuzhiyun * @rx_tcp: Count of received TCP segments. Includes errored TCP segments. 1013*4882a593Smuzhiyun * Note: This stat contains a count of all received TCP segments, 1014*4882a593Smuzhiyun * regardless of whether or not they pertain to an established 1015*4882a593Smuzhiyun * connection. 1016*4882a593Smuzhiyun * @rx_udp: Count of received UDP datagrams. 1017*4882a593Smuzhiyun * @rx_err_tcp: Count of received TCP segments containing errors. For example, 1018*4882a593Smuzhiyun * bad TCP checksum. 1019*4882a593Smuzhiyun * @rx_lost_frms: Count of received frames that could not be passed to the host. 1020*4882a593Smuzhiyun * See RX_QUEUE_FULL_DISCARD and RX_RED_DISCARD 1021*4882a593Smuzhiyun * for a list of reasons. 1022*4882a593Smuzhiyun * @rx_lost_ip: Count of received IP datagrams that could not be passed to 1023*4882a593Smuzhiyun * the host. See RX_LOST_FRMS for a list of reasons. 1024*4882a593Smuzhiyun * @rx_lost_ip_offload: For frames belonging to offloaded sessions only, a count 1025*4882a593Smuzhiyun * of received IP datagrams that could not be passed to the host. 1026*4882a593Smuzhiyun * See RX_LOST_FRMS for a list of reasons. 1027*4882a593Smuzhiyun * @rx_various_discard: Count of received frames that are discarded because 1028*4882a593Smuzhiyun * the target receive queue is full. 1029*4882a593Smuzhiyun * @rx_sleep_discard: Count of received frames that are discarded because the 1030*4882a593Smuzhiyun * target VPATH is asleep (a Wake-on-LAN magic packet can be used 1031*4882a593Smuzhiyun * to awaken the VPATH). 1032*4882a593Smuzhiyun * @rx_red_discard: Count of received frames that are discarded because of RED 1033*4882a593Smuzhiyun * (Random Early Discard). 1034*4882a593Smuzhiyun * @rx_queue_full_discard: Count of received frames that are discarded because 1035*4882a593Smuzhiyun * the target receive queue is full. 1036*4882a593Smuzhiyun * @rx_mpa_ok_frms: Count of received frames that pass the MPA checks. 1037*4882a593Smuzhiyun * 1038*4882a593Smuzhiyun * XMAC Vpath RX Statistics. 1039*4882a593Smuzhiyun */ 1040*4882a593Smuzhiyun struct vxge_hw_xmac_vpath_rx_stats { 1041*4882a593Smuzhiyun u64 rx_ttl_eth_frms; 1042*4882a593Smuzhiyun u64 rx_vld_frms; 1043*4882a593Smuzhiyun u64 rx_offload_frms; 1044*4882a593Smuzhiyun u64 rx_ttl_eth_octets; 1045*4882a593Smuzhiyun u64 rx_data_octets; 1046*4882a593Smuzhiyun u64 rx_offload_octets; 1047*4882a593Smuzhiyun u64 rx_vld_mcast_frms; 1048*4882a593Smuzhiyun u64 rx_vld_bcast_frms; 1049*4882a593Smuzhiyun u64 rx_accepted_ucast_frms; 1050*4882a593Smuzhiyun u64 rx_accepted_nucast_frms; 1051*4882a593Smuzhiyun u64 rx_tagged_frms; 1052*4882a593Smuzhiyun u64 rx_long_frms; 1053*4882a593Smuzhiyun u64 rx_usized_frms; 1054*4882a593Smuzhiyun u64 rx_osized_frms; 1055*4882a593Smuzhiyun u64 rx_frag_frms; 1056*4882a593Smuzhiyun u64 rx_jabber_frms; 1057*4882a593Smuzhiyun u64 rx_ttl_64_frms; 1058*4882a593Smuzhiyun u64 rx_ttl_65_127_frms; 1059*4882a593Smuzhiyun u64 rx_ttl_128_255_frms; 1060*4882a593Smuzhiyun u64 rx_ttl_256_511_frms; 1061*4882a593Smuzhiyun u64 rx_ttl_512_1023_frms; 1062*4882a593Smuzhiyun u64 rx_ttl_1024_1518_frms; 1063*4882a593Smuzhiyun u64 rx_ttl_1519_4095_frms; 1064*4882a593Smuzhiyun u64 rx_ttl_4096_8191_frms; 1065*4882a593Smuzhiyun u64 rx_ttl_8192_max_frms; 1066*4882a593Smuzhiyun u64 rx_ttl_gt_max_frms; 1067*4882a593Smuzhiyun u64 rx_ip; 1068*4882a593Smuzhiyun u64 rx_accepted_ip; 1069*4882a593Smuzhiyun u64 rx_ip_octets; 1070*4882a593Smuzhiyun u64 rx_err_ip; 1071*4882a593Smuzhiyun u64 rx_icmp; 1072*4882a593Smuzhiyun u64 rx_tcp; 1073*4882a593Smuzhiyun u64 rx_udp; 1074*4882a593Smuzhiyun u64 rx_err_tcp; 1075*4882a593Smuzhiyun u64 rx_lost_frms; 1076*4882a593Smuzhiyun u64 rx_lost_ip; 1077*4882a593Smuzhiyun u64 rx_lost_ip_offload; 1078*4882a593Smuzhiyun u16 rx_various_discard; 1079*4882a593Smuzhiyun u16 rx_sleep_discard; 1080*4882a593Smuzhiyun u16 rx_red_discard; 1081*4882a593Smuzhiyun u16 rx_queue_full_discard; 1082*4882a593Smuzhiyun u64 rx_mpa_ok_frms; 1083*4882a593Smuzhiyun } __packed; 1084*4882a593Smuzhiyun 1085*4882a593Smuzhiyun /** 1086*4882a593Smuzhiyun * struct vxge_hw_xmac_stats - XMAC Statistics 1087*4882a593Smuzhiyun * 1088*4882a593Smuzhiyun * @aggr_stats: Statistics on aggregate port(port 0, port 1) 1089*4882a593Smuzhiyun * @port_stats: Staticstics on ports(wire 0, wire 1, lag) 1090*4882a593Smuzhiyun * @vpath_tx_stats: Per vpath XMAC TX stats 1091*4882a593Smuzhiyun * @vpath_rx_stats: Per vpath XMAC RX stats 1092*4882a593Smuzhiyun * 1093*4882a593Smuzhiyun * XMAC Statistics. 1094*4882a593Smuzhiyun */ 1095*4882a593Smuzhiyun struct vxge_hw_xmac_stats { 1096*4882a593Smuzhiyun struct vxge_hw_xmac_aggr_stats 1097*4882a593Smuzhiyun aggr_stats[VXGE_HW_MAC_MAX_MAC_PORT_ID]; 1098*4882a593Smuzhiyun struct vxge_hw_xmac_port_stats 1099*4882a593Smuzhiyun port_stats[VXGE_HW_MAC_MAX_MAC_PORT_ID+1]; 1100*4882a593Smuzhiyun struct vxge_hw_xmac_vpath_tx_stats 1101*4882a593Smuzhiyun vpath_tx_stats[VXGE_HW_MAX_VIRTUAL_PATHS]; 1102*4882a593Smuzhiyun struct vxge_hw_xmac_vpath_rx_stats 1103*4882a593Smuzhiyun vpath_rx_stats[VXGE_HW_MAX_VIRTUAL_PATHS]; 1104*4882a593Smuzhiyun }; 1105*4882a593Smuzhiyun 1106*4882a593Smuzhiyun /** 1107*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_hw_info - Titan vpath hardware statistics. 1108*4882a593Smuzhiyun * @ini_num_mwr_sent: The number of PCI memory writes initiated by the PIC block 1109*4882a593Smuzhiyun * for the given VPATH 1110*4882a593Smuzhiyun * @ini_num_mrd_sent: The number of PCI memory reads initiated by the PIC block 1111*4882a593Smuzhiyun * @ini_num_cpl_rcvd: The number of PCI read completions received by the 1112*4882a593Smuzhiyun * PIC block 1113*4882a593Smuzhiyun * @ini_num_mwr_byte_sent: The number of PCI memory write bytes sent by the PIC 1114*4882a593Smuzhiyun * block to the host 1115*4882a593Smuzhiyun * @ini_num_cpl_byte_rcvd: The number of PCI read completion bytes received by 1116*4882a593Smuzhiyun * the PIC block 1117*4882a593Smuzhiyun * @wrcrdtarb_xoff: TBD 1118*4882a593Smuzhiyun * @rdcrdtarb_xoff: TBD 1119*4882a593Smuzhiyun * @vpath_genstats_count0: TBD 1120*4882a593Smuzhiyun * @vpath_genstats_count1: TBD 1121*4882a593Smuzhiyun * @vpath_genstats_count2: TBD 1122*4882a593Smuzhiyun * @vpath_genstats_count3: TBD 1123*4882a593Smuzhiyun * @vpath_genstats_count4: TBD 1124*4882a593Smuzhiyun * @vpath_gennstats_count5: TBD 1125*4882a593Smuzhiyun * @tx_stats: Transmit stats 1126*4882a593Smuzhiyun * @rx_stats: Receive stats 1127*4882a593Smuzhiyun * @prog_event_vnum1: Programmable statistic. Increments when internal logic 1128*4882a593Smuzhiyun * detects a certain event. See register 1129*4882a593Smuzhiyun * XMAC_STATS_CFG.EVENT_VNUM1_CFG for more information. 1130*4882a593Smuzhiyun * @prog_event_vnum0: Programmable statistic. Increments when internal logic 1131*4882a593Smuzhiyun * detects a certain event. See register 1132*4882a593Smuzhiyun * XMAC_STATS_CFG.EVENT_VNUM0_CFG for more information. 1133*4882a593Smuzhiyun * @prog_event_vnum3: Programmable statistic. Increments when internal logic 1134*4882a593Smuzhiyun * detects a certain event. See register 1135*4882a593Smuzhiyun * XMAC_STATS_CFG.EVENT_VNUM3_CFG for more information. 1136*4882a593Smuzhiyun * @prog_event_vnum2: Programmable statistic. Increments when internal logic 1137*4882a593Smuzhiyun * detects a certain event. See register 1138*4882a593Smuzhiyun * XMAC_STATS_CFG.EVENT_VNUM2_CFG for more information. 1139*4882a593Smuzhiyun * @rx_multi_cast_frame_discard: TBD 1140*4882a593Smuzhiyun * @rx_frm_transferred: TBD 1141*4882a593Smuzhiyun * @rxd_returned: TBD 1142*4882a593Smuzhiyun * @rx_mpa_len_fail_frms: Count of received frames 1143*4882a593Smuzhiyun * that fail the MPA length check 1144*4882a593Smuzhiyun * @rx_mpa_mrk_fail_frms: Count of received frames 1145*4882a593Smuzhiyun * that fail the MPA marker check 1146*4882a593Smuzhiyun * @rx_mpa_crc_fail_frms: Count of received frames that fail the MPA CRC check 1147*4882a593Smuzhiyun * @rx_permitted_frms: Count of frames that pass through the FAU and on to the 1148*4882a593Smuzhiyun * frame buffer (and subsequently to the host). 1149*4882a593Smuzhiyun * @rx_vp_reset_discarded_frms: Count of receive frames that are discarded 1150*4882a593Smuzhiyun * because the VPATH is in reset 1151*4882a593Smuzhiyun * @rx_wol_frms: Count of received "magic packet" frames. Stat increments 1152*4882a593Smuzhiyun * whenever the received frame matches the VPATH's Wake-on-LAN 1153*4882a593Smuzhiyun * signature(s) CRC. 1154*4882a593Smuzhiyun * @tx_vp_reset_discarded_frms: Count of transmit frames that are discarded 1155*4882a593Smuzhiyun * because the VPATH is in reset. Includes frames that are discarded 1156*4882a593Smuzhiyun * because the current VPIN does not match that VPIN of the frame 1157*4882a593Smuzhiyun * 1158*4882a593Smuzhiyun * Titan vpath hardware statistics. 1159*4882a593Smuzhiyun */ 1160*4882a593Smuzhiyun struct vxge_hw_vpath_stats_hw_info { 1161*4882a593Smuzhiyun /*0x000*/ u32 ini_num_mwr_sent; 1162*4882a593Smuzhiyun /*0x004*/ u32 unused1; 1163*4882a593Smuzhiyun /*0x008*/ u32 ini_num_mrd_sent; 1164*4882a593Smuzhiyun /*0x00c*/ u32 unused2; 1165*4882a593Smuzhiyun /*0x010*/ u32 ini_num_cpl_rcvd; 1166*4882a593Smuzhiyun /*0x014*/ u32 unused3; 1167*4882a593Smuzhiyun /*0x018*/ u64 ini_num_mwr_byte_sent; 1168*4882a593Smuzhiyun /*0x020*/ u64 ini_num_cpl_byte_rcvd; 1169*4882a593Smuzhiyun /*0x028*/ u32 wrcrdtarb_xoff; 1170*4882a593Smuzhiyun /*0x02c*/ u32 unused4; 1171*4882a593Smuzhiyun /*0x030*/ u32 rdcrdtarb_xoff; 1172*4882a593Smuzhiyun /*0x034*/ u32 unused5; 1173*4882a593Smuzhiyun /*0x038*/ u32 vpath_genstats_count0; 1174*4882a593Smuzhiyun /*0x03c*/ u32 vpath_genstats_count1; 1175*4882a593Smuzhiyun /*0x040*/ u32 vpath_genstats_count2; 1176*4882a593Smuzhiyun /*0x044*/ u32 vpath_genstats_count3; 1177*4882a593Smuzhiyun /*0x048*/ u32 vpath_genstats_count4; 1178*4882a593Smuzhiyun /*0x04c*/ u32 unused6; 1179*4882a593Smuzhiyun /*0x050*/ u32 vpath_genstats_count5; 1180*4882a593Smuzhiyun /*0x054*/ u32 unused7; 1181*4882a593Smuzhiyun /*0x058*/ struct vxge_hw_xmac_vpath_tx_stats tx_stats; 1182*4882a593Smuzhiyun /*0x0e8*/ struct vxge_hw_xmac_vpath_rx_stats rx_stats; 1183*4882a593Smuzhiyun /*0x220*/ u64 unused9; 1184*4882a593Smuzhiyun /*0x228*/ u32 prog_event_vnum1; 1185*4882a593Smuzhiyun /*0x22c*/ u32 prog_event_vnum0; 1186*4882a593Smuzhiyun /*0x230*/ u32 prog_event_vnum3; 1187*4882a593Smuzhiyun /*0x234*/ u32 prog_event_vnum2; 1188*4882a593Smuzhiyun /*0x238*/ u16 rx_multi_cast_frame_discard; 1189*4882a593Smuzhiyun /*0x23a*/ u8 unused10[6]; 1190*4882a593Smuzhiyun /*0x240*/ u32 rx_frm_transferred; 1191*4882a593Smuzhiyun /*0x244*/ u32 unused11; 1192*4882a593Smuzhiyun /*0x248*/ u16 rxd_returned; 1193*4882a593Smuzhiyun /*0x24a*/ u8 unused12[6]; 1194*4882a593Smuzhiyun /*0x252*/ u16 rx_mpa_len_fail_frms; 1195*4882a593Smuzhiyun /*0x254*/ u16 rx_mpa_mrk_fail_frms; 1196*4882a593Smuzhiyun /*0x256*/ u16 rx_mpa_crc_fail_frms; 1197*4882a593Smuzhiyun /*0x258*/ u16 rx_permitted_frms; 1198*4882a593Smuzhiyun /*0x25c*/ u64 rx_vp_reset_discarded_frms; 1199*4882a593Smuzhiyun /*0x25e*/ u64 rx_wol_frms; 1200*4882a593Smuzhiyun /*0x260*/ u64 tx_vp_reset_discarded_frms; 1201*4882a593Smuzhiyun } __packed; 1202*4882a593Smuzhiyun 1203*4882a593Smuzhiyun 1204*4882a593Smuzhiyun /** 1205*4882a593Smuzhiyun * struct vxge_hw_device_stats_mrpcim_info - Titan mrpcim hardware statistics. 1206*4882a593Smuzhiyun * @pic.ini_rd_drop 0x0000 4 Number of DMA reads initiated 1207*4882a593Smuzhiyun * by the adapter that were discarded because the VPATH is out of service 1208*4882a593Smuzhiyun * @pic.ini_wr_drop 0x0004 4 Number of DMA writes initiated by the 1209*4882a593Smuzhiyun * adapter that were discared because the VPATH is out of service 1210*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane0] 0x0008 4 Number of times 1211*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1212*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane1] 0x0010 4 Number of times 1213*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1214*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane2] 0x0018 4 Number of times 1215*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1216*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane3] 0x0020 4 Number of times 1217*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1218*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane4] 0x0028 4 Number of times 1219*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1220*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane5] 0x0030 4 Number of times 1221*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1222*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane6] 0x0038 4 Number of times 1223*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1224*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane7] 0x0040 4 Number of times 1225*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1226*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane8] 0x0048 4 Number of times 1227*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1228*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane9] 0x0050 4 Number of times 1229*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1230*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane10] 0x0058 4 Number of times 1231*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1232*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane11] 0x0060 4 Number of times 1233*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1234*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane12] 0x0068 4 Number of times 1235*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1236*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane13] 0x0070 4 Number of times 1237*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1238*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane14] 0x0078 4 Number of times 1239*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1240*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane15] 0x0080 4 Number of times 1241*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1242*4882a593Smuzhiyun * @pic.wrcrdtarb_ph_crdt_depleted[vplane16] 0x0088 4 Number of times 1243*4882a593Smuzhiyun * the posted header credits for upstream PCI writes were depleted 1244*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane0] 0x0090 4 Number of times 1245*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1246*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane1] 0x0098 4 Number of times 1247*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1248*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane2] 0x00a0 4 Number of times 1249*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1250*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane3] 0x00a8 4 Number of times 1251*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1252*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane4] 0x00b0 4 Number of times 1253*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1254*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane5] 0x00b8 4 Number of times 1255*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1256*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane6] 0x00c0 4 Number of times 1257*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1258*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane7] 0x00c8 4 Number of times 1259*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1260*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane8] 0x00d0 4 Number of times 1261*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1262*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane9] 0x00d8 4 Number of times 1263*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1264*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane10] 0x00e0 4 Number of times 1265*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1266*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane11] 0x00e8 4 Number of times 1267*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1268*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane12] 0x00f0 4 Number of times 1269*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1270*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane13] 0x00f8 4 Number of times 1271*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1272*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane14] 0x0100 4 Number of times 1273*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1274*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane15] 0x0108 4 Number of times 1275*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1276*4882a593Smuzhiyun * @pic.wrcrdtarb_pd_crdt_depleted[vplane16] 0x0110 4 Number of times 1277*4882a593Smuzhiyun * the posted data credits for upstream PCI writes were depleted 1278*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane0] 0x0118 4 Number of times 1279*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1280*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane1] 0x0120 4 Number of times 1281*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1282*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane2] 0x0128 4 Number of times 1283*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1284*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane3] 0x0130 4 Number of times 1285*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1286*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane4] 0x0138 4 Number of times 1287*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1288*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane5] 0x0140 4 Number of times 1289*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1290*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane6] 0x0148 4 Number of times 1291*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1292*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane7] 0x0150 4 Number of times 1293*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1294*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane8] 0x0158 4 Number of times 1295*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1296*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane9] 0x0160 4 Number of times 1297*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1298*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane10] 0x0168 4 Number of times 1299*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1300*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane11] 0x0170 4 Number of times 1301*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1302*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane12] 0x0178 4 Number of times 1303*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1304*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane13] 0x0180 4 Number of times 1305*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1306*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane14] 0x0188 4 Number of times 1307*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1308*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane15] 0x0190 4 Number of times 1309*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1310*4882a593Smuzhiyun * @pic.rdcrdtarb_nph_crdt_depleted[vplane16] 0x0198 4 Number of times 1311*4882a593Smuzhiyun * the non-posted header credits for upstream PCI reads were depleted 1312*4882a593Smuzhiyun * @pic.ini_rd_vpin_drop 0x01a0 4 Number of DMA reads initiated by 1313*4882a593Smuzhiyun * the adapter that were discarded because the VPATH instance number does 1314*4882a593Smuzhiyun * not match 1315*4882a593Smuzhiyun * @pic.ini_wr_vpin_drop 0x01a4 4 Number of DMA writes initiated 1316*4882a593Smuzhiyun * by the adapter that were discarded because the VPATH instance number 1317*4882a593Smuzhiyun * does not match 1318*4882a593Smuzhiyun * @pic.genstats_count0 0x01a8 4 Configurable statistic #1. Refer 1319*4882a593Smuzhiyun * to the GENSTATS0_CFG for information on configuring this statistic 1320*4882a593Smuzhiyun * @pic.genstats_count1 0x01ac 4 Configurable statistic #2. Refer 1321*4882a593Smuzhiyun * to the GENSTATS1_CFG for information on configuring this statistic 1322*4882a593Smuzhiyun * @pic.genstats_count2 0x01b0 4 Configurable statistic #3. Refer 1323*4882a593Smuzhiyun * to the GENSTATS2_CFG for information on configuring this statistic 1324*4882a593Smuzhiyun * @pic.genstats_count3 0x01b4 4 Configurable statistic #4. Refer 1325*4882a593Smuzhiyun * to the GENSTATS3_CFG for information on configuring this statistic 1326*4882a593Smuzhiyun * @pic.genstats_count4 0x01b8 4 Configurable statistic #5. Refer 1327*4882a593Smuzhiyun * to the GENSTATS4_CFG for information on configuring this statistic 1328*4882a593Smuzhiyun * @pic.genstats_count5 0x01c0 4 Configurable statistic #6. Refer 1329*4882a593Smuzhiyun * to the GENSTATS5_CFG for information on configuring this statistic 1330*4882a593Smuzhiyun * @pci.rstdrop_cpl 0x01c8 4 1331*4882a593Smuzhiyun * @pci.rstdrop_msg 0x01cc 4 1332*4882a593Smuzhiyun * @pci.rstdrop_client1 0x01d0 4 1333*4882a593Smuzhiyun * @pci.rstdrop_client0 0x01d4 4 1334*4882a593Smuzhiyun * @pci.rstdrop_client2 0x01d8 4 1335*4882a593Smuzhiyun * @pci.depl_cplh[vplane0] 0x01e2 2 Number of times completion 1336*4882a593Smuzhiyun * header credits were depleted 1337*4882a593Smuzhiyun * @pci.depl_nph[vplane0] 0x01e4 2 Number of times non posted 1338*4882a593Smuzhiyun * header credits were depleted 1339*4882a593Smuzhiyun * @pci.depl_ph[vplane0] 0x01e6 2 Number of times the posted 1340*4882a593Smuzhiyun * header credits were depleted 1341*4882a593Smuzhiyun * @pci.depl_cplh[vplane1] 0x01ea 2 1342*4882a593Smuzhiyun * @pci.depl_nph[vplane1] 0x01ec 2 1343*4882a593Smuzhiyun * @pci.depl_ph[vplane1] 0x01ee 2 1344*4882a593Smuzhiyun * @pci.depl_cplh[vplane2] 0x01f2 2 1345*4882a593Smuzhiyun * @pci.depl_nph[vplane2] 0x01f4 2 1346*4882a593Smuzhiyun * @pci.depl_ph[vplane2] 0x01f6 2 1347*4882a593Smuzhiyun * @pci.depl_cplh[vplane3] 0x01fa 2 1348*4882a593Smuzhiyun * @pci.depl_nph[vplane3] 0x01fc 2 1349*4882a593Smuzhiyun * @pci.depl_ph[vplane3] 0x01fe 2 1350*4882a593Smuzhiyun * @pci.depl_cplh[vplane4] 0x0202 2 1351*4882a593Smuzhiyun * @pci.depl_nph[vplane4] 0x0204 2 1352*4882a593Smuzhiyun * @pci.depl_ph[vplane4] 0x0206 2 1353*4882a593Smuzhiyun * @pci.depl_cplh[vplane5] 0x020a 2 1354*4882a593Smuzhiyun * @pci.depl_nph[vplane5] 0x020c 2 1355*4882a593Smuzhiyun * @pci.depl_ph[vplane5] 0x020e 2 1356*4882a593Smuzhiyun * @pci.depl_cplh[vplane6] 0x0212 2 1357*4882a593Smuzhiyun * @pci.depl_nph[vplane6] 0x0214 2 1358*4882a593Smuzhiyun * @pci.depl_ph[vplane6] 0x0216 2 1359*4882a593Smuzhiyun * @pci.depl_cplh[vplane7] 0x021a 2 1360*4882a593Smuzhiyun * @pci.depl_nph[vplane7] 0x021c 2 1361*4882a593Smuzhiyun * @pci.depl_ph[vplane7] 0x021e 2 1362*4882a593Smuzhiyun * @pci.depl_cplh[vplane8] 0x0222 2 1363*4882a593Smuzhiyun * @pci.depl_nph[vplane8] 0x0224 2 1364*4882a593Smuzhiyun * @pci.depl_ph[vplane8] 0x0226 2 1365*4882a593Smuzhiyun * @pci.depl_cplh[vplane9] 0x022a 2 1366*4882a593Smuzhiyun * @pci.depl_nph[vplane9] 0x022c 2 1367*4882a593Smuzhiyun * @pci.depl_ph[vplane9] 0x022e 2 1368*4882a593Smuzhiyun * @pci.depl_cplh[vplane10] 0x0232 2 1369*4882a593Smuzhiyun * @pci.depl_nph[vplane10] 0x0234 2 1370*4882a593Smuzhiyun * @pci.depl_ph[vplane10] 0x0236 2 1371*4882a593Smuzhiyun * @pci.depl_cplh[vplane11] 0x023a 2 1372*4882a593Smuzhiyun * @pci.depl_nph[vplane11] 0x023c 2 1373*4882a593Smuzhiyun * @pci.depl_ph[vplane11] 0x023e 2 1374*4882a593Smuzhiyun * @pci.depl_cplh[vplane12] 0x0242 2 1375*4882a593Smuzhiyun * @pci.depl_nph[vplane12] 0x0244 2 1376*4882a593Smuzhiyun * @pci.depl_ph[vplane12] 0x0246 2 1377*4882a593Smuzhiyun * @pci.depl_cplh[vplane13] 0x024a 2 1378*4882a593Smuzhiyun * @pci.depl_nph[vplane13] 0x024c 2 1379*4882a593Smuzhiyun * @pci.depl_ph[vplane13] 0x024e 2 1380*4882a593Smuzhiyun * @pci.depl_cplh[vplane14] 0x0252 2 1381*4882a593Smuzhiyun * @pci.depl_nph[vplane14] 0x0254 2 1382*4882a593Smuzhiyun * @pci.depl_ph[vplane14] 0x0256 2 1383*4882a593Smuzhiyun * @pci.depl_cplh[vplane15] 0x025a 2 1384*4882a593Smuzhiyun * @pci.depl_nph[vplane15] 0x025c 2 1385*4882a593Smuzhiyun * @pci.depl_ph[vplane15] 0x025e 2 1386*4882a593Smuzhiyun * @pci.depl_cplh[vplane16] 0x0262 2 1387*4882a593Smuzhiyun * @pci.depl_nph[vplane16] 0x0264 2 1388*4882a593Smuzhiyun * @pci.depl_ph[vplane16] 0x0266 2 1389*4882a593Smuzhiyun * @pci.depl_cpld[vplane0] 0x026a 2 Number of times completion data 1390*4882a593Smuzhiyun * credits were depleted 1391*4882a593Smuzhiyun * @pci.depl_npd[vplane0] 0x026c 2 Number of times non posted data 1392*4882a593Smuzhiyun * credits were depleted 1393*4882a593Smuzhiyun * @pci.depl_pd[vplane0] 0x026e 2 Number of times the posted data 1394*4882a593Smuzhiyun * credits were depleted 1395*4882a593Smuzhiyun * @pci.depl_cpld[vplane1] 0x0272 2 1396*4882a593Smuzhiyun * @pci.depl_npd[vplane1] 0x0274 2 1397*4882a593Smuzhiyun * @pci.depl_pd[vplane1] 0x0276 2 1398*4882a593Smuzhiyun * @pci.depl_cpld[vplane2] 0x027a 2 1399*4882a593Smuzhiyun * @pci.depl_npd[vplane2] 0x027c 2 1400*4882a593Smuzhiyun * @pci.depl_pd[vplane2] 0x027e 2 1401*4882a593Smuzhiyun * @pci.depl_cpld[vplane3] 0x0282 2 1402*4882a593Smuzhiyun * @pci.depl_npd[vplane3] 0x0284 2 1403*4882a593Smuzhiyun * @pci.depl_pd[vplane3] 0x0286 2 1404*4882a593Smuzhiyun * @pci.depl_cpld[vplane4] 0x028a 2 1405*4882a593Smuzhiyun * @pci.depl_npd[vplane4] 0x028c 2 1406*4882a593Smuzhiyun * @pci.depl_pd[vplane4] 0x028e 2 1407*4882a593Smuzhiyun * @pci.depl_cpld[vplane5] 0x0292 2 1408*4882a593Smuzhiyun * @pci.depl_npd[vplane5] 0x0294 2 1409*4882a593Smuzhiyun * @pci.depl_pd[vplane5] 0x0296 2 1410*4882a593Smuzhiyun * @pci.depl_cpld[vplane6] 0x029a 2 1411*4882a593Smuzhiyun * @pci.depl_npd[vplane6] 0x029c 2 1412*4882a593Smuzhiyun * @pci.depl_pd[vplane6] 0x029e 2 1413*4882a593Smuzhiyun * @pci.depl_cpld[vplane7] 0x02a2 2 1414*4882a593Smuzhiyun * @pci.depl_npd[vplane7] 0x02a4 2 1415*4882a593Smuzhiyun * @pci.depl_pd[vplane7] 0x02a6 2 1416*4882a593Smuzhiyun * @pci.depl_cpld[vplane8] 0x02aa 2 1417*4882a593Smuzhiyun * @pci.depl_npd[vplane8] 0x02ac 2 1418*4882a593Smuzhiyun * @pci.depl_pd[vplane8] 0x02ae 2 1419*4882a593Smuzhiyun * @pci.depl_cpld[vplane9] 0x02b2 2 1420*4882a593Smuzhiyun * @pci.depl_npd[vplane9] 0x02b4 2 1421*4882a593Smuzhiyun * @pci.depl_pd[vplane9] 0x02b6 2 1422*4882a593Smuzhiyun * @pci.depl_cpld[vplane10] 0x02ba 2 1423*4882a593Smuzhiyun * @pci.depl_npd[vplane10] 0x02bc 2 1424*4882a593Smuzhiyun * @pci.depl_pd[vplane10] 0x02be 2 1425*4882a593Smuzhiyun * @pci.depl_cpld[vplane11] 0x02c2 2 1426*4882a593Smuzhiyun * @pci.depl_npd[vplane11] 0x02c4 2 1427*4882a593Smuzhiyun * @pci.depl_pd[vplane11] 0x02c6 2 1428*4882a593Smuzhiyun * @pci.depl_cpld[vplane12] 0x02ca 2 1429*4882a593Smuzhiyun * @pci.depl_npd[vplane12] 0x02cc 2 1430*4882a593Smuzhiyun * @pci.depl_pd[vplane12] 0x02ce 2 1431*4882a593Smuzhiyun * @pci.depl_cpld[vplane13] 0x02d2 2 1432*4882a593Smuzhiyun * @pci.depl_npd[vplane13] 0x02d4 2 1433*4882a593Smuzhiyun * @pci.depl_pd[vplane13] 0x02d6 2 1434*4882a593Smuzhiyun * @pci.depl_cpld[vplane14] 0x02da 2 1435*4882a593Smuzhiyun * @pci.depl_npd[vplane14] 0x02dc 2 1436*4882a593Smuzhiyun * @pci.depl_pd[vplane14] 0x02de 2 1437*4882a593Smuzhiyun * @pci.depl_cpld[vplane15] 0x02e2 2 1438*4882a593Smuzhiyun * @pci.depl_npd[vplane15] 0x02e4 2 1439*4882a593Smuzhiyun * @pci.depl_pd[vplane15] 0x02e6 2 1440*4882a593Smuzhiyun * @pci.depl_cpld[vplane16] 0x02ea 2 1441*4882a593Smuzhiyun * @pci.depl_npd[vplane16] 0x02ec 2 1442*4882a593Smuzhiyun * @pci.depl_pd[vplane16] 0x02ee 2 1443*4882a593Smuzhiyun * @xgmac_port[3]; 1444*4882a593Smuzhiyun * @xgmac_aggr[2]; 1445*4882a593Smuzhiyun * @xgmac.global_prog_event_gnum0 0x0ae0 8 Programmable statistic. 1446*4882a593Smuzhiyun * Increments when internal logic detects a certain event. See register 1447*4882a593Smuzhiyun * XMAC_STATS_GLOBAL_CFG.EVENT_GNUM0_CFG for more information. 1448*4882a593Smuzhiyun * @xgmac.global_prog_event_gnum1 0x0ae8 8 Programmable statistic. 1449*4882a593Smuzhiyun * Increments when internal logic detects a certain event. See register 1450*4882a593Smuzhiyun * XMAC_STATS_GLOBAL_CFG.EVENT_GNUM1_CFG for more information. 1451*4882a593Smuzhiyun * @xgmac.orp_lro_events 0x0af8 8 1452*4882a593Smuzhiyun * @xgmac.orp_bs_events 0x0b00 8 1453*4882a593Smuzhiyun * @xgmac.orp_iwarp_events 0x0b08 8 1454*4882a593Smuzhiyun * @xgmac.tx_permitted_frms 0x0b14 4 1455*4882a593Smuzhiyun * @xgmac.port2_tx_any_frms 0x0b1d 1 1456*4882a593Smuzhiyun * @xgmac.port1_tx_any_frms 0x0b1e 1 1457*4882a593Smuzhiyun * @xgmac.port0_tx_any_frms 0x0b1f 1 1458*4882a593Smuzhiyun * @xgmac.port2_rx_any_frms 0x0b25 1 1459*4882a593Smuzhiyun * @xgmac.port1_rx_any_frms 0x0b26 1 1460*4882a593Smuzhiyun * @xgmac.port0_rx_any_frms 0x0b27 1 1461*4882a593Smuzhiyun * 1462*4882a593Smuzhiyun * Titan mrpcim hardware statistics. 1463*4882a593Smuzhiyun */ 1464*4882a593Smuzhiyun struct vxge_hw_device_stats_mrpcim_info { 1465*4882a593Smuzhiyun /*0x0000*/ u32 pic_ini_rd_drop; 1466*4882a593Smuzhiyun /*0x0004*/ u32 pic_ini_wr_drop; 1467*4882a593Smuzhiyun /*0x0008*/ struct { 1468*4882a593Smuzhiyun /*0x0000*/ u32 pic_wrcrdtarb_ph_crdt_depleted; 1469*4882a593Smuzhiyun /*0x0004*/ u32 unused1; 1470*4882a593Smuzhiyun } pic_wrcrdtarb_ph_crdt_depleted_vplane[17]; 1471*4882a593Smuzhiyun /*0x0090*/ struct { 1472*4882a593Smuzhiyun /*0x0000*/ u32 pic_wrcrdtarb_pd_crdt_depleted; 1473*4882a593Smuzhiyun /*0x0004*/ u32 unused2; 1474*4882a593Smuzhiyun } pic_wrcrdtarb_pd_crdt_depleted_vplane[17]; 1475*4882a593Smuzhiyun /*0x0118*/ struct { 1476*4882a593Smuzhiyun /*0x0000*/ u32 pic_rdcrdtarb_nph_crdt_depleted; 1477*4882a593Smuzhiyun /*0x0004*/ u32 unused3; 1478*4882a593Smuzhiyun } pic_rdcrdtarb_nph_crdt_depleted_vplane[17]; 1479*4882a593Smuzhiyun /*0x01a0*/ u32 pic_ini_rd_vpin_drop; 1480*4882a593Smuzhiyun /*0x01a4*/ u32 pic_ini_wr_vpin_drop; 1481*4882a593Smuzhiyun /*0x01a8*/ u32 pic_genstats_count0; 1482*4882a593Smuzhiyun /*0x01ac*/ u32 pic_genstats_count1; 1483*4882a593Smuzhiyun /*0x01b0*/ u32 pic_genstats_count2; 1484*4882a593Smuzhiyun /*0x01b4*/ u32 pic_genstats_count3; 1485*4882a593Smuzhiyun /*0x01b8*/ u32 pic_genstats_count4; 1486*4882a593Smuzhiyun /*0x01bc*/ u32 unused4; 1487*4882a593Smuzhiyun /*0x01c0*/ u32 pic_genstats_count5; 1488*4882a593Smuzhiyun /*0x01c4*/ u32 unused5; 1489*4882a593Smuzhiyun /*0x01c8*/ u32 pci_rstdrop_cpl; 1490*4882a593Smuzhiyun /*0x01cc*/ u32 pci_rstdrop_msg; 1491*4882a593Smuzhiyun /*0x01d0*/ u32 pci_rstdrop_client1; 1492*4882a593Smuzhiyun /*0x01d4*/ u32 pci_rstdrop_client0; 1493*4882a593Smuzhiyun /*0x01d8*/ u32 pci_rstdrop_client2; 1494*4882a593Smuzhiyun /*0x01dc*/ u32 unused6; 1495*4882a593Smuzhiyun /*0x01e0*/ struct { 1496*4882a593Smuzhiyun /*0x0000*/ u16 unused7; 1497*4882a593Smuzhiyun /*0x0002*/ u16 pci_depl_cplh; 1498*4882a593Smuzhiyun /*0x0004*/ u16 pci_depl_nph; 1499*4882a593Smuzhiyun /*0x0006*/ u16 pci_depl_ph; 1500*4882a593Smuzhiyun } pci_depl_h_vplane[17]; 1501*4882a593Smuzhiyun /*0x0268*/ struct { 1502*4882a593Smuzhiyun /*0x0000*/ u16 unused8; 1503*4882a593Smuzhiyun /*0x0002*/ u16 pci_depl_cpld; 1504*4882a593Smuzhiyun /*0x0004*/ u16 pci_depl_npd; 1505*4882a593Smuzhiyun /*0x0006*/ u16 pci_depl_pd; 1506*4882a593Smuzhiyun } pci_depl_d_vplane[17]; 1507*4882a593Smuzhiyun /*0x02f0*/ struct vxge_hw_xmac_port_stats xgmac_port[3]; 1508*4882a593Smuzhiyun /*0x0a10*/ struct vxge_hw_xmac_aggr_stats xgmac_aggr[2]; 1509*4882a593Smuzhiyun /*0x0ae0*/ u64 xgmac_global_prog_event_gnum0; 1510*4882a593Smuzhiyun /*0x0ae8*/ u64 xgmac_global_prog_event_gnum1; 1511*4882a593Smuzhiyun /*0x0af0*/ u64 unused7; 1512*4882a593Smuzhiyun /*0x0af8*/ u64 unused8; 1513*4882a593Smuzhiyun /*0x0b00*/ u64 unused9; 1514*4882a593Smuzhiyun /*0x0b08*/ u64 unused10; 1515*4882a593Smuzhiyun /*0x0b10*/ u32 unused11; 1516*4882a593Smuzhiyun /*0x0b14*/ u32 xgmac_tx_permitted_frms; 1517*4882a593Smuzhiyun /*0x0b18*/ u32 unused12; 1518*4882a593Smuzhiyun /*0x0b1c*/ u8 unused13; 1519*4882a593Smuzhiyun /*0x0b1d*/ u8 xgmac_port2_tx_any_frms; 1520*4882a593Smuzhiyun /*0x0b1e*/ u8 xgmac_port1_tx_any_frms; 1521*4882a593Smuzhiyun /*0x0b1f*/ u8 xgmac_port0_tx_any_frms; 1522*4882a593Smuzhiyun /*0x0b20*/ u32 unused14; 1523*4882a593Smuzhiyun /*0x0b24*/ u8 unused15; 1524*4882a593Smuzhiyun /*0x0b25*/ u8 xgmac_port2_rx_any_frms; 1525*4882a593Smuzhiyun /*0x0b26*/ u8 xgmac_port1_rx_any_frms; 1526*4882a593Smuzhiyun /*0x0b27*/ u8 xgmac_port0_rx_any_frms; 1527*4882a593Smuzhiyun } __packed; 1528*4882a593Smuzhiyun 1529*4882a593Smuzhiyun /** 1530*4882a593Smuzhiyun * struct vxge_hw_device_stats_hw_info - Titan hardware statistics. 1531*4882a593Smuzhiyun * @vpath_info: VPath statistics 1532*4882a593Smuzhiyun * @vpath_info_sav: Vpath statistics saved 1533*4882a593Smuzhiyun * 1534*4882a593Smuzhiyun * Titan hardware statistics. 1535*4882a593Smuzhiyun */ 1536*4882a593Smuzhiyun struct vxge_hw_device_stats_hw_info { 1537*4882a593Smuzhiyun struct vxge_hw_vpath_stats_hw_info 1538*4882a593Smuzhiyun *vpath_info[VXGE_HW_MAX_VIRTUAL_PATHS]; 1539*4882a593Smuzhiyun struct vxge_hw_vpath_stats_hw_info 1540*4882a593Smuzhiyun vpath_info_sav[VXGE_HW_MAX_VIRTUAL_PATHS]; 1541*4882a593Smuzhiyun }; 1542*4882a593Smuzhiyun 1543*4882a593Smuzhiyun /** 1544*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_common_info - HW common 1545*4882a593Smuzhiyun * statistics for queues. 1546*4882a593Smuzhiyun * @full_cnt: Number of times the queue was full 1547*4882a593Smuzhiyun * @usage_cnt: usage count. 1548*4882a593Smuzhiyun * @usage_max: Maximum usage 1549*4882a593Smuzhiyun * @reserve_free_swaps_cnt: Reserve/free swap counter. Internal usage. 1550*4882a593Smuzhiyun * @total_compl_cnt: Total descriptor completion count. 1551*4882a593Smuzhiyun * 1552*4882a593Smuzhiyun * Hw queue counters 1553*4882a593Smuzhiyun * See also: struct vxge_hw_vpath_stats_sw_fifo_info{}, 1554*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_ring_info{}, 1555*4882a593Smuzhiyun */ 1556*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_common_info { 1557*4882a593Smuzhiyun u32 full_cnt; 1558*4882a593Smuzhiyun u32 usage_cnt; 1559*4882a593Smuzhiyun u32 usage_max; 1560*4882a593Smuzhiyun u32 reserve_free_swaps_cnt; 1561*4882a593Smuzhiyun u32 total_compl_cnt; 1562*4882a593Smuzhiyun }; 1563*4882a593Smuzhiyun 1564*4882a593Smuzhiyun /** 1565*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_fifo_info - HW fifo statistics 1566*4882a593Smuzhiyun * @common_stats: Common counters for all queues 1567*4882a593Smuzhiyun * @total_posts: Total number of postings on the queue. 1568*4882a593Smuzhiyun * @total_buffers: Total number of buffers posted. 1569*4882a593Smuzhiyun * @txd_t_code_err_cnt: Array of transmit transfer codes. The position 1570*4882a593Smuzhiyun * (index) in this array reflects the transfer code type, for instance 1571*4882a593Smuzhiyun * 0xA - "loss of link". 1572*4882a593Smuzhiyun * Value txd_t_code_err_cnt[i] reflects the 1573*4882a593Smuzhiyun * number of times the corresponding transfer code was encountered. 1574*4882a593Smuzhiyun * 1575*4882a593Smuzhiyun * HW fifo counters 1576*4882a593Smuzhiyun * See also: struct vxge_hw_vpath_stats_sw_common_info{}, 1577*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_ring_info{}, 1578*4882a593Smuzhiyun */ 1579*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_fifo_info { 1580*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_common_info common_stats; 1581*4882a593Smuzhiyun u32 total_posts; 1582*4882a593Smuzhiyun u32 total_buffers; 1583*4882a593Smuzhiyun u32 txd_t_code_err_cnt[VXGE_HW_DTR_MAX_T_CODE]; 1584*4882a593Smuzhiyun }; 1585*4882a593Smuzhiyun 1586*4882a593Smuzhiyun /** 1587*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_ring_info - HW ring statistics 1588*4882a593Smuzhiyun * @common_stats: Common counters for all queues 1589*4882a593Smuzhiyun * @rxd_t_code_err_cnt: Array of receive transfer codes. The position 1590*4882a593Smuzhiyun * (index) in this array reflects the transfer code type, 1591*4882a593Smuzhiyun * for instance 1592*4882a593Smuzhiyun * 0x7 - for "invalid receive buffer size", or 0x8 - for ECC. 1593*4882a593Smuzhiyun * Value rxd_t_code_err_cnt[i] reflects the 1594*4882a593Smuzhiyun * number of times the corresponding transfer code was encountered. 1595*4882a593Smuzhiyun * 1596*4882a593Smuzhiyun * HW ring counters 1597*4882a593Smuzhiyun * See also: struct vxge_hw_vpath_stats_sw_common_info{}, 1598*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_fifo_info{}, 1599*4882a593Smuzhiyun */ 1600*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_ring_info { 1601*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_common_info common_stats; 1602*4882a593Smuzhiyun u32 rxd_t_code_err_cnt[VXGE_HW_DTR_MAX_T_CODE]; 1603*4882a593Smuzhiyun 1604*4882a593Smuzhiyun }; 1605*4882a593Smuzhiyun 1606*4882a593Smuzhiyun /** 1607*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_err - HW vpath error statistics 1608*4882a593Smuzhiyun * @unknown_alarms: 1609*4882a593Smuzhiyun * @network_sustained_fault: 1610*4882a593Smuzhiyun * @network_sustained_ok: 1611*4882a593Smuzhiyun * @kdfcctl_fifo0_overwrite: 1612*4882a593Smuzhiyun * @kdfcctl_fifo0_poison: 1613*4882a593Smuzhiyun * @kdfcctl_fifo0_dma_error: 1614*4882a593Smuzhiyun * @dblgen_fifo0_overflow: 1615*4882a593Smuzhiyun * @statsb_pif_chain_error: 1616*4882a593Smuzhiyun * @statsb_drop_timeout: 1617*4882a593Smuzhiyun * @target_illegal_access: 1618*4882a593Smuzhiyun * @ini_serr_det: 1619*4882a593Smuzhiyun * @prc_ring_bumps: 1620*4882a593Smuzhiyun * @prc_rxdcm_sc_err: 1621*4882a593Smuzhiyun * @prc_rxdcm_sc_abort: 1622*4882a593Smuzhiyun * @prc_quanta_size_err: 1623*4882a593Smuzhiyun * 1624*4882a593Smuzhiyun * HW vpath error statistics 1625*4882a593Smuzhiyun */ 1626*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_err { 1627*4882a593Smuzhiyun u32 unknown_alarms; 1628*4882a593Smuzhiyun u32 network_sustained_fault; 1629*4882a593Smuzhiyun u32 network_sustained_ok; 1630*4882a593Smuzhiyun u32 kdfcctl_fifo0_overwrite; 1631*4882a593Smuzhiyun u32 kdfcctl_fifo0_poison; 1632*4882a593Smuzhiyun u32 kdfcctl_fifo0_dma_error; 1633*4882a593Smuzhiyun u32 dblgen_fifo0_overflow; 1634*4882a593Smuzhiyun u32 statsb_pif_chain_error; 1635*4882a593Smuzhiyun u32 statsb_drop_timeout; 1636*4882a593Smuzhiyun u32 target_illegal_access; 1637*4882a593Smuzhiyun u32 ini_serr_det; 1638*4882a593Smuzhiyun u32 prc_ring_bumps; 1639*4882a593Smuzhiyun u32 prc_rxdcm_sc_err; 1640*4882a593Smuzhiyun u32 prc_rxdcm_sc_abort; 1641*4882a593Smuzhiyun u32 prc_quanta_size_err; 1642*4882a593Smuzhiyun }; 1643*4882a593Smuzhiyun 1644*4882a593Smuzhiyun /** 1645*4882a593Smuzhiyun * struct vxge_hw_vpath_stats_sw_info - HW vpath sw statistics 1646*4882a593Smuzhiyun * @soft_reset_cnt: Number of times soft reset is done on this vpath. 1647*4882a593Smuzhiyun * @error_stats: error counters for the vpath 1648*4882a593Smuzhiyun * @ring_stats: counters for ring belonging to the vpath 1649*4882a593Smuzhiyun * @fifo_stats: counters for fifo belonging to the vpath 1650*4882a593Smuzhiyun * 1651*4882a593Smuzhiyun * HW vpath sw statistics 1652*4882a593Smuzhiyun * See also: struct vxge_hw_device_info{} }. 1653*4882a593Smuzhiyun */ 1654*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_info { 1655*4882a593Smuzhiyun u32 soft_reset_cnt; 1656*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_err error_stats; 1657*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_ring_info ring_stats; 1658*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_fifo_info fifo_stats; 1659*4882a593Smuzhiyun }; 1660*4882a593Smuzhiyun 1661*4882a593Smuzhiyun /** 1662*4882a593Smuzhiyun * struct vxge_hw_device_stats_sw_info - HW own per-device statistics. 1663*4882a593Smuzhiyun * 1664*4882a593Smuzhiyun * @not_traffic_intr_cnt: Number of times the host was interrupted 1665*4882a593Smuzhiyun * without new completions. 1666*4882a593Smuzhiyun * "Non-traffic interrupt counter". 1667*4882a593Smuzhiyun * @traffic_intr_cnt: Number of traffic interrupts for the device. 1668*4882a593Smuzhiyun * @total_intr_cnt: Total number of traffic interrupts for the device. 1669*4882a593Smuzhiyun * @total_intr_cnt == @traffic_intr_cnt + 1670*4882a593Smuzhiyun * @not_traffic_intr_cnt 1671*4882a593Smuzhiyun * @soft_reset_cnt: Number of times soft reset is done on this device. 1672*4882a593Smuzhiyun * @vpath_info: please see struct vxge_hw_vpath_stats_sw_info{} 1673*4882a593Smuzhiyun * HW per-device statistics. 1674*4882a593Smuzhiyun */ 1675*4882a593Smuzhiyun struct vxge_hw_device_stats_sw_info { 1676*4882a593Smuzhiyun u32 not_traffic_intr_cnt; 1677*4882a593Smuzhiyun u32 traffic_intr_cnt; 1678*4882a593Smuzhiyun u32 total_intr_cnt; 1679*4882a593Smuzhiyun u32 soft_reset_cnt; 1680*4882a593Smuzhiyun struct vxge_hw_vpath_stats_sw_info 1681*4882a593Smuzhiyun vpath_info[VXGE_HW_MAX_VIRTUAL_PATHS]; 1682*4882a593Smuzhiyun }; 1683*4882a593Smuzhiyun 1684*4882a593Smuzhiyun /** 1685*4882a593Smuzhiyun * struct vxge_hw_device_stats_sw_err - HW device error statistics. 1686*4882a593Smuzhiyun * @vpath_alarms: Number of vpath alarms 1687*4882a593Smuzhiyun * 1688*4882a593Smuzhiyun * HW Device error stats 1689*4882a593Smuzhiyun */ 1690*4882a593Smuzhiyun struct vxge_hw_device_stats_sw_err { 1691*4882a593Smuzhiyun u32 vpath_alarms; 1692*4882a593Smuzhiyun }; 1693*4882a593Smuzhiyun 1694*4882a593Smuzhiyun /** 1695*4882a593Smuzhiyun * struct vxge_hw_device_stats - Contains HW per-device statistics, 1696*4882a593Smuzhiyun * including hw. 1697*4882a593Smuzhiyun * @devh: HW device handle. 1698*4882a593Smuzhiyun * @dma_addr: DMA address of the %hw_info. Given to device to fill-in the stats. 1699*4882a593Smuzhiyun * @hw_info_dmah: DMA handle used to map hw statistics onto the device memory 1700*4882a593Smuzhiyun * space. 1701*4882a593Smuzhiyun * @hw_info_dma_acch: One more DMA handle used subsequently to free the 1702*4882a593Smuzhiyun * DMA object. Note that this and the previous handle have 1703*4882a593Smuzhiyun * physical meaning for Solaris; on Windows and Linux the 1704*4882a593Smuzhiyun * corresponding value will be simply pointer to PCI device. 1705*4882a593Smuzhiyun * 1706*4882a593Smuzhiyun * @hw_dev_info_stats: Titan statistics maintained by the hardware. 1707*4882a593Smuzhiyun * @sw_dev_info_stats: HW's "soft" device informational statistics, e.g. number 1708*4882a593Smuzhiyun * of completions per interrupt. 1709*4882a593Smuzhiyun * @sw_dev_err_stats: HW's "soft" device error statistics. 1710*4882a593Smuzhiyun * 1711*4882a593Smuzhiyun * Structure-container of HW per-device statistics. Note that per-channel 1712*4882a593Smuzhiyun * statistics are kept in separate structures under HW's fifo and ring 1713*4882a593Smuzhiyun * channels. 1714*4882a593Smuzhiyun */ 1715*4882a593Smuzhiyun struct vxge_hw_device_stats { 1716*4882a593Smuzhiyun /* handles */ 1717*4882a593Smuzhiyun struct __vxge_hw_device *devh; 1718*4882a593Smuzhiyun 1719*4882a593Smuzhiyun /* HW device hardware statistics */ 1720*4882a593Smuzhiyun struct vxge_hw_device_stats_hw_info hw_dev_info_stats; 1721*4882a593Smuzhiyun 1722*4882a593Smuzhiyun /* HW device "soft" stats */ 1723*4882a593Smuzhiyun struct vxge_hw_device_stats_sw_err sw_dev_err_stats; 1724*4882a593Smuzhiyun struct vxge_hw_device_stats_sw_info sw_dev_info_stats; 1725*4882a593Smuzhiyun 1726*4882a593Smuzhiyun }; 1727*4882a593Smuzhiyun 1728*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_device_hw_stats_enable( 1729*4882a593Smuzhiyun struct __vxge_hw_device *devh); 1730*4882a593Smuzhiyun 1731*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_device_stats_get( 1732*4882a593Smuzhiyun struct __vxge_hw_device *devh, 1733*4882a593Smuzhiyun struct vxge_hw_device_stats_hw_info *hw_stats); 1734*4882a593Smuzhiyun 1735*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_driver_stats_get( 1736*4882a593Smuzhiyun struct __vxge_hw_device *devh, 1737*4882a593Smuzhiyun struct vxge_hw_device_stats_sw_info *sw_stats); 1738*4882a593Smuzhiyun 1739*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_mrpcim_stats_enable(struct __vxge_hw_device *devh); 1740*4882a593Smuzhiyun 1741*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_mrpcim_stats_disable(struct __vxge_hw_device *devh); 1742*4882a593Smuzhiyun 1743*4882a593Smuzhiyun enum vxge_hw_status 1744*4882a593Smuzhiyun vxge_hw_mrpcim_stats_access( 1745*4882a593Smuzhiyun struct __vxge_hw_device *devh, 1746*4882a593Smuzhiyun u32 operation, 1747*4882a593Smuzhiyun u32 location, 1748*4882a593Smuzhiyun u32 offset, 1749*4882a593Smuzhiyun u64 *stat); 1750*4882a593Smuzhiyun 1751*4882a593Smuzhiyun enum vxge_hw_status 1752*4882a593Smuzhiyun vxge_hw_device_xmac_stats_get(struct __vxge_hw_device *devh, 1753*4882a593Smuzhiyun struct vxge_hw_xmac_stats *xmac_stats); 1754*4882a593Smuzhiyun 1755*4882a593Smuzhiyun /** 1756*4882a593Smuzhiyun * enum enum vxge_hw_mgmt_reg_type - Register types. 1757*4882a593Smuzhiyun * 1758*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_legacy: Legacy registers 1759*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_toc: TOC Registers 1760*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_common: Common Registers 1761*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_mrpcim: mrpcim registers 1762*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_srpcim: srpcim registers 1763*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_vpmgmt: vpath management registers 1764*4882a593Smuzhiyun * @vxge_hw_mgmt_reg_type_vpath: vpath registers 1765*4882a593Smuzhiyun * 1766*4882a593Smuzhiyun * Register type enumaration 1767*4882a593Smuzhiyun */ 1768*4882a593Smuzhiyun enum vxge_hw_mgmt_reg_type { 1769*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_legacy = 0, 1770*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_toc = 1, 1771*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_common = 2, 1772*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_mrpcim = 3, 1773*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_srpcim = 4, 1774*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_vpmgmt = 5, 1775*4882a593Smuzhiyun vxge_hw_mgmt_reg_type_vpath = 6 1776*4882a593Smuzhiyun }; 1777*4882a593Smuzhiyun 1778*4882a593Smuzhiyun enum vxge_hw_status 1779*4882a593Smuzhiyun vxge_hw_mgmt_reg_read(struct __vxge_hw_device *devh, 1780*4882a593Smuzhiyun enum vxge_hw_mgmt_reg_type type, 1781*4882a593Smuzhiyun u32 index, 1782*4882a593Smuzhiyun u32 offset, 1783*4882a593Smuzhiyun u64 *value); 1784*4882a593Smuzhiyun 1785*4882a593Smuzhiyun enum vxge_hw_status 1786*4882a593Smuzhiyun vxge_hw_mgmt_reg_write(struct __vxge_hw_device *devh, 1787*4882a593Smuzhiyun enum vxge_hw_mgmt_reg_type type, 1788*4882a593Smuzhiyun u32 index, 1789*4882a593Smuzhiyun u32 offset, 1790*4882a593Smuzhiyun u64 value); 1791*4882a593Smuzhiyun 1792*4882a593Smuzhiyun /** 1793*4882a593Smuzhiyun * enum enum vxge_hw_rxd_state - Descriptor (RXD) state. 1794*4882a593Smuzhiyun * @VXGE_HW_RXD_STATE_NONE: Invalid state. 1795*4882a593Smuzhiyun * @VXGE_HW_RXD_STATE_AVAIL: Descriptor is available for reservation. 1796*4882a593Smuzhiyun * @VXGE_HW_RXD_STATE_POSTED: Descriptor is posted for processing by the 1797*4882a593Smuzhiyun * device. 1798*4882a593Smuzhiyun * @VXGE_HW_RXD_STATE_FREED: Descriptor is free and can be reused for 1799*4882a593Smuzhiyun * filling-in and posting later. 1800*4882a593Smuzhiyun * 1801*4882a593Smuzhiyun * Titan/HW descriptor states. 1802*4882a593Smuzhiyun * 1803*4882a593Smuzhiyun */ 1804*4882a593Smuzhiyun enum vxge_hw_rxd_state { 1805*4882a593Smuzhiyun VXGE_HW_RXD_STATE_NONE = 0, 1806*4882a593Smuzhiyun VXGE_HW_RXD_STATE_AVAIL = 1, 1807*4882a593Smuzhiyun VXGE_HW_RXD_STATE_POSTED = 2, 1808*4882a593Smuzhiyun VXGE_HW_RXD_STATE_FREED = 3 1809*4882a593Smuzhiyun }; 1810*4882a593Smuzhiyun 1811*4882a593Smuzhiyun /** 1812*4882a593Smuzhiyun * struct vxge_hw_ring_rxd_info - Extended information associated with a 1813*4882a593Smuzhiyun * completed ring descriptor. 1814*4882a593Smuzhiyun * @syn_flag: SYN flag 1815*4882a593Smuzhiyun * @is_icmp: Is ICMP 1816*4882a593Smuzhiyun * @fast_path_eligible: Fast Path Eligible flag 1817*4882a593Smuzhiyun * @l3_cksum: in L3 checksum is valid 1818*4882a593Smuzhiyun * @l3_cksum: Result of IP checksum check (by Titan hardware). 1819*4882a593Smuzhiyun * This field containing VXGE_HW_L3_CKSUM_OK would mean that 1820*4882a593Smuzhiyun * the checksum is correct, otherwise - the datagram is 1821*4882a593Smuzhiyun * corrupted. 1822*4882a593Smuzhiyun * @l4_cksum: in L4 checksum is valid 1823*4882a593Smuzhiyun * @l4_cksum: Result of TCP/UDP checksum check (by Titan hardware). 1824*4882a593Smuzhiyun * This field containing VXGE_HW_L4_CKSUM_OK would mean that 1825*4882a593Smuzhiyun * the checksum is correct. Otherwise - the packet is 1826*4882a593Smuzhiyun * corrupted. 1827*4882a593Smuzhiyun * @frame: Zero or more of enum vxge_hw_frame_type flags. 1828*4882a593Smuzhiyun * See enum vxge_hw_frame_type{}. 1829*4882a593Smuzhiyun * @proto: zero or more of enum vxge_hw_frame_proto flags. Reporting bits for 1830*4882a593Smuzhiyun * various higher-layer protocols, including (but note restricted to) 1831*4882a593Smuzhiyun * TCP and UDP. See enum vxge_hw_frame_proto{}. 1832*4882a593Smuzhiyun * @is_vlan: If vlan tag is valid 1833*4882a593Smuzhiyun * @vlan: VLAN tag extracted from the received frame. 1834*4882a593Smuzhiyun * @rth_bucket: RTH bucket 1835*4882a593Smuzhiyun * @rth_it_hit: Set, If RTH hash value calculated by the Titan hardware 1836*4882a593Smuzhiyun * has a matching entry in the Indirection table. 1837*4882a593Smuzhiyun * @rth_spdm_hit: Set, If RTH hash value calculated by the Titan hardware 1838*4882a593Smuzhiyun * has a matching entry in the Socket Pair Direct Match table. 1839*4882a593Smuzhiyun * @rth_hash_type: RTH hash code of the function used to calculate the hash. 1840*4882a593Smuzhiyun * @rth_value: Receive Traffic Hashing(RTH) hash value. Produced by Titan 1841*4882a593Smuzhiyun * hardware if RTH is enabled. 1842*4882a593Smuzhiyun */ 1843*4882a593Smuzhiyun struct vxge_hw_ring_rxd_info { 1844*4882a593Smuzhiyun u32 syn_flag; 1845*4882a593Smuzhiyun u32 is_icmp; 1846*4882a593Smuzhiyun u32 fast_path_eligible; 1847*4882a593Smuzhiyun u32 l3_cksum_valid; 1848*4882a593Smuzhiyun u32 l3_cksum; 1849*4882a593Smuzhiyun u32 l4_cksum_valid; 1850*4882a593Smuzhiyun u32 l4_cksum; 1851*4882a593Smuzhiyun u32 frame; 1852*4882a593Smuzhiyun u32 proto; 1853*4882a593Smuzhiyun u32 is_vlan; 1854*4882a593Smuzhiyun u32 vlan; 1855*4882a593Smuzhiyun u32 rth_bucket; 1856*4882a593Smuzhiyun u32 rth_it_hit; 1857*4882a593Smuzhiyun u32 rth_spdm_hit; 1858*4882a593Smuzhiyun u32 rth_hash_type; 1859*4882a593Smuzhiyun u32 rth_value; 1860*4882a593Smuzhiyun }; 1861*4882a593Smuzhiyun /** 1862*4882a593Smuzhiyun * enum vxge_hw_ring_tcode - Transfer codes returned by adapter 1863*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_OK: Transfer ok. 1864*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_L3_CKSUM_MISMATCH: Layer 3 checksum presentation 1865*4882a593Smuzhiyun * configuration mismatch. 1866*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_L4_CKSUM_MISMATCH: Layer 4 checksum presentation 1867*4882a593Smuzhiyun * configuration mismatch. 1868*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_L3_L4_CKSUM_MISMATCH: Layer 3 and Layer 4 checksum 1869*4882a593Smuzhiyun * presentation configuration mismatch. 1870*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_L3_PKT_ERR: Layer 3 error unparseable packet, 1871*4882a593Smuzhiyun * such as unknown IPv6 header. 1872*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_L2_FRM_ERR: Layer 2 error frame integrity 1873*4882a593Smuzhiyun * error, such as FCS or ECC). 1874*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_BUF_SIZE_ERR: Buffer size error the RxD buffer( 1875*4882a593Smuzhiyun * s) were not appropriately sized and data loss occurred. 1876*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_INT_ECC_ERR: Internal ECC error RxD corrupted. 1877*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_BENIGN_OVFLOW: Benign overflow the contents of 1878*4882a593Smuzhiyun * Segment1 exceeded the capacity of Buffer1 and the remainder 1879*4882a593Smuzhiyun * was placed in Buffer2. Segment2 now starts in Buffer3. 1880*4882a593Smuzhiyun * No data loss or errors occurred. 1881*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_ZERO_LEN_BUFF: Buffer size 0 one of the RxDs 1882*4882a593Smuzhiyun * assigned buffers has a size of 0 bytes. 1883*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_FRM_DROP: Frame dropped either due to 1884*4882a593Smuzhiyun * VPath Reset or because of a VPIN mismatch. 1885*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_UNUSED: Unused 1886*4882a593Smuzhiyun * @VXGE_HW_RING_T_CODE_MULTI_ERR: Multiple errors more than one 1887*4882a593Smuzhiyun * transfer code condition occurred. 1888*4882a593Smuzhiyun * 1889*4882a593Smuzhiyun * Transfer codes returned by adapter. 1890*4882a593Smuzhiyun */ 1891*4882a593Smuzhiyun enum vxge_hw_ring_tcode { 1892*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_OK = 0x0, 1893*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_L3_CKSUM_MISMATCH = 0x1, 1894*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_L4_CKSUM_MISMATCH = 0x2, 1895*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_L3_L4_CKSUM_MISMATCH = 0x3, 1896*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_L3_PKT_ERR = 0x5, 1897*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_L2_FRM_ERR = 0x6, 1898*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_BUF_SIZE_ERR = 0x7, 1899*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_INT_ECC_ERR = 0x8, 1900*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_BENIGN_OVFLOW = 0x9, 1901*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_ZERO_LEN_BUFF = 0xA, 1902*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_FRM_DROP = 0xC, 1903*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_UNUSED = 0xE, 1904*4882a593Smuzhiyun VXGE_HW_RING_T_CODE_MULTI_ERR = 0xF 1905*4882a593Smuzhiyun }; 1906*4882a593Smuzhiyun 1907*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_ring_rxd_reserve( 1908*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1909*4882a593Smuzhiyun void **rxdh); 1910*4882a593Smuzhiyun 1911*4882a593Smuzhiyun void 1912*4882a593Smuzhiyun vxge_hw_ring_rxd_pre_post( 1913*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1914*4882a593Smuzhiyun void *rxdh); 1915*4882a593Smuzhiyun 1916*4882a593Smuzhiyun void 1917*4882a593Smuzhiyun vxge_hw_ring_rxd_post_post( 1918*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1919*4882a593Smuzhiyun void *rxdh); 1920*4882a593Smuzhiyun 1921*4882a593Smuzhiyun void 1922*4882a593Smuzhiyun vxge_hw_ring_rxd_post_post_wmb( 1923*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1924*4882a593Smuzhiyun void *rxdh); 1925*4882a593Smuzhiyun 1926*4882a593Smuzhiyun void vxge_hw_ring_rxd_post( 1927*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1928*4882a593Smuzhiyun void *rxdh); 1929*4882a593Smuzhiyun 1930*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_ring_rxd_next_completed( 1931*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1932*4882a593Smuzhiyun void **rxdh, 1933*4882a593Smuzhiyun u8 *t_code); 1934*4882a593Smuzhiyun 1935*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_ring_handle_tcode( 1936*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1937*4882a593Smuzhiyun void *rxdh, 1938*4882a593Smuzhiyun u8 t_code); 1939*4882a593Smuzhiyun 1940*4882a593Smuzhiyun void vxge_hw_ring_rxd_free( 1941*4882a593Smuzhiyun struct __vxge_hw_ring *ring_handle, 1942*4882a593Smuzhiyun void *rxdh); 1943*4882a593Smuzhiyun 1944*4882a593Smuzhiyun /** 1945*4882a593Smuzhiyun * enum enum vxge_hw_frame_proto - Higher-layer ethernet protocols. 1946*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_VLAN_TAGGED: VLAN. 1947*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_IPV4: IPv4. 1948*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_IPV6: IPv6. 1949*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_IP_FRAG: IP fragmented. 1950*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_TCP: TCP. 1951*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_UDP: UDP. 1952*4882a593Smuzhiyun * @VXGE_HW_FRAME_PROTO_TCP_OR_UDP: TCP or UDP. 1953*4882a593Smuzhiyun * 1954*4882a593Smuzhiyun * Higher layer ethernet protocols and options. 1955*4882a593Smuzhiyun */ 1956*4882a593Smuzhiyun enum vxge_hw_frame_proto { 1957*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_VLAN_TAGGED = 0x80, 1958*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_IPV4 = 0x10, 1959*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_IPV6 = 0x08, 1960*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_IP_FRAG = 0x04, 1961*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_TCP = 0x02, 1962*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_UDP = 0x01, 1963*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_TCP_OR_UDP = (VXGE_HW_FRAME_PROTO_TCP | \ 1964*4882a593Smuzhiyun VXGE_HW_FRAME_PROTO_UDP) 1965*4882a593Smuzhiyun }; 1966*4882a593Smuzhiyun 1967*4882a593Smuzhiyun /** 1968*4882a593Smuzhiyun * enum enum vxge_hw_fifo_gather_code - Gather codes used in fifo TxD 1969*4882a593Smuzhiyun * @VXGE_HW_FIFO_GATHER_CODE_FIRST: First TxDL 1970*4882a593Smuzhiyun * @VXGE_HW_FIFO_GATHER_CODE_MIDDLE: Middle TxDL 1971*4882a593Smuzhiyun * @VXGE_HW_FIFO_GATHER_CODE_LAST: Last TxDL 1972*4882a593Smuzhiyun * @VXGE_HW_FIFO_GATHER_CODE_FIRST_LAST: First and Last TxDL. 1973*4882a593Smuzhiyun * 1974*4882a593Smuzhiyun * These gather codes are used to indicate the position of a TxD in a TxD list 1975*4882a593Smuzhiyun */ 1976*4882a593Smuzhiyun enum vxge_hw_fifo_gather_code { 1977*4882a593Smuzhiyun VXGE_HW_FIFO_GATHER_CODE_FIRST = 0x2, 1978*4882a593Smuzhiyun VXGE_HW_FIFO_GATHER_CODE_MIDDLE = 0x0, 1979*4882a593Smuzhiyun VXGE_HW_FIFO_GATHER_CODE_LAST = 0x1, 1980*4882a593Smuzhiyun VXGE_HW_FIFO_GATHER_CODE_FIRST_LAST = 0x3 1981*4882a593Smuzhiyun }; 1982*4882a593Smuzhiyun 1983*4882a593Smuzhiyun /** 1984*4882a593Smuzhiyun * enum enum vxge_hw_fifo_tcode - tcodes used in fifo 1985*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_OK: Transfer OK 1986*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_PCI_READ_CORRUPT: PCI read transaction (either TxD or 1987*4882a593Smuzhiyun * frame data) returned with corrupt data. 1988*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_PCI_READ_FAIL:PCI read transaction was returned 1989*4882a593Smuzhiyun * with no data. 1990*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_INVALID_MSS: The host attempted to send either a 1991*4882a593Smuzhiyun * frame or LSO MSS that was too long (>9800B). 1992*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_LSO_ERROR: Error detected during TCP/UDP Large Send 1993*4882a593Smuzhiyun * Offload operation, due to improper header template, 1994*4882a593Smuzhiyun * unsupported protocol, etc. 1995*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_UNUSED: Unused 1996*4882a593Smuzhiyun * @VXGE_HW_FIFO_T_CODE_MULTI_ERROR: Set to 1 by the adapter if multiple 1997*4882a593Smuzhiyun * data buffer transfer errors are encountered (see below). 1998*4882a593Smuzhiyun * Otherwise it is set to 0. 1999*4882a593Smuzhiyun * 2000*4882a593Smuzhiyun * These tcodes are returned in various API for TxD status 2001*4882a593Smuzhiyun */ 2002*4882a593Smuzhiyun enum vxge_hw_fifo_tcode { 2003*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_OK = 0x0, 2004*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_PCI_READ_CORRUPT = 0x1, 2005*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_PCI_READ_FAIL = 0x2, 2006*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_INVALID_MSS = 0x3, 2007*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_LSO_ERROR = 0x4, 2008*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_UNUSED = 0x7, 2009*4882a593Smuzhiyun VXGE_HW_FIFO_T_CODE_MULTI_ERROR = 0x8 2010*4882a593Smuzhiyun }; 2011*4882a593Smuzhiyun 2012*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_fifo_txdl_reserve( 2013*4882a593Smuzhiyun struct __vxge_hw_fifo *fifoh, 2014*4882a593Smuzhiyun void **txdlh, 2015*4882a593Smuzhiyun void **txdl_priv); 2016*4882a593Smuzhiyun 2017*4882a593Smuzhiyun void vxge_hw_fifo_txdl_buffer_set( 2018*4882a593Smuzhiyun struct __vxge_hw_fifo *fifo_handle, 2019*4882a593Smuzhiyun void *txdlh, 2020*4882a593Smuzhiyun u32 frag_idx, 2021*4882a593Smuzhiyun dma_addr_t dma_pointer, 2022*4882a593Smuzhiyun u32 size); 2023*4882a593Smuzhiyun 2024*4882a593Smuzhiyun void vxge_hw_fifo_txdl_post( 2025*4882a593Smuzhiyun struct __vxge_hw_fifo *fifo_handle, 2026*4882a593Smuzhiyun void *txdlh); 2027*4882a593Smuzhiyun 2028*4882a593Smuzhiyun u32 vxge_hw_fifo_free_txdl_count_get( 2029*4882a593Smuzhiyun struct __vxge_hw_fifo *fifo_handle); 2030*4882a593Smuzhiyun 2031*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_fifo_txdl_next_completed( 2032*4882a593Smuzhiyun struct __vxge_hw_fifo *fifoh, 2033*4882a593Smuzhiyun void **txdlh, 2034*4882a593Smuzhiyun enum vxge_hw_fifo_tcode *t_code); 2035*4882a593Smuzhiyun 2036*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_fifo_handle_tcode( 2037*4882a593Smuzhiyun struct __vxge_hw_fifo *fifoh, 2038*4882a593Smuzhiyun void *txdlh, 2039*4882a593Smuzhiyun enum vxge_hw_fifo_tcode t_code); 2040*4882a593Smuzhiyun 2041*4882a593Smuzhiyun void vxge_hw_fifo_txdl_free( 2042*4882a593Smuzhiyun struct __vxge_hw_fifo *fifoh, 2043*4882a593Smuzhiyun void *txdlh); 2044*4882a593Smuzhiyun 2045*4882a593Smuzhiyun /* 2046*4882a593Smuzhiyun * Device 2047*4882a593Smuzhiyun */ 2048*4882a593Smuzhiyun 2049*4882a593Smuzhiyun #define VXGE_HW_RING_NEXT_BLOCK_POINTER_OFFSET (VXGE_HW_BLOCK_SIZE-8) 2050*4882a593Smuzhiyun #define VXGE_HW_RING_MEMBLOCK_IDX_OFFSET (VXGE_HW_BLOCK_SIZE-16) 2051*4882a593Smuzhiyun 2052*4882a593Smuzhiyun /* 2053*4882a593Smuzhiyun * struct __vxge_hw_ring_rxd_priv - Receive descriptor HW-private data. 2054*4882a593Smuzhiyun * @dma_addr: DMA (mapped) address of _this_ descriptor. 2055*4882a593Smuzhiyun * @dma_handle: DMA handle used to map the descriptor onto device. 2056*4882a593Smuzhiyun * @dma_offset: Descriptor's offset in the memory block. HW allocates 2057*4882a593Smuzhiyun * descriptors in memory blocks of %VXGE_HW_BLOCK_SIZE 2058*4882a593Smuzhiyun * bytes. Each memblock is contiguous DMA-able memory. Each 2059*4882a593Smuzhiyun * memblock contains 1 or more 4KB RxD blocks visible to the 2060*4882a593Smuzhiyun * Titan hardware. 2061*4882a593Smuzhiyun * @dma_object: DMA address and handle of the memory block that contains 2062*4882a593Smuzhiyun * the descriptor. This member is used only in the "checked" 2063*4882a593Smuzhiyun * version of the HW (to enforce certain assertions); 2064*4882a593Smuzhiyun * otherwise it gets compiled out. 2065*4882a593Smuzhiyun * @allocated: True if the descriptor is reserved, 0 otherwise. Internal usage. 2066*4882a593Smuzhiyun * 2067*4882a593Smuzhiyun * Per-receive decsriptor HW-private data. HW uses the space to keep DMA 2068*4882a593Smuzhiyun * information associated with the descriptor. Note that driver can ask HW 2069*4882a593Smuzhiyun * to allocate additional per-descriptor space for its own (driver-specific) 2070*4882a593Smuzhiyun * purposes. 2071*4882a593Smuzhiyun */ 2072*4882a593Smuzhiyun struct __vxge_hw_ring_rxd_priv { 2073*4882a593Smuzhiyun dma_addr_t dma_addr; 2074*4882a593Smuzhiyun struct pci_dev *dma_handle; 2075*4882a593Smuzhiyun ptrdiff_t dma_offset; 2076*4882a593Smuzhiyun #ifdef VXGE_DEBUG_ASSERT 2077*4882a593Smuzhiyun struct vxge_hw_mempool_dma *dma_object; 2078*4882a593Smuzhiyun #endif 2079*4882a593Smuzhiyun }; 2080*4882a593Smuzhiyun 2081*4882a593Smuzhiyun struct vxge_hw_mempool_cbs { 2082*4882a593Smuzhiyun void (*item_func_alloc)( 2083*4882a593Smuzhiyun struct vxge_hw_mempool *mempoolh, 2084*4882a593Smuzhiyun u32 memblock_index, 2085*4882a593Smuzhiyun struct vxge_hw_mempool_dma *dma_object, 2086*4882a593Smuzhiyun u32 index, 2087*4882a593Smuzhiyun u32 is_last); 2088*4882a593Smuzhiyun }; 2089*4882a593Smuzhiyun 2090*4882a593Smuzhiyun #define VXGE_HW_VIRTUAL_PATH_HANDLE(vpath) \ 2091*4882a593Smuzhiyun ((struct __vxge_hw_vpath_handle *)(vpath)->vpath_handles.next) 2092*4882a593Smuzhiyun 2093*4882a593Smuzhiyun enum vxge_hw_status 2094*4882a593Smuzhiyun __vxge_hw_vpath_rts_table_get( 2095*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2096*4882a593Smuzhiyun u32 action, 2097*4882a593Smuzhiyun u32 rts_table, 2098*4882a593Smuzhiyun u32 offset, 2099*4882a593Smuzhiyun u64 *data1, 2100*4882a593Smuzhiyun u64 *data2); 2101*4882a593Smuzhiyun 2102*4882a593Smuzhiyun enum vxge_hw_status 2103*4882a593Smuzhiyun __vxge_hw_vpath_rts_table_set( 2104*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2105*4882a593Smuzhiyun u32 action, 2106*4882a593Smuzhiyun u32 rts_table, 2107*4882a593Smuzhiyun u32 offset, 2108*4882a593Smuzhiyun u64 data1, 2109*4882a593Smuzhiyun u64 data2); 2110*4882a593Smuzhiyun 2111*4882a593Smuzhiyun enum vxge_hw_status 2112*4882a593Smuzhiyun __vxge_hw_vpath_enable( 2113*4882a593Smuzhiyun struct __vxge_hw_device *devh, 2114*4882a593Smuzhiyun u32 vp_id); 2115*4882a593Smuzhiyun 2116*4882a593Smuzhiyun void vxge_hw_device_intr_enable( 2117*4882a593Smuzhiyun struct __vxge_hw_device *devh); 2118*4882a593Smuzhiyun 2119*4882a593Smuzhiyun u32 vxge_hw_device_set_intr_type(struct __vxge_hw_device *devh, u32 intr_mode); 2120*4882a593Smuzhiyun 2121*4882a593Smuzhiyun void vxge_hw_device_intr_disable( 2122*4882a593Smuzhiyun struct __vxge_hw_device *devh); 2123*4882a593Smuzhiyun 2124*4882a593Smuzhiyun void vxge_hw_device_mask_all( 2125*4882a593Smuzhiyun struct __vxge_hw_device *devh); 2126*4882a593Smuzhiyun 2127*4882a593Smuzhiyun void vxge_hw_device_unmask_all( 2128*4882a593Smuzhiyun struct __vxge_hw_device *devh); 2129*4882a593Smuzhiyun 2130*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_device_begin_irq( 2131*4882a593Smuzhiyun struct __vxge_hw_device *devh, 2132*4882a593Smuzhiyun u32 skip_alarms, 2133*4882a593Smuzhiyun u64 *reason); 2134*4882a593Smuzhiyun 2135*4882a593Smuzhiyun void vxge_hw_device_clear_tx_rx( 2136*4882a593Smuzhiyun struct __vxge_hw_device *devh); 2137*4882a593Smuzhiyun 2138*4882a593Smuzhiyun /* 2139*4882a593Smuzhiyun * Virtual Paths 2140*4882a593Smuzhiyun */ 2141*4882a593Smuzhiyun 2142*4882a593Smuzhiyun void vxge_hw_vpath_dynamic_rti_rtimer_set(struct __vxge_hw_ring *ring); 2143*4882a593Smuzhiyun 2144*4882a593Smuzhiyun void vxge_hw_vpath_dynamic_tti_rtimer_set(struct __vxge_hw_fifo *fifo); 2145*4882a593Smuzhiyun 2146*4882a593Smuzhiyun u32 vxge_hw_vpath_id( 2147*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2148*4882a593Smuzhiyun 2149*4882a593Smuzhiyun enum vxge_hw_vpath_mac_addr_add_mode { 2150*4882a593Smuzhiyun VXGE_HW_VPATH_MAC_ADDR_ADD_DUPLICATE = 0, 2151*4882a593Smuzhiyun VXGE_HW_VPATH_MAC_ADDR_DISCARD_DUPLICATE = 1, 2152*4882a593Smuzhiyun VXGE_HW_VPATH_MAC_ADDR_REPLACE_DUPLICATE = 2 2153*4882a593Smuzhiyun }; 2154*4882a593Smuzhiyun 2155*4882a593Smuzhiyun enum vxge_hw_status 2156*4882a593Smuzhiyun vxge_hw_vpath_mac_addr_add( 2157*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2158*4882a593Smuzhiyun u8 *macaddr, 2159*4882a593Smuzhiyun u8 *macaddr_mask, 2160*4882a593Smuzhiyun enum vxge_hw_vpath_mac_addr_add_mode duplicate_mode); 2161*4882a593Smuzhiyun 2162*4882a593Smuzhiyun enum vxge_hw_status 2163*4882a593Smuzhiyun vxge_hw_vpath_mac_addr_get( 2164*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2165*4882a593Smuzhiyun u8 *macaddr, 2166*4882a593Smuzhiyun u8 *macaddr_mask); 2167*4882a593Smuzhiyun 2168*4882a593Smuzhiyun enum vxge_hw_status 2169*4882a593Smuzhiyun vxge_hw_vpath_mac_addr_get_next( 2170*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2171*4882a593Smuzhiyun u8 *macaddr, 2172*4882a593Smuzhiyun u8 *macaddr_mask); 2173*4882a593Smuzhiyun 2174*4882a593Smuzhiyun enum vxge_hw_status 2175*4882a593Smuzhiyun vxge_hw_vpath_mac_addr_delete( 2176*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2177*4882a593Smuzhiyun u8 *macaddr, 2178*4882a593Smuzhiyun u8 *macaddr_mask); 2179*4882a593Smuzhiyun 2180*4882a593Smuzhiyun enum vxge_hw_status 2181*4882a593Smuzhiyun vxge_hw_vpath_vid_add( 2182*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2183*4882a593Smuzhiyun u64 vid); 2184*4882a593Smuzhiyun 2185*4882a593Smuzhiyun enum vxge_hw_status 2186*4882a593Smuzhiyun vxge_hw_vpath_vid_delete( 2187*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2188*4882a593Smuzhiyun u64 vid); 2189*4882a593Smuzhiyun 2190*4882a593Smuzhiyun enum vxge_hw_status 2191*4882a593Smuzhiyun vxge_hw_vpath_etype_add( 2192*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2193*4882a593Smuzhiyun u64 etype); 2194*4882a593Smuzhiyun 2195*4882a593Smuzhiyun enum vxge_hw_status 2196*4882a593Smuzhiyun vxge_hw_vpath_etype_get( 2197*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2198*4882a593Smuzhiyun u64 *etype); 2199*4882a593Smuzhiyun 2200*4882a593Smuzhiyun enum vxge_hw_status 2201*4882a593Smuzhiyun vxge_hw_vpath_etype_get_next( 2202*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2203*4882a593Smuzhiyun u64 *etype); 2204*4882a593Smuzhiyun 2205*4882a593Smuzhiyun enum vxge_hw_status 2206*4882a593Smuzhiyun vxge_hw_vpath_etype_delete( 2207*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2208*4882a593Smuzhiyun u64 etype); 2209*4882a593Smuzhiyun 2210*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_promisc_enable( 2211*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2212*4882a593Smuzhiyun 2213*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_promisc_disable( 2214*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2215*4882a593Smuzhiyun 2216*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_bcast_enable( 2217*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2218*4882a593Smuzhiyun 2219*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_mcast_enable( 2220*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2221*4882a593Smuzhiyun 2222*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_mcast_disable( 2223*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2224*4882a593Smuzhiyun 2225*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_poll_rx( 2226*4882a593Smuzhiyun struct __vxge_hw_ring *ringh); 2227*4882a593Smuzhiyun 2228*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_poll_tx( 2229*4882a593Smuzhiyun struct __vxge_hw_fifo *fifoh, 2230*4882a593Smuzhiyun struct sk_buff ***skb_ptr, int nr_skb, int *more); 2231*4882a593Smuzhiyun 2232*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_alarm_process( 2233*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle, 2234*4882a593Smuzhiyun u32 skip_alarms); 2235*4882a593Smuzhiyun 2236*4882a593Smuzhiyun void 2237*4882a593Smuzhiyun vxge_hw_vpath_msix_set(struct __vxge_hw_vpath_handle *vpath_handle, 2238*4882a593Smuzhiyun int *tim_msix_id, int alarm_msix_id); 2239*4882a593Smuzhiyun 2240*4882a593Smuzhiyun void 2241*4882a593Smuzhiyun vxge_hw_vpath_msix_mask(struct __vxge_hw_vpath_handle *vpath_handle, 2242*4882a593Smuzhiyun int msix_id); 2243*4882a593Smuzhiyun 2244*4882a593Smuzhiyun void vxge_hw_vpath_msix_clear(struct __vxge_hw_vpath_handle *vp, int msix_id); 2245*4882a593Smuzhiyun 2246*4882a593Smuzhiyun void vxge_hw_device_flush_io(struct __vxge_hw_device *devh); 2247*4882a593Smuzhiyun 2248*4882a593Smuzhiyun void 2249*4882a593Smuzhiyun vxge_hw_vpath_msix_unmask(struct __vxge_hw_vpath_handle *vpath_handle, 2250*4882a593Smuzhiyun int msix_id); 2251*4882a593Smuzhiyun 2252*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_intr_enable( 2253*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2254*4882a593Smuzhiyun 2255*4882a593Smuzhiyun enum vxge_hw_status vxge_hw_vpath_intr_disable( 2256*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2257*4882a593Smuzhiyun 2258*4882a593Smuzhiyun void vxge_hw_vpath_inta_mask_tx_rx( 2259*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2260*4882a593Smuzhiyun 2261*4882a593Smuzhiyun void vxge_hw_vpath_inta_unmask_tx_rx( 2262*4882a593Smuzhiyun struct __vxge_hw_vpath_handle *vpath_handle); 2263*4882a593Smuzhiyun 2264*4882a593Smuzhiyun void 2265*4882a593Smuzhiyun vxge_hw_channel_msix_mask(struct __vxge_hw_channel *channelh, int msix_id); 2266*4882a593Smuzhiyun 2267*4882a593Smuzhiyun void 2268*4882a593Smuzhiyun vxge_hw_channel_msix_unmask(struct __vxge_hw_channel *channelh, int msix_id); 2269*4882a593Smuzhiyun 2270*4882a593Smuzhiyun void 2271*4882a593Smuzhiyun vxge_hw_channel_msix_clear(struct __vxge_hw_channel *channelh, int msix_id); 2272*4882a593Smuzhiyun 2273*4882a593Smuzhiyun void 2274*4882a593Smuzhiyun vxge_hw_channel_dtr_try_complete(struct __vxge_hw_channel *channel, 2275*4882a593Smuzhiyun void **dtrh); 2276*4882a593Smuzhiyun 2277*4882a593Smuzhiyun void 2278*4882a593Smuzhiyun vxge_hw_channel_dtr_complete(struct __vxge_hw_channel *channel); 2279*4882a593Smuzhiyun 2280*4882a593Smuzhiyun void 2281*4882a593Smuzhiyun vxge_hw_channel_dtr_free(struct __vxge_hw_channel *channel, void *dtrh); 2282*4882a593Smuzhiyun 2283*4882a593Smuzhiyun int 2284*4882a593Smuzhiyun vxge_hw_channel_dtr_count(struct __vxge_hw_channel *channel); 2285*4882a593Smuzhiyun 2286*4882a593Smuzhiyun void vxge_hw_vpath_tti_ci_set(struct __vxge_hw_fifo *fifo); 2287*4882a593Smuzhiyun 2288*4882a593Smuzhiyun void vxge_hw_vpath_dynamic_rti_ci_set(struct __vxge_hw_ring *ring); 2289*4882a593Smuzhiyun 2290*4882a593Smuzhiyun #endif 2291