summaryrefslogtreecommitdiff
path: root/src/dev/net/dist_packet.hh
diff options
context:
space:
mode:
authormlebeane <michael.lebeane@amd.com>2016-10-26 22:48:33 -0400
committermlebeane <michael.lebeane@amd.com>2016-10-26 22:48:33 -0400
commit96905971f26e5218baebf8f953f05a9b341f9cc6 (patch)
tree4f2d06b18a4fc4bc92a4303e02e5c7668e2ec043 /src/dev/net/dist_packet.hh
parentde72e36619350f9b3e3a3dc8de63b490c4cecf2d (diff)
downloadgem5-96905971f26e5218baebf8f953f05a9b341f9cc6.tar.xz
dev: Add 'simLength' parameter in EthPacketData
Currently, all the network devices create a 16K buffer for the 'data' field in EthPacketData, and use 'length' to keep track of the size of the packet in the buffer. This patch introduces the 'simLength' parameter to EthPacketData, which is used to hold the effective length of the packet used for all timing calulations in the simulator. Serialization is performed using only the useful data in the packet ('length') and not necessarily the entire original buffer.
Diffstat (limited to 'src/dev/net/dist_packet.hh')
-rw-r--r--src/dev/net/dist_packet.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dev/net/dist_packet.hh b/src/dev/net/dist_packet.hh
index 4c079c44a..b154ab4a7 100644
--- a/src/dev/net/dist_packet.hh
+++ b/src/dev/net/dist_packet.hh
@@ -86,6 +86,11 @@ class DistHeaderPkt
*/
MsgType msgType;
Tick sendTick;
+ /**
+ * Length used for modeling timing in the simulator.
+ * (from EthPacketData::simLength).
+ */
+ unsigned simLength;
union {
Tick sendDelay;
Tick syncRepeat;
@@ -93,6 +98,7 @@ class DistHeaderPkt
union {
/**
* Actual length of the simulated Ethernet packet.
+ * (from EthPacketData::length).
*/
unsigned dataPacketLength;
struct {