summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/nve/drvinfo.h
blob: 41c659a7625b6aa012c5716824cc03cee9b36b92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
/***************************************************************************\
|*                                                                           *|
|*         Copyright 2001-2003 NVIDIA, Corporation.  All rights reserved.    *|
|*                                                                           *|
|*     THE INFORMATION CONTAINED HEREIN  IS PROPRIETARY AND CONFIDENTIAL     *|
|*     TO NVIDIA, CORPORATION.   USE,  REPRODUCTION OR DISCLOSURE TO ANY     *|
|*     THIRD PARTY IS SUBJECT TO WRITTEN PRE-APPROVAL BY NVIDIA, CORP.       *|
|*                                                                           *|
|*     THE INFORMATION CONTAINED HEREIN IS PROVIDED  "AS IS" WITHOUT         *|
|*     EXPRESS OR IMPLIED WARRANTY OF ANY KIND, INCLUDING ALL IMPLIED        *|
|*     WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A     *|
|*     PARTICULAR PURPOSE.                                                   *|
|*                                                                           *|
\***************************************************************************/

/*   
 *   This file contains the header info common to the network drivers and applications.
 *   Currently, these applications include ASF, co-installers, and qstats.
 *
 *
 */

#ifndef _DRVINFO_H_
#define _DRVINFO_H_

// Switch to byte packing, regardless of global packing specified by the compiler switch
#pragma pack(1)  

//////////////////////////////////////////////////////////////////
// For the ADAPTER_GetStatistics call used by qstats.  This 
// is the template used by the legacy driver.
#define MAX_TRANSMIT_COLISION_STATS     16

#define ADAPTER_STATS_LEGACY_VERSION    1
#define ADAPTER_STATS_RM_VERSION        2

