mirror of
https://github.com/ipxe/ipxe
synced 2026-01-21 01:28:02 +03:00
[neighbour] Add the ability to artificially delay outbound packets
Add a fault-injection mechanism that allows an arbitrary delay (configured via config/fault.h) to be added to any packets transmitted via the neighbour resolution mechanism, as a way of reproducing symptoms that occur only on high-latency connections such as a satellite uplink. The neighbour discovery mechanism is not a natural conceptual fit for this artficial delay, since neighbour discovery has nothing to do with transmit latency. However, the neighbour discovery mechanism happens to already include a deferred transmission queue that can be (ab)used to implement this artifical delay in a minimally intrusive way. In particular, there is zero code size impact on a standard build with no artificial delay configured. Implementing the delay only for packets transmitted via neighbour resolution has the side effect that broadcast packets (such as DHCP and ARP) are unaffected. This is likely in practice to produce a better emulation of a high-latency uplink scenario, where local network traffic such as DHCP and ARP will complete quickly and only the subsequent TCP/UDP traffic will experience delays. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -14,6 +14,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
/* Drop every N transmitted or received network packets */
|
||||
#define NETDEV_DISCARD_RATE 0
|
||||
|
||||
/* Delay transmissions to neighbour-resolved destinations (in ms) */
|
||||
#define NEIGHBOUR_DELAY_MS 0
|
||||
|
||||
/* Drop every N transmitted or received PeerDist discovery packets */
|
||||
#define PEERDISC_DISCARD_RATE 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user