[fault] Generalise NETDEV_DISCARD_RATE fault injection mechanism

Provide a generic inject_fault() function that can be used to inject
random faults with configurable probabilities.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-07-22 02:56:49 +01:00
parent 9546b0c17b
commit d0325b1da6
6 changed files with 110 additions and 8 deletions

View File

@@ -156,7 +156,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*
*/
#define NETDEV_DISCARD_RATE 0 /* Drop every N packets (0=>no drop) */
#undef BUILD_SERIAL /* Include an automatic build serial
* number. Add "bs" to the list of
* make targets. For example: