From: Ron Dreslinski Date: Wed, 19 Jan 2005 21:26:19 +0000 (-0500) Subject: Fix serialization of txPacket (need to properly calculate the length before serializa... X-Git-Tag: m5_1.0_tutorial~100^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10371be698b411bc068137bf2add0c5a74ec60eb;p=gem5.git Fix serialization of txPacket (need to properly calculate the length before serialization) --HG-- extra : convert_revision : e93321495d19afb86949daf2c14102ffb6bcef41 --- 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);