diff options
author | Mohammad Alian <m.alian1369@gmail.com> | 2016-07-19 09:48:56 -0500 |
---|---|---|
committer | Mohammad Alian <m.alian1369@gmail.com> | 2016-07-19 09:48:56 -0500 |
commit | c7bf0e9cdd8f22139919efd7d81824c988e4f41a (patch) | |
tree | 2c889eba4e2ae8a613f07eed17f7f254add7dc78 /src | |
parent | e9d0f6db88832dab64572488533f4f7b5344ce72 (diff) | |
download | gem5-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.cc | 2 |
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); } } |