summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMohammad Alian <m.alian1369@gmail.com>2016-07-19 09:48:56 -0500
committerMohammad Alian <m.alian1369@gmail.com>2016-07-19 09:48:56 -0500
commitc7bf0e9cdd8f22139919efd7d81824c988e4f41a (patch)
tree2c889eba4e2ae8a613f07eed17f7f254add7dc78 /src
parente9d0f6db88832dab64572488533f4f7b5344ce72 (diff)
downloadgem5-c7bf0e9cdd8f22139919efd7d81824c988e4f41a.tar.xz
dev, dist: Fixed a scheduling bug in the etherswitch
This patch fixes a bug in etherswitch. When a packet gets inserted in the output fifo, the txEvent has to always be reschedule, not only when an event is already scheduled. This can raise the assertion in the reschedule function.
Diffstat (limited to 'src')
-rw-r--r--src/dev/net/etherswitch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dev/net/etherswitch.cc b/src/dev/net/etherswitch.cc
index 0564ee594..52d9b11ab 100644
--- a/src/dev/net/etherswitch.cc
+++ b/src/dev/net/etherswitch.cc
@@ -172,7 +172,7 @@ EtherSwitch::Interface::enqueue(EthPacketPtr packet, unsigned senderId)
// to send this packet out the external link
// otherwise, there is already a txEvent scheduled
if (outputFifo.push(packet, senderId)) {
- parent->reschedule(txEvent, curTick() + switchingDelay());
+ parent->reschedule(txEvent, curTick() + switchingDelay(), true);
}
}