This patch adds a basic check to ensure that the packet queue does not
grow absurdly large. The queue should only be used to store packets
that were delayed due to blocking from the neighbouring port, and not
for actual storage. Thus, a limit of 100 has been chosen for now
(which is already quite substantial).
// express snoops should never be queued
assert(!pkt->isExpressSnoop());
+ // add a very basic sanity check on the port to ensure the
+ // invisible buffer is not growing beyond reasonable limits
+ if (transmitList.size() > 100) {
+ panic("Packet queue %s has grown beyond 100 packets\n",
+ name());
+ }
+
// nothing on the list, or earlier than current front element,
// schedule an event
if (transmitList.empty() || when < transmitList.front().tick) {