OpenCloudOS-Kernel/drivers/infiniband/hw
Don Hiatt 0181ce31b2 IB/hfi1: Add receive fault injection feature
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.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Don Hiatt <don.hiatt@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-04-05 14:45:09 -04:00
..
bnxt_re This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
cxgb3 sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
cxgb4 sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
hfi1 IB/hfi1: Add receive fault injection feature 2017-04-05 14:45:09 -04:00
hns IB/hns: Explicitly include linux/of.h 2017-04-05 13:45:53 -04:00
i40iw This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
mlx4 sched/headers: Prepare to move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:40 +01:00
mlx5 sched/headers: Prepare to move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:40 +01:00
mthca This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
nes This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
ocrdma This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
qedr This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
qib IB/rdmavt, IB/hfi1, IB/qib: Make wc opcode translation driver dependent 2017-04-05 14:45:09 -04:00
usnic sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
vmw_pvrdma This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00