iPXE - Open Source Boot Firmware

[netdevice] Provide a test mechanism for discarding packets at random
authorMichael Brown <mcb30@ipxe.org>
Tue, 20 Jul 2010 19:52:08 +0000 (20:52 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 20 Jul 2010 19:58:10 +0000 (20:58 +0100)
commit9f2e76ea614a77e8fd314065f2019bb4d5c8fe60
treea0323b6471153a60af39e403559af1816dab49e4
parente4419ff97cdc6cf69c251ef1f768274f0a71c9d0
[netdevice] Provide a test mechanism for discarding packets at random

Setting NETDEV_DISCARD_RATE to a non-zero value will cause one in
every NETDEV_DISCARD_RATE packets to be discarded at random on both
the transmit and receive datapaths, allowing the robustness of
upper-layer network protocols to be tested even in simulation
environments that provide wholly reliable packet transmission.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/config/general.h
src/net/netdevice.c