mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 13:30:57 +03:00
[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:
19
src/config/fault.h
Normal file
19
src/config/fault.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef CONFIG_FAULT_H
|
||||
#define CONFIG_FAULT_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Fault injection
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <config/defaults.h>
|
||||
|
||||
/* Drop every N transmitted or received network packets */
|
||||
#define NETDEV_DISCARD_RATE 0
|
||||
|
||||
#include <config/local/fault.h>
|
||||
|
||||
#endif /* CONFIG_FAULT_H */
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user