From cd4b26b6ae984a75e16f4d71152d99b6c063d366 Mon Sep 17 00:00:00 2001 From: Michael LeBeane Date: Tue, 29 Nov 2016 13:04:45 -0500 Subject: dev: Fix buffer length when unserializing an eth pkt Changeset 11701 only serialized the useful portion of of an ethernet packets' payload. However, the device models expect each ethernet packet to contain a 16KB buffer, even if there is no data in it. This patch adds a 'bufLength' field to EthPacketData so the original size of the packet buffer can always be unserialized. Reported-by: Gabor Dozsa --- src/dev/net/i8254xGBe.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dev/net/i8254xGBe.cc') diff --git a/src/dev/net/i8254xGBe.cc b/src/dev/net/i8254xGBe.cc index 11f017a21..baca0138f 100644 --- a/src/dev/net/i8254xGBe.cc +++ b/src/dev/net/i8254xGBe.cc @@ -2522,7 +2522,7 @@ IGbE::unserialize(CheckpointIn &cp) bool txPktExists; UNSERIALIZE_SCALAR(txPktExists); if (txPktExists) { - txPacket = std::make_shared(); + txPacket = std::make_shared(16384); txPacket->unserialize("txpacket", cp); } -- cgit v1.2.3