gem5  v20.1.0.0
etherdevice.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 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 
34 #ifndef __DEV_NET_ETHERDEVICE_HH__
35 #define __DEV_NET_ETHERDEVICE_HH__
36 
37 #include "base/statistics.hh"
38 #include "dev/pci/device.hh"
39 #include "params/EtherDevBase.hh"
40 #include "params/EtherDevice.hh"
41 #include "sim/sim_object.hh"
42 
43 class EtherInt;
44 
45 class EtherDevice : public PciDevice
46 {
47  public:
48  typedef EtherDeviceParams Params;
50  : PciDevice(params)
51  {}
52 
53  const Params *
54  params() const
55  {
56  return dynamic_cast<const Params *>(_params);
57  }
58 
59  public:
60  void regStats();
61 
62  protected:
112 };
113 
124 class EtherDevBase : public EtherDevice
125 {
126  public:
127  EtherDevBase(const EtherDevBaseParams *params)
129  {}
130 
131  const EtherDevBaseParams *
132  params() const
133  {
134  return dynamic_cast<const EtherDevBaseParams *>(_params);
135  }
136 
137 };
138 
139 #endif // __DEV_NET_ETHERDEVICE_HH__
140 
EtherDevBase::EtherDevBase
EtherDevBase(const EtherDevBaseParams *params)
Definition: etherdevice.hh:127
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
EtherInt
Definition: etherint.hh:47
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
device.hh
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::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
EtherDevice::postedRxIdle
Stats::Scalar postedRxIdle
Definition: etherdevice.hh:88
EtherDevice::totalRxDesc
Stats::Scalar totalRxDesc
Definition: etherdevice.hh:96
EtherDevice::params
const Params * params() const
Definition: etherdevice.hh:54
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
EtherDevice::postedTxOk
Stats::Scalar postedTxOk
Definition: etherdevice.hh:97
EtherDevice::coalescedTxDesc
Stats::Formula coalescedTxDesc
Definition: etherdevice.hh:104
sim_object.hh
statistics.hh
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
EtherDevBase::params
const EtherDevBaseParams * params() const
Definition: etherdevice.hh:132
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
EtherDevice::coalescedSwi
Stats::Formula coalescedSwi
Definition: etherdevice.hh:86
EtherDevice::totalRxOrn
Stats::Scalar totalRxOrn
Definition: etherdevice.hh:108
EtherDevice::totalSwi
Stats::Scalar totalSwi
Definition: etherdevice.hh:87
EtherDevice::Params
EtherDeviceParams Params
Definition: etherdevice.hh:48
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
SimObject::_params
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
EtherDevice
Definition: etherdevice.hh:45
Stats::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3037
EtherDevice::rxBytes
Stats::Scalar rxBytes
Definition: etherdevice.hh:64
EtherDevice::postedRxOrn
Stats::Scalar postedRxOrn
Definition: etherdevice.hh:106
EtherDevice::EtherDevice
EtherDevice(const Params *params)
Definition: etherdevice.hh:49
EtherDevBase
Dummy class to keep the Python class hierarchy in sync with the C++ object hierarchy.
Definition: etherdevice.hh:124
EtherDevice::coalescedRxDesc
Stats::Formula coalescedRxDesc
Definition: etherdevice.hh:95
EtherDevice::postedSwi
Stats::Scalar postedSwi
Definition: etherdevice.hh:85
EtherDevice::descDmaWrites
Stats::Scalar descDmaWrites
Definition: etherdevice.hh:74
PciDevice
PCI device, base implementation is only config space.
Definition: device.hh:66
DmaDevice::Params
DmaDeviceParams Params
Definition: dma_device.hh:171
EtherDevice::postedInterrupts
Stats::Scalar postedInterrupts
Definition: etherdevice.hh:110
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