summaryrefslogtreecommitdiff
path: root/src/dev/sinic.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/sinic.hh')
-rw-r--r--src/dev/sinic.hh79
1 files changed, 48 insertions, 31 deletions
diff --git a/src/dev/sinic.hh b/src/dev/sinic.hh
index e85d93fe4..cd8412ef4 100644
--- a/src/dev/sinic.hh
+++ b/src/dev/sinic.hh
@@ -115,19 +115,24 @@ class Device : public Base
uint32_t IntrMask; // 0x0c
uint32_t RxMaxCopy; // 0x10
uint32_t TxMaxCopy; // 0x14
- uint32_t RxMaxIntr; // 0x18
- uint32_t VirtualCount; // 0x1c
- uint32_t RxFifoSize; // 0x20
- uint32_t TxFifoSize; // 0x24
- uint32_t RxFifoMark; // 0x28
- uint32_t TxFifoMark; // 0x2c
- uint64_t RxData; // 0x30
- uint64_t RxDone; // 0x38
- uint64_t RxWait; // 0x40
- uint64_t TxData; // 0x48
- uint64_t TxDone; // 0x50
- uint64_t TxWait; // 0x58
- uint64_t HwAddr; // 0x60
+ uint32_t ZeroCopySize; // 0x18
+ uint32_t ZeroCopyMark; // 0x1c
+ uint32_t VirtualCount; // 0x20
+ uint32_t RxMaxIntr; // 0x24
+ uint32_t RxFifoSize; // 0x28
+ uint32_t TxFifoSize; // 0x2c
+ uint32_t RxFifoLow; // 0x30
+ uint32_t TxFifoLow; // 0x34
+ uint32_t RxFifoHigh; // 0x38
+ uint32_t TxFifoHigh; // 0x3c
+ uint64_t RxData; // 0x40
+ uint64_t RxDone; // 0x48
+ uint64_t RxWait; // 0x50
+ uint64_t TxData; // 0x58
+ uint64_t TxDone; // 0x60
+ uint64_t TxWait; // 0x68
+ uint64_t HwAddr; // 0x70
+ uint64_t RxStatus; // 0x78
} regs;
struct VirtualReg {
@@ -136,7 +141,7 @@ class Device : public Base
uint64_t TxData;
uint64_t TxDone;
- PacketFifo::iterator rxPacket;
+ PacketFifo::iterator rxIndex;
int rxPacketOffset;
int rxPacketBytes;
uint64_t rxDoneData;
@@ -159,6 +164,10 @@ class Device : public Base
int rxActive;
VirtualList txList;
+ int rxBusyCount;
+ int rxMappedCount;
+ int rxDirtyCount;
+
uint8_t &regData8(Addr daddr) { return *((uint8_t *)&regs + daddr); }
uint32_t &regData32(Addr daddr) { return *(uint32_t *)&regData8(daddr); }
uint64_t &regData64(Addr daddr) { return *(uint64_t *)&regData8(daddr); }
@@ -274,34 +283,42 @@ class Device : public Base
* Statistics
*/
private:
- Stats::Scalar<> rxBytes;
+ Stats::Scalar rxBytes;
Stats::Formula rxBandwidth;
- Stats::Scalar<> rxPackets;
+ Stats::Scalar rxPackets;
Stats::Formula rxPacketRate;
- Stats::Scalar<> rxIpPackets;
- Stats::Scalar<> rxTcpPackets;
- Stats::Scalar<> rxUdpPackets;
- Stats::Scalar<> rxIpChecksums;
- Stats::Scalar<> rxTcpChecksums;
- Stats::Scalar<> rxUdpChecksums;
-
- Stats::Scalar<> txBytes;
+ Stats::Scalar rxIpPackets;
+ Stats::Scalar rxTcpPackets;
+ Stats::Scalar rxUdpPackets;
+ Stats::Scalar rxIpChecksums;
+ Stats::Scalar rxTcpChecksums;
+ Stats::Scalar rxUdpChecksums;
+
+ Stats::Scalar txBytes;
Stats::Formula txBandwidth;
Stats::Formula totBandwidth;
Stats::Formula totPackets;
Stats::Formula totBytes;
Stats::Formula totPacketRate;
- Stats::Scalar<> txPackets;
+ Stats::Scalar txPackets;
Stats::Formula txPacketRate;
- Stats::Scalar<> txIpPackets;
- Stats::Scalar<> txTcpPackets;
- Stats::Scalar<> txUdpPackets;
- Stats::Scalar<> txIpChecksums;
- Stats::Scalar<> txTcpChecksums;
- Stats::Scalar<> txUdpChecksums;
+ Stats::Scalar txIpPackets;
+ Stats::Scalar txTcpPackets;
+ Stats::Scalar txUdpPackets;
+ Stats::Scalar txIpChecksums;
+ Stats::Scalar txTcpChecksums;
+ Stats::Scalar txUdpChecksums;
+
+ Stats::Scalar totalVnicDistance;
+ Stats::Scalar numVnicDistance;
+ Stats::Scalar maxVnicDistance;
+ Stats::Formula avgVnicDistance;
+
+ int _maxVnicDistance;
public:
virtual void regStats();
+ virtual void resetStats();
/**
* Serialization stuff