summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2005-01-19 16:26:19 -0500
committerRon Dreslinski <rdreslin@umich.edu>2005-01-19 16:26:19 -0500
commit10371be698b411bc068137bf2add0c5a74ec60eb (patch)
treefb07798420f835fd0cd092e224aa76621ea55b1b
parentb65f365474e6e861275cdab493fd1ad62b98933b (diff)
downloadgem5-10371be698b411bc068137bf2add0c5a74ec60eb.tar.xz
Fix serialization of txPacket (need to properly calculate the length before serialization)
--HG-- extra : convert_revision : e93321495d19afb86949daf2c14102ffb6bcef41
-rw-r--r--dev/ns_gige.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc
index aa47436f7..e799c10d2 100644
--- a/dev/ns_gige.cc
+++ b/dev/ns_gige.cc
@@ -2352,6 +2352,7 @@ NSGigE::serialize(ostream &os)
bool txPacketExists = txPacket;
SERIALIZE_SCALAR(txPacketExists);
if (txPacketExists) {
+ txPacket->length = txPacketBufPtr - txPacket->data;
txPacket->serialize("txPacket", os);
uint32_t txPktBufPtr = (uint32_t) (txPacketBufPtr - txPacket->data);
SERIALIZE_SCALAR(txPktBufPtr);