typedef struct  _ADAPTER_STATS_V1
{
    NV_UINT32   ulVersion;

    NV_UINT32   ulSuccessfulTransmissions;
    NV_UINT32   ulFailedTransmissions;
    NV_UINT32   ulRetryErrors;
    NV_UINT32   ulUnderflowErrors;
    NV_UINT32   ulLossOfCarrierErrors;
    NV_UINT32   ulLateCollisionErrors;
    NV_UINT32   ulDeferredTransmissions;
    NV_UINT32    ulExcessDeferredTransmissions;
    NV_UINT32   aulSuccessfulTransmitsAfterCollisions[MAX_TRANSMIT_COLISION_STATS];

    NV_UINT32   ulMissedFrames;
    NV_UINT32   ulSuccessfulReceptions;
    NV_UINT32   ulFailedReceptions;
    NV_UINT32   ulCRCErrors;
    NV_UINT32   ulFramingErrors;
    NV_UINT32   ulOverFlowErrors;
    NV_UINT32    ulFrameErrorsPrivate; //Not for public.
    NV_UINT32    ulNullBufferReceivePrivate; //Not for public, These are the packets which we didn't indicate to OS

    //interrupt related statistics
    NV_UINT32   ulRxInterrupt;
    NV_UINT32   ulRxInterruptUnsuccessful;
    NV_UINT32   ulTxInterrupt;
    NV_UINT32   ulTxInterruptUnsuccessful;
    NV_UINT32   ulPhyInterrupt;

}   ADAPTER_STATS_V1, *PADAPTER_STATS_V1;
//////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////
// For the ADAPTER_GetStatistics call used by qstats.  This 
// is the template used by the FD.
typedef struct  _ADAPTER_STATS
{
    NV_UINT32   ulVersion;
    NV_UINT8    ulMacAddress[6];

    //
    // Tx counters.
    //
    NV_UINT64   ulSuccessfulTransmissions;
    NV_UINT64   ulFailedTransmissions;
    NV_UINT64   ulRetryErrors;
    NV_UINT64   ulUnderflowErrors;
    NV_UINT64   ulLossOfCarrierErrors;
    NV_UINT64   ulLateCollisionErrors;
    NV_UINT64   ulDeferredTransmissions;
    NV_UINT64    ulExcessDeferredTransmissions;
    NV_UINT64   aulSuccessfulTransmitsAfterCollisions[MAX_TRANSMIT_COLISION_STATS];

    //
    // New Tx counters for GigE.
    //
    NV_UINT64   ulTxByteCount;

    //
    // Rx counters.
    //
    NV_UINT64   ulMissedFrames;
    NV_UINT64   ulSuccessfulReceptions;
    NV_UINT64   ulFailedReceptions;
    NV_UINT64   ulCRCErrors;
    NV_UINT64   ulLengthErrors;
    NV_UINT64   ulFramingErrors;
    NV_UINT64   ulOverFlowErrors;
    NV_UINT64   ulRxNoBuffer;
    NV_UINT64   ulFrameErrorsPrivate; //Not for public.
    NV_UINT64   ulNullBufferReceivePrivate; //Not for public, These are the packets which we didn't indicate to OS

    //
    // New Rx counters for GigE.
    //
    NV_UINT64   ulRxExtraByteCount;
    NV_UINT64   ulRxFrameTooLongCount;
    NV_UINT64   ulRxFrameAlignmentErrorCount;
    NV_UINT64   ulRxLateCollisionErrors;
    NV_UINT64   ulRxRuntPacketErrors;

    NV_UINT64   ulRxUnicastFrameCount;
    NV_UINT64   ulRxMulticastFrameCount;
    NV_UINT64   ulRxBroadcastFrameCount;
    NV_UINT64   ulRxPromiscuousModeFrameCount;

    //Interrupt related statistics
    NV_UINT64   ulRxInterrupt;
    NV_UINT64   ulRxInterruptUnsuccessful;
    NV_UINT64   ulTxInterrupt;
    NV_UINT64   ulTxInterruptUnsuccessful;
    NV_UINT64   ulPhyInterrupt;


    //
    // Handy things to know
    //
    NV_UINT64   ulDescriptorVersion;
    NV_UINT64   ulPollingCfg;       // configured for cpu or throughput
    NV_UINT64   ulPollingState;     // current optimizefor state.

    NV_UINT64   ulNumTxDesc;
    NV_UINT64   ulNumRxDesc;

    // 
    // Useful to determine if TX is stuck.
    //
    NV_UINT64   ulNumTxPktsQueued;
    NV_UINT64   ulNumTxPktsInProgress;

    //
    // Rx Xsum Cntrs
    //
    NV_UINT64   ulNoRxPktsNoXsum;
    NV_UINT64   ulNoRxPktsXsumIpPassTcpFail;
    NV_UINT64   ulNoRxPktsXsumIpPassUdpFail;
    NV_UINT64   ulNoRxPktsXsumIpFail;
    NV_UINT64   ulNoRxPktsXsumIpPassNoTcpUdp;
    NV_UINT64   ulNoRxPktsXsumIpPassTcpPass;
    NV_UINT64   ulNoRxPktsXsumIpPassUdpPass;
    NV_UINT64   ulNoRxPktsXsumReserved;

#ifdef _PERF_LOOP_CNTRS
    NV_UINT64  ulNumTxCmplsToProcess;
    NV_UINT64  ulNumRxCmplsToProcess;
    NV_UINT64  ulNumIntsToProcess;

    NV_UINT64  IntLoop0Cnt;
    NV_UINT64  IntLoop1Cnt;
    NV_UINT64  IntLoop2Cnt;
    NV_UINT64  IntLoop3Cnt;
    NV_UINT64  IntLoop4Cnt;
    NV_UINT64  IntLoop5Cnt;
    NV_UINT64  IntLoop6To10Cnt;
    NV_UINT64  IntLoop11Cnt;
    NV_UINT64  IntMaxLoopCnt;

    NV_UINT64   IntRxCnt0;
    NV_UINT64   IntTxCnt0;

    NV_UINT64   MaxRxLoopCnt;
    NV_UINT64   MaxTxLoopCnt;

#endif
}   ADAPTER_STATS, *PADAPTER_STATS;
//////////////////////////////////////////////////////////////////

#pragma pack()  


#endif   // #define _DRVINFO_H_


OpenPOWER on IntegriCloud