gem5  v20.1.0.0
etherdevice.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2005 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #include "dev/net/etherdevice.hh"
30 
31 #include "sim/stats.hh"
32 
33 void
35 {
37 
38  txBytes
39  .name(name() + ".txBytes")
40  .desc("Bytes Transmitted")
41  .prereq(txBytes)
42  ;
43 
44  rxBytes
45  .name(name() + ".rxBytes")
46  .desc("Bytes Received")
47  .prereq(rxBytes)
48  ;
49 
50  txPackets
51  .name(name() + ".txPackets")
52  .desc("Number of Packets Transmitted")
53  .prereq(txBytes)
54  ;
55 
56  rxPackets
57  .name(name() + ".rxPackets")
58  .desc("Number of Packets Received")
59  .prereq(rxBytes)
60  ;
61 
63  .name(name() + ".txIpChecksums")
64  .desc("Number of tx IP Checksums done by device")
65  .precision(0)
66  .prereq(txBytes)
67  ;
68 
70  .name(name() + ".rxIpChecksums")
71  .desc("Number of rx IP Checksums done by device")
72  .precision(0)
73  .prereq(rxBytes)
74  ;
75 
77  .name(name() + ".txTcpChecksums")
78  .desc("Number of tx TCP Checksums done by device")
79  .precision(0)
80  .prereq(txBytes)
81  ;
82 
84  .name(name() + ".rxTcpChecksums")
85  .desc("Number of rx TCP Checksums done by device")
86  .precision(0)
87  .prereq(rxBytes)
88  ;
89 
91  .name(name() + ".txUdpChecksums")
92  .desc("Number of tx UDP Checksums done by device")
93  .precision(0)
94  .prereq(txBytes)
95  ;
96 
98  .name(name() + ".rxUdpChecksums")
99  .desc("Number of rx UDP Checksums done by device")
100  .precision(0)
101  .prereq(rxBytes)
102  ;
103 
105  .name(name() + ".descDMAReads")
106  .desc("Number of descriptors the device read w/ DMA")
107  .precision(0)
108  ;
109 
111  .name(name() + ".descDMAWrites")
112  .desc("Number of descriptors the device wrote w/ DMA")
113  .precision(0)
114  ;
115 
117  .name(name() + ".descDmaReadBytes")
118  .desc("number of descriptor bytes read w/ DMA")
119  .precision(0)
120  ;
121 
123  .name(name() + ".descDmaWriteBytes")
124  .desc("number of descriptor bytes write w/ DMA")
125  .precision(0)
126  ;
127 
129  .name(name() + ".txBandwidth")
130  .desc("Transmit Bandwidth (bits/s)")
131  .precision(0)
132  .prereq(txBytes)
133  ;
134 
136  .name(name() + ".rxBandwidth")
137  .desc("Receive Bandwidth (bits/s)")
138  .precision(0)
139  .prereq(rxBytes)
140  ;
141 
143  .name(name() + ".totBandwidth")
144  .desc("Total Bandwidth (bits/s)")
145  .precision(0)
146  .prereq(totBytes)
147  ;
148 
149  totPackets
150  .name(name() + ".totPackets")
151  .desc("Total Packets")
152  .precision(0)
153  .prereq(totBytes)
154  ;
155 
156  totBytes
157  .name(name() + ".totBytes")
158  .desc("Total Bytes")
159  .precision(0)
160  .prereq(totBytes)
161  ;
162 
164  .name(name() + ".totPPS")
165  .desc("Total Tranmission Rate (packets/s)")
166  .precision(0)
167  .prereq(totBytes)
168  ;
169 
171  .name(name() + ".txPPS")
172  .desc("Packet Tranmission Rate (packets/s)")
173  .precision(0)
174  .prereq(txBytes)
175  ;
176 
178  .name(name() + ".rxPPS")
179  .desc("Packet Reception Rate (packets/s)")
180  .precision(0)
181  .prereq(rxBytes)
182  ;
183 
184  postedSwi
185  .name(name() + ".postedSwi")
186  .desc("number of software interrupts posted to CPU")
187  .precision(0)
188  ;
189 
190  totalSwi
191  .name(name() + ".totalSwi")
192  .desc("total number of Swi written to ISR")
193  .precision(0)
194  ;
195 
197  .name(name() + ".coalescedSwi")
198  .desc("average number of Swi's coalesced into each post")
199  .precision(0)
200  ;
201 
203  .name(name() + ".postedRxIdle")
204  .desc("number of rxIdle interrupts posted to CPU")
205  .precision(0)
206  ;
207 
209  .name(name() + ".totalRxIdle")
210  .desc("total number of RxIdle written to ISR")
211  .precision(0)
212  ;
213 
215  .name(name() + ".coalescedRxIdle")
216  .desc("average number of RxIdle's coalesced into each post")
217  .precision(0)
218  ;
219 
220  postedRxOk
221  .name(name() + ".postedRxOk")
222  .desc("number of RxOk interrupts posted to CPU")
223  .precision(0)
224  ;
225 
226  totalRxOk
227  .name(name() + ".totalRxOk")
228  .desc("total number of RxOk written to ISR")
229  .precision(0)
230  ;
231 
233  .name(name() + ".coalescedRxOk")
234  .desc("average number of RxOk's coalesced into each post")
235  .precision(0)
236  ;
237 
239  .name(name() + ".postedRxDesc")
240  .desc("number of RxDesc interrupts posted to CPU")
241  .precision(0)
242  ;
243 
245  .name(name() + ".totalRxDesc")
246  .desc("total number of RxDesc written to ISR")
247  .precision(0)
248  ;
249 
251  .name(name() + ".coalescedRxDesc")
252  .desc("average number of RxDesc's coalesced into each post")
253  .precision(0)
254  ;
255 
256  postedTxOk
257  .name(name() + ".postedTxOk")
258  .desc("number of TxOk interrupts posted to CPU")
259  .precision(0)
260  ;
261 
262  totalTxOk
263  .name(name() + ".totalTxOk")
264  .desc("total number of TxOk written to ISR")
265  .precision(0)
266  ;
267 
269  .name(name() + ".coalescedTxOk")
270  .desc("average number of TxOk's coalesced into each post")
271  .precision(0)
272  ;
273 
275  .name(name() + ".postedTxIdle")
276  .desc("number of TxIdle interrupts posted to CPU")
277  .precision(0)
278  ;
279 
281  .name(name() + ".totalTxIdle")
282  .desc("total number of TxIdle written to ISR")
283  .precision(0)
284  ;
285 
287  .name(name() + ".coalescedTxIdle")
288  .desc("average number of TxIdle's coalesced into each post")
289  .precision(0)
290  ;
291 
293  .name(name() + ".postedTxDesc")
294  .desc("number of TxDesc interrupts posted to CPU")
295  .precision(0)
296  ;
297 
299  .name(name() + ".totalTxDesc")
300  .desc("total number of TxDesc written to ISR")
301  .precision(0)
302  ;
303 
305  .name(name() + ".coalescedTxDesc")
306  .desc("average number of TxDesc's coalesced into each post")
307  .precision(0)
308  ;
309 
311  .name(name() + ".postedRxOrn")
312  .desc("number of RxOrn posted to CPU")
313  .precision(0)
314  ;
315 
316  totalRxOrn
317  .name(name() + ".totalRxOrn")
318  .desc("total number of RxOrn written to ISR")
319  .precision(0)
320  ;
321 
323  .name(name() + ".coalescedRxOrn")
324  .desc("average number of RxOrn's coalesced into each post")
325  .precision(0)
326  ;
327 
329  .name(name() + ".coalescedTotal")
330  .desc("average number of interrupts coalesced into each post")
331  .precision(0)
332  ;
333 
335  .name(name() + ".postedInterrupts")
336  .desc("number of posts to CPU")
337  .precision(0)
338  ;
339 
341  .name(name() + ".droppedPackets")
342  .desc("number of packets dropped")
343  .precision(0)
344  ;
345 
354 
358 
364 
368 }
Stats::Group::regStats
virtual void regStats()
Callback to set stat parameters.
Definition: group.cc:64
EtherDevice::coalescedRxOk
Stats::Formula coalescedRxOk
Definition: etherdevice.hh:92
EtherDevice::totPacketRate
Stats::Formula totPacketRate
Definition: etherdevice.hh:80
EtherDevice::descDmaReads
Stats::Scalar descDmaReads
Definition: etherdevice.hh:73
EtherDevice::rxBandwidth
Stats::Formula rxBandwidth
Definition: etherdevice.hh:82
EtherDevice::totBandwidth
Stats::Formula totBandwidth
Definition: etherdevice.hh:77
EtherDevice::totalTxOk
Stats::Scalar totalTxOk
Definition: etherdevice.hh:99
EtherDevice::txTcpChecksums
Stats::Scalar txTcpChecksums
Definition: etherdevice.hh:69
EtherDevice::txBytes
Stats::Scalar txBytes
Definition: etherdevice.hh:63
EtherDevice::txPackets
Stats::Scalar txPackets
Definition: etherdevice.hh:65
EtherDevice::rxTcpChecksums
Stats::Scalar rxTcpChecksums
Definition: etherdevice.hh:70
EtherDevice::totalRxIdle
Stats::Scalar totalRxIdle
Definition: etherdevice.hh:90
EtherDevice::rxUdpChecksums
Stats::Scalar rxUdpChecksums
Definition: etherdevice.hh:72
EtherDevice::rxIpChecksums
Stats::Scalar rxIpChecksums
Definition: etherdevice.hh:68
EtherDevice::coalescedRxOrn
Stats::Formula coalescedRxOrn
Definition: etherdevice.hh:107
EtherDevice::totPackets
Stats::Formula totPackets
Definition: etherdevice.hh:78
EtherDevice::coalescedTxIdle
Stats::Formula coalescedTxIdle
Definition: etherdevice.hh:101
stats.hh
EtherDevice::postedRxIdle
Stats::Scalar postedRxIdle
Definition: etherdevice.hh:88
EtherDevice::totalRxDesc
Stats::Scalar totalRxDesc
Definition: etherdevice.hh:96
EtherDevice::txIpChecksums
Stats::Scalar txIpChecksums
Definition: etherdevice.hh:67
EtherDevice::droppedPackets
Stats::Scalar droppedPackets
Definition: etherdevice.hh:111
EtherDevice::postedTxDesc
Stats::Scalar postedTxDesc
Definition: etherdevice.hh:103
Stats::DataWrap::prereq
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
Definition: statistics.hh:345
EtherDevice::postedTxOk
Stats::Scalar postedTxOk
Definition: etherdevice.hh:97
EtherDevice::coalescedTxDesc
Stats::Formula coalescedTxDesc
Definition: etherdevice.hh:104
simSeconds
Stats::Formula simSeconds
Definition: stat_control.cc:61
EtherDevice::postedRxOk
Stats::Scalar postedRxOk
Definition: etherdevice.hh:91
EtherDevice::postedTxIdle
Stats::Scalar postedTxIdle
Definition: etherdevice.hh:100
EtherDevice::regStats
void regStats()
Callback to set stat parameters.
Definition: etherdevice.cc:34
EtherDevice::totalTxDesc
Stats::Scalar totalTxDesc
Definition: etherdevice.hh:105
EtherDevice::coalescedTxOk
Stats::Formula coalescedTxOk
Definition: etherdevice.hh:98
EtherDevice::txUdpChecksums
Stats::Scalar txUdpChecksums
Definition: etherdevice.hh:71
EtherDevice::txPacketRate
Stats::Formula txPacketRate
Definition: etherdevice.hh:83
EtherDevice::rxPackets
Stats::Scalar rxPackets
Definition: etherdevice.hh:66
EtherDevice::postedRxDesc
Stats::Scalar postedRxDesc
Definition: etherdevice.hh:94
EtherDevice::totBytes
Stats::Formula totBytes
Definition: etherdevice.hh:79
EtherDevice::descDmaWrBytes
Stats::Scalar descDmaWrBytes
Definition: etherdevice.hh:76
EtherDevice::totalTxIdle
Stats::Scalar totalTxIdle
Definition: etherdevice.hh:102
EtherDevice::txBandwidth
Stats::Formula txBandwidth
Definition: etherdevice.hh:81
EtherDevice::coalescedRxIdle
Stats::Formula coalescedRxIdle
Definition: etherdevice.hh:89
Stats::DataWrap::name
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Definition: statistics.hh:274
EtherDevice::coalescedSwi
Stats::Formula coalescedSwi
Definition: etherdevice.hh:86
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
EtherDevice::totalRxOrn
Stats::Scalar totalRxOrn
Definition: etherdevice.hh:108
EtherDevice::totalSwi
Stats::Scalar totalSwi
Definition: etherdevice.hh:87
EtherDevice::descDmaRdBytes
Stats::Scalar descDmaRdBytes
Definition: etherdevice.hh:75
EtherDevice::rxPacketRate
Stats::Formula rxPacketRate
Definition: etherdevice.hh:84
EtherDevice::coalescedTotal
Stats::Formula coalescedTotal
Definition: etherdevice.hh:109
Stats::DataWrap::precision
Derived & precision(int _precision)
Set the precision and marks this stat to print at the end of simulation.
Definition: statistics.hh:319
EtherDevice::rxBytes
Stats::Scalar rxBytes
Definition: etherdevice.hh:64
etherdevice.hh
EtherDevice::postedRxOrn
Stats::Scalar postedRxOrn
Definition: etherdevice.hh:106
EtherDevice::coalescedRxDesc
Stats::Formula coalescedRxDesc
Definition: etherdevice.hh:95
EtherDevice::postedSwi
Stats::Scalar postedSwi
Definition: etherdevice.hh:85
Stats::DataWrap::desc
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
Definition: statistics.hh:307
EtherDevice::descDmaWrites
Stats::Scalar descDmaWrites
Definition: etherdevice.hh:74
EtherDevice::postedInterrupts
Stats::Scalar postedInterrupts
Definition: etherdevice.hh:110
Stats::constant
Temp constant(T val)
Definition: statistics.hh:3357
EtherDevice::totalRxOk
Stats::Scalar totalRxOk
Definition: etherdevice.hh:93

Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17