diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 1b83499e9..dce10a478 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -66,7 +66,16 @@ function detect_nics_and_probe_drivers() { shift 2 # Iterate through the remaining arguments. for i; do - modprobe "$i" + if [[ $i == irdma ]]; then + # Our tests don't play well with iWARP protocol. Make sure we use RoCEv2 instead. + if [[ -e /sys/module/irdma/parameters/roce_ena ]]; then + # reload the module to re-init the rdma devices + (($(< /sys/module/irdma/parameters/roce_ena) != 1)) && modprobe -r irdma + fi + modprobe "$i" roce_ena=1 + else + modprobe "$i" + fi done fi }