From 31d2240873c7999b6e4a85cf968e9e1b0c105a0f Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 30 Jul 2020 05:00:16 -0400 Subject: [PATCH] test/nvmf: only check for rxe when testing RDMA Using Soft-RoCE is only relevant when testing RDMA transport. For all other cases, we might treat the IP address as non-rxe. This simplifies the checks a little bit in couple places. Signed-off-by: Tomasz Zawadzki Change-Id: I996afb364070fbe107bbe97207952f99e4089308 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3596 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris --- test/nvmf/common.sh | 3 +++ test/nvmf/host/bdevperf.sh | 2 +- test/nvmf/host/target_disconnect.sh | 2 +- test/nvmf/target/shutdown.sh | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 5f52ef127..706e4d797 100644 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -217,6 +217,9 @@ function revert_soft_roce() { } function check_ip_is_soft_roce() { + if [ "$TEST_TRANSPORT" != "rdma" ]; then + return 0 + fi rxe_cfg status rxe | grep -wq "$1" } diff --git a/test/nvmf/host/bdevperf.sh b/test/nvmf/host/bdevperf.sh index 776550c4d..2883144e6 100755 --- a/test/nvmf/host/bdevperf.sh +++ b/test/nvmf/host/bdevperf.sh @@ -23,7 +23,7 @@ function tgt_init() { nvmftestinit # There is an intermittent error relating to this test and Soft-RoCE. for now, just # skip this test if we are using rxe. TODO: get to the bottom of GitHub issue #1165 -if [ $TEST_TRANSPORT == "rdma" ] && check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then +if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then echo "Using software RDMA, skipping the host bdevperf tests." exit 0 fi diff --git a/test/nvmf/host/target_disconnect.sh b/test/nvmf/host/target_disconnect.sh index 82521196b..5fe3b2c6a 100755 --- a/test/nvmf/host/target_disconnect.sh +++ b/test/nvmf/host/target_disconnect.sh @@ -75,7 +75,7 @@ function nvmf_target_disconnect_tc3() { nvmftestinit # There is an intermittent error relating to this test and Soft-RoCE. for now, just # skip this test if we are using rxe. TODO: get to the bottom of GitHub issue #1043 -if [ $TEST_TRANSPORT == "rdma" ] && check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then +if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then echo "Using software RDMA, skipping the target disconnect tests." else run_test "nvmf_target_disconnect_tc1" nvmf_target_disconnect_tc1 diff --git a/test/nvmf/target/shutdown.sh b/test/nvmf/target/shutdown.sh index 585756cfc..662c53b80 100755 --- a/test/nvmf/target/shutdown.sh +++ b/test/nvmf/target/shutdown.sh @@ -149,7 +149,7 @@ function nvmf_shutdown_tc3() { # The shutdown tests create a lot of edge cases that Soft-RoCE doesn't respond well to. # Specifically Soft-RoCE will return invalid values in the WC field after a qp has been # destroyed which lead to NULL pointer references not seen in real hardware. -if [ $TEST_TRANSPORT == "rdma" ] && check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then +if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then echo "Using software RDMA, skipping the shutdown tests." exit 0 fi