From 940cd3ae378331bad3190ad15eb00467d5df2fe0 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 3 Feb 2021 15:26:23 +0100 Subject: [PATCH] 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 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 Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- test/nvmf/common.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 }