From c1ce8db0df7fe5a28c5c0256dde320835e599de6 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Tue, 20 Nov 2018 20:27:13 +0800 Subject: [PATCH] nvmf: Add the TCP/IP transport related host test This is the first patch to enable the automated perf test with TCP transport, which is used to guard the correctness of the TCP transport related code. Change-Id: Ic3df3aeae6df2024e22e50be70c7c61e36f85243 Signed-off-by: Ziye Yang Reviewed-on: https://review.gerrithub.io/425699 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Changpeng Liu --- test/nvmf/common.sh | 1 + test/nvmf/host/perf.sh | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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