diff options
author | mlebeane <michael.lebeane@amd.com> | 2016-10-26 22:48:33 -0400 |
---|---|---|
committer | mlebeane <michael.lebeane@amd.com> | 2016-10-26 22:48:33 -0400 |
commit | 96905971f26e5218baebf8f953f05a9b341f9cc6 (patch) | |
tree | 4f2d06b18a4fc4bc92a4303e02e5c7668e2ec043 /src/dev/net/tcp_iface.cc | |
parent | de72e36619350f9b3e3a3dc8de63b490c4cecf2d (diff) | |
download | gem5-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/tcp_iface.cc')
-rw-r--r-- | src/dev/net/tcp_iface.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dev/net/tcp_iface.cc b/src/dev/net/tcp_iface.cc index c9ca57778..fba069674 100644 --- a/src/dev/net/tcp_iface.cc +++ b/src/dev/net/tcp_iface.cc @@ -329,6 +329,7 @@ TCPIface::recvPacket(const Header &header, EthPacketPtr &packet) packet = make_shared<EthPacketData>(header.dataPacketLength); bool ret = recvTCP(sock, packet->data, header.dataPacketLength); panic_if(!ret, "Error while reading socket"); + packet->simLength = header.simLength; packet->length = header.dataPacketLength; } |