mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17: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 */
|
||||
Reference in New Issue
Block a user