test/nvmf: Make sure RoCEv2 protocol is used by irdma platform

This is done in order to avoid hitting issues similar to #1747
for which https://review.spdk.io/gerrit/c/spdk/spdk/+/6106 was
submitted.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I95817f63287795f438f1d392cf1fb2894226ce0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6240
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2021-02-03 15:26:23 +01:00 committed by Tomasz Zawadzki
parent 8b4d6736d8
commit 940cd3ae37

View File

@ -66,7 +66,16 @@ function detect_nics_and_probe_drivers() {
shift 2 shift 2
# Iterate through the remaining arguments. # Iterate through the remaining arguments.
for i; do 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 done
fi fi
} }