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.
This commit is contained in:
parent
e9d0f6db88
commit
c7bf0e9cdd
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue