You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The host's event queue is a priority queue of event objects. To have a deterministic event order across simulations, for a given instant in time, shadow will prioritize events originating from certain hosts over others. For packets arriving at a destination host at a given time, packet events will be prioritized by the source host's ID. This means that all packets incoming from host A will be processed and added to the destination host's router before any packets incoming from host B are.
We should try to come up with a better event priority that is more fair, or make sure that the router behaves independently of any bias from the event queue.
A simple way of having a more fair event priority is to prioritize based on hash((src_host_id, event_id)), falling back to ordering by (src_host_id, event_id) directly if there's a collision. But this means that packets originating from a host will no longer be prioritized relative to the order they were sent in. For example TCP and UDP packets arriving at the same time instant would be reordered. This creates additional work for shadow's TCP stack, and reorders UDP packets on localhost which should not happen.
The text was updated successfully, but these errors were encountered:
The host's event queue is a priority queue of event objects. To have a deterministic event order across simulations, for a given instant in time, shadow will prioritize events originating from certain hosts over others. For packets arriving at a destination host at a given time, packet events will be prioritized by the source host's ID. This means that all packets incoming from host A will be processed and added to the destination host's router before any packets incoming from host B are.
shadow/src/main/core/work/event.rs
Lines 84 to 90 in f5e09d5
We should try to come up with a better event priority that is more fair, or make sure that the router behaves independently of any bias from the event queue.
A simple way of having a more fair event priority is to prioritize based on
hash((src_host_id, event_id))
, falling back to ordering by(src_host_id, event_id)
directly if there's a collision. But this means that packets originating from a host will no longer be prioritized relative to the order they were sent in. For example TCP and UDP packets arriving at the same time instant would be reordered. This creates additional work for shadow's TCP stack, and reorders UDP packets on localhost which should not happen.The text was updated successfully, but these errors were encountered: