On Thu, Mar 02, 2017 at 10:26:17AM -0800, Dennis Dalessandro wrote: > From: Don Hiatt <don.hiatt@xxxxxxxxx> > > Add fault injection capability: > - Drop packets unconditionally (fault_by_packet) > - Drop packets based on opcode (fault_by_opcode) > > This feature reacts to the global FAULT_INJECTION > config flag. > > The faulting traces have been added: > - misc/fault_opcode > - misc/fault_packet > > See 'Documentation/fault-injection/fault-injection.txt' > for details. > > Examples: > - Dropping packets by opcode: > /sys/kernel/debug/hfi1/hfi1_X/fault_opcode > # Enable fault > echo Y > fault_by_opcode > # Setprobability of dropping (0-100%) > # echo 25 > probability > # Set opcode > echo 0x64 > opcode > # Number of times to fault > echo 3 > times > # An optional mask allows you to fault > # a range of opcodes > echo 0xf0 > mask > /sys/kernel/debug/hfi1/hfi1_X/fault_stats > contains a value in parentheses to indicate > number of each opcode dropped. > > - Dropping packets unconditionally > /sys/kernel/debug/hfi1/hfi1_X/fault_packet > # Enable fault > echo Y > fault_by_packet > /sys/kernel/debug/hfi1/hfi1_X/fault_packet/fault_stats > contains the number of packets dropped. It will be so nice to have this functionality extended to objects and placed in IB/core. For example, VNIC and IPoIB will be able to use faults by packet, while all other drivers and ULPs will use faults by objects. Does it make sense? Thanks
Attachment:
signature.asc
Description: PGP signature