From c7bf0e9cdd8f22139919efd7d81824c988e4f41a Mon Sep 17 00:00:00 2001 From: Mohammad Alian Date: Tue, 19 Jul 2016 09:48:56 -0500 Subject: 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. --- src/dev/net/etherswitch.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dev/net') 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); } } -- cgit v1.2.3