Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Allen Hubbe and committed by
Jon Mason
7c49c985 c2d42edb

+5 -2
+5 -2
tools/testing/selftests/ntb/ntb_test.sh
··· 18 18 19 19 DEBUGFS=${DEBUGFS-/sys/kernel/debug} 20 20 21 + DB_BITMASK=0x7FFF 21 22 PERF_RUN_ORDER=32 22 23 MAX_MW_SIZE=0 23 24 RUN_DMA_TESTS= ··· 39 38 echo "be highly recommended." 40 39 echo 41 40 echo "Options:" 41 + echo " -b BITMASK doorbell clear bitmask for ntb_tool" 42 42 echo " -C don't cleanup ntb modules on exit" 43 43 echo " -d run dma tests" 44 44 echo " -h show this help message" ··· 54 52 function parse_args() 55 53 { 56 54 OPTIND=0 57 - while getopts "Cdhlm:r:p:w:" opt; do 55 + while getopts "b:Cdhlm:r:p:w:" opt; do 58 56 case "$opt" in 57 + b) DB_BITMASK=${OPTARG} ;; 59 58 C) DONT_CLEANUP=1 ;; 60 59 d) RUN_DMA_TESTS=1 ;; 61 60 h) show_help; exit 0 ;; ··· 161 158 162 159 echo "Running db tests on: $(basename $LOC) / $(basename $REM)" 163 160 164 - write_file "c 0xFFFFFFFF" "$REM/db" 161 + write_file "c $DB_BITMASK" "$REM/db" 165 162 166 163 for ((i=1; i <= 8; i++)); do 167 164 let DB=$(read_file "$REM/db") || true