summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Hubbe <Allen.Hubbe@dell.com>2016-12-27 19:12:28 -0500
committerJon Mason <jdmason@kudzu.us>2017-07-06 11:30:06 -0400
commit7c49c9855a890ce32ea08f01366ecb221a027ad8 (patch)
tree63f9c8c80e42e87310002b42e4756b2b50ec89e3 /tools
parentc2d42edb528af75890cf73658e86e6dc9ac2b22b (diff)
downloadop-kernel-dev-7c49c9855a890ce32ea08f01366ecb221a027ad8.zip
op-kernel-dev-7c49c9855a890ce32ea08f01366ecb221a027ad8.tar.gz
NTB: ntb_test: add parameter for doorbell bitmask
If the test attempts to clear doorbell bits that are invalid for the hardware, then the test will fail. Provide a parameter to specify the doorbell bits to clear. Set default doorbell bits that work for XEON. Signed-off-by: Allen Hubbe <Allen.Hubbe@dell.com> Acked-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/ntb/ntb_test.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/testing/selftests/ntb/ntb_test.sh
index 1ee8ea3..1c12b58 100755
--- a/tools/testing/selftests/ntb/ntb_test.sh
+++ b/tools/testing/selftests/ntb/ntb_test.sh
@@ -18,6 +18,7 @@ LIST_DEVS=FALSE
DEBUGFS=${DEBUGFS-/sys/kernel/debug}
+DB_BITMASK=0x7FFF
PERF_RUN_ORDER=32
MAX_MW_SIZE=0
RUN_DMA_TESTS=
@@ -38,6 +39,7 @@ function show_help()
echo "be highly recommended."
echo
echo "Options:"
+ echo " -b BITMASK doorbell clear bitmask for ntb_tool"
echo " -C don't cleanup ntb modules on exit"
echo " -d run dma tests"
echo " -h show this help message"
@@ -52,8 +54,9 @@ function show_help()
function parse_args()
{
OPTIND=0
- while getopts "Cdhlm:r:p:w:" opt; do
+ while getopts "b:Cdhlm:r:p:w:" opt; do
case "$opt" in
+ b) DB_BITMASK=${OPTARG} ;;
C) DONT_CLEANUP=1 ;;
d) RUN_DMA_TESTS=1 ;;
h) show_help; exit 0 ;;
@@ -158,7 +161,7 @@ function doorbell_test()
echo "Running db tests on: $(basename $LOC) / $(basename $REM)"
- write_file "c 0xFFFFFFFF" "$REM/db"
+ write_file "c $DB_BITMASK" "$REM/db"
for ((i=1; i <= 8; i++)); do
let DB=$(read_file "$REM/db") || true
OpenPOWER on IntegriCloud