test/nvmf: add NVMF_TRANSPORT_OPTS global
For a lot of the tests, we may want to specify different options for each transport. I believe this will be more prevalent as we add more transport specific options. Change-Id: I83a915629460d1d869eaba4bc86822d7563402ac Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461740 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
1d717c7cd9
commit
015ef22a8a
@ -2,6 +2,7 @@ NVMF_PORT=4420
|
||||
NVMF_IP_PREFIX="192.168.100"
|
||||
NVMF_IP_LEAST_ADDR=8
|
||||
NVMF_TCP_IP_ADDRESS="127.0.0.1"
|
||||
NVMF_TRANSPORT_OPTS=""
|
||||
|
||||
: ${NVMF_APP_SHM_ID="0"}; export NVMF_APP_SHM_ID
|
||||
: ${NVMF_APP="./app/nvmf_tgt/nvmf_tgt -i $NVMF_APP_SHM_ID -e 0xFFFF"}; export NVMF_APP
|
||||
@ -169,6 +170,8 @@ function nvmftestinit()
|
||||
rdma_device_init
|
||||
fi
|
||||
fi
|
||||
|
||||
NVMF_TRANSPORT_OPTS="-t $TEST_TRANSPORT"
|
||||
if [ "$TEST_TRANSPORT" == "rdma" ]; then
|
||||
RDMA_IP_LIST=$(get_available_rdma_ips)
|
||||
NVMF_FIRST_TARGET_IP=$(echo "$RDMA_IP_LIST" | head -n 1)
|
||||
|
@ -11,7 +11,7 @@ timing_enter aer
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py construct_malloc_bdev 64 512 --name Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -m 2
|
||||
|
@ -21,7 +21,7 @@ nvmfpid=$!
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
timing_exit start_nvmf_tgt
|
||||
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
|
@ -24,7 +24,7 @@ nvmfpid=$!
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
timing_exit start_nvmf_tgt
|
||||
|
||||
$rpc_py construct_malloc_bdev 64 512 -b Malloc1
|
||||
|
@ -21,7 +21,7 @@ nvmfpid=$!
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
timing_exit start_nvmf_tgt
|
||||
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
|
@ -24,7 +24,7 @@ if [ -n "$local_nvme_trid" ]; then
|
||||
bdevs="$bdevs Nvme0n1"
|
||||
fi
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
for bdev in $bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
|
@ -17,7 +17,7 @@ nvmfappstart "-m 0xF --wait-for-rpc"
|
||||
# Minimal number of bdev io pool (5) and cache (1)
|
||||
$rpc_py set_bdev_options -p 5 -c 1
|
||||
$rpc_py start_subsystem_init
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
|
@ -14,7 +14,7 @@ timing_enter bdevio
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0
|
||||
|
@ -16,7 +16,7 @@ timing_enter connect_disconnect
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192 -c 0
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -c 0
|
||||
|
||||
bdev="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
||||
|
@ -20,7 +20,7 @@ nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
# Use nvmf_create_transport call to create transport
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
null_bdevs="$($rpc_py construct_null_bdev Null0 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE) "
|
||||
null_bdevs+="$($rpc_py construct_null_bdev Null1 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE)"
|
||||
|
@ -19,7 +19,7 @@ timing_enter discovery
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
null_bdevs="$($rpc_py construct_null_bdev Null0 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE) "
|
||||
null_bdevs+="$($rpc_py construct_null_bdev Null1 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE)"
|
||||
|
@ -17,7 +17,7 @@ nvmftestinit
|
||||
for incapsule in 0 4096; do
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192 -c $incapsule
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -c $incapsule
|
||||
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc1
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
|
@ -14,7 +14,7 @@ timing_enter fio
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
malloc_bdevs="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE) "
|
||||
malloc_bdevs+="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
@ -17,7 +17,7 @@ nvmfpid=$!
|
||||
trap "process_shm --id $NVMF_APP_SHM_ID; rm -f $testdir/nvmf_fuzz.conf; killprocess $nvmfpid; nvmftestfini $1; exit 1" SIGINT SIGTERM EXIT
|
||||
|
||||
waitforlisten $nvmfpid
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py construct_malloc_bdev -b Malloc0 64 512
|
||||
|
||||
|
@ -24,7 +24,7 @@ if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then
|
||||
NVMF_SUBSYS=1
|
||||
fi
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
for i in $(seq 1 $NVMF_SUBSYS)
|
||||
do
|
||||
|
@ -16,7 +16,7 @@ nvmfappstart "-m 0xF"
|
||||
|
||||
NVMF_SECOND_TARGET_IP=$(echo "$RDMA_IP_LIST" | sed -n 2p)
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
# Create subsystems
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
|
@ -21,7 +21,7 @@ timing_enter nvme_cli
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc1
|
||||
|
@ -24,7 +24,7 @@ if check_ip_is_soft_roce $NVMF_FIRST_TARGET_IP; then
|
||||
SUBSYS_NR=1
|
||||
fi
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
# Construct a RAID volume for the logical volume store
|
||||
base_bdevs="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE) "
|
||||
|
@ -42,7 +42,7 @@ trap "process_shm --id $NVMF_APP_SHM_ID; killprocess $vhostpid nvmftestfini; exi
|
||||
# Configure NVMF tgt on host machine
|
||||
malloc_bdev="$($NVMF_RPC construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
||||
$NVMF_RPC nvmf_create_transport -t $TEST_TRANSPORT -u 8192 -p 4
|
||||
$NVMF_RPC nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -p 4
|
||||
$NVMF_RPC nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$NVMF_RPC nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 "$malloc_bdev"
|
||||
$NVMF_RPC nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
@ -11,7 +11,7 @@ timing_enter rpc
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
# set times for subsystem construct/delete
|
||||
if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
|
@ -38,7 +38,7 @@ timing_enter shutdown
|
||||
nvmftestinit
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
num_subsystems=10
|
||||
# SoftRoce does not have enough queues available for
|
||||
|
@ -21,7 +21,7 @@ fi
|
||||
nvmfappstart "-m 0xF"
|
||||
|
||||
# create the rdma transport with an intentionally small SRQ depth
|
||||
$rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192 -s 1024
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -s 1024
|
||||
|
||||
for i in $(seq 0 5); do
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK00000000000001
|
||||
|
Loading…
Reference in New Issue
Block a user