diff --git a/test/nvmf/common.sh b/test/nvmf/common.sh index 69405be9b..e30b8bd63 100755 --- a/test/nvmf/common.sh +++ b/test/nvmf/common.sh @@ -3,6 +3,7 @@ NVMF_PORT=4420 NVMF_IP_PREFIX="192.168.100" NVMF_IP_LEAST_ADDR=8 +NVMF_TCP_IP_ADDRESS="127.0.0.1" if [ -z "$NVMF_APP" ]; then NVMF_APP=./app/nvmf_tgt/nvmf_tgt diff --git a/test/nvmf/host/perf.sh b/test/nvmf/host/perf.sh index d12d7088d..881b784ae 100755 --- a/test/nvmf/host/perf.sh +++ b/test/nvmf/host/perf.sh @@ -14,9 +14,11 @@ set -e RDMA_IP_LIST=$(get_available_rdma_ips) NVMF_FIRST_TARGET_IP=$(echo "$RDMA_IP_LIST" | head -n 1) +TYPES="TCP" if [ -z $NVMF_FIRST_TARGET_IP ]; then - echo "no NIC for nvmf test" - exit 0 + echo "no RDMA NIC for nvmf test, will only test TCP/IP transport" +else + TYPES=${TYPES}" RDMA" fi timing_enter perf @@ -94,7 +96,15 @@ function test_perf() fi } -test_perf "RDMA" $NVMF_FIRST_TARGET_IP +for type in $TYPES; do + if [ $type == "TCP" ]; then + nvmf_tgt_ip=$NVMF_TCP_IP_ADDRESS + else + nvmf_tgt_ip=$NVMF_FIRST_TARGET_IP + fi + + test_perf $type $nvmf_tgt_ip +done trap - SIGINT SIGTERM EXIT