test/nvmf: use NVMF_PORT consistently
A lot of places were still hardcoding 4420 directly. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Iff8a549addeb05e441fe3b035a84a0f8a6bf2205 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456666 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
61b44c9fcd
commit
cddfe002e1
@ -16,8 +16,6 @@ iscsitestinit $1 $2
|
||||
rpc_py="$rootdir/scripts/rpc.py"
|
||||
fio_py="$rootdir/scripts/fio.py"
|
||||
|
||||
NVMF_PORT=4420
|
||||
|
||||
# Namespaces are NOT used here on purpose. Rxe_cfg utilility used for NVMf tests do not support namespaces.
|
||||
TARGET_IP=127.0.0.1
|
||||
INITIATOR_IP=127.0.0.1
|
||||
@ -71,7 +69,7 @@ $rpc_py nvmf_create_transport -t RDMA -u 8192
|
||||
echo "NVMf target has started."
|
||||
bdevs=$($rpc_py construct_malloc_bdev 64 512)
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
for bdev in $bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
done
|
||||
|
@ -29,10 +29,10 @@ timing_exit start_nvmf_tgt
|
||||
$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
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
echo "[Nvme]" > $testdir/bdevperf.conf
|
||||
echo " TransportID \"trtype:RDMA adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420\" Nvme0" >> $testdir/bdevperf.conf
|
||||
echo " TransportID \"trtype:RDMA adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT\" Nvme0" >> $testdir/bdevperf.conf
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -c $testdir/bdevperf.conf -q 128 -o 4096 -w verify -t 1
|
||||
sync
|
||||
rm -rf $testdir/bdevperf.conf
|
||||
|
@ -32,17 +32,17 @@ timing_exit start_nvmf_tgt
|
||||
$rpc_py construct_malloc_bdev 64 512 -b Malloc1
|
||||
$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 Malloc1
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
|
||||
|
||||
# Test fio_plugin as host with malloc backend
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=$NVMF_PORT ns=1"
|
||||
|
||||
# second test mocking multiple SGL elements
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/mock_sgl_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=$NVMF_PORT ns=1"
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
|
||||
if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
@ -54,9 +54,9 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
$rpc_py construct_lvol_bdev -l lvs_0 lbd_0 $free_mb
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode2 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode2 lvs_0/lbd_0
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode2 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode2 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=$NVMF_PORT ns=1"
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2
|
||||
|
||||
# Test fio_plugin as host with nvme lvol nested backend
|
||||
@ -65,9 +65,9 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
$rpc_py construct_lvol_bdev -l lvs_n_0 lbd_nest_0 $free_mb
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode3 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode3 lvs_n_0/lbd_nest_0
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode3 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode3 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1"
|
||||
traddr=$NVMF_FIRST_TARGET_IP trsvcid=$NVMF_PORT ns=1"
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode3
|
||||
|
||||
sync
|
||||
|
@ -32,7 +32,7 @@ $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK0000000000000
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 \
|
||||
--nguid "ABCDEF0123456789ABCDEF0123456789" \
|
||||
--eui64 "ABCDEF0123456789"
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
$rpc_py get_nvmf_subsystems
|
||||
|
||||
|
@ -49,14 +49,14 @@ function test_perf()
|
||||
for bdev in $bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
done
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TYPE -a $NVMF_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TYPE -a $NVMF_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
# Test multi-process access to local NVMe device
|
||||
if [ -n "$local_nvme_trid" ]; then
|
||||
$rootdir/examples/nvme/perf/perf -i $NVMF_APP_SHM_ID -q 32 -o 4096 -w randrw -M 50 -t 1 -r "$local_nvme_trid"
|
||||
fi
|
||||
|
||||
$rootdir/examples/nvme/perf/perf -q 32 -o 4096 -w randrw -M 50 -t 1 -r "trtype:$TYPE adrfam:IPv4 traddr:$NVMF_TARGET_IP trsvcid:4420"
|
||||
$rootdir/examples/nvme/perf/perf -q 32 -o 4096 -w randrw -M 50 -t 1 -r "trtype:$TYPE adrfam:IPv4 traddr:$NVMF_TARGET_IP trsvcid:$NVMF_PORT"
|
||||
sync
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
|
||||
@ -75,13 +75,13 @@ function test_perf()
|
||||
for bdev in $lb_nested_guid; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
done
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TYPE -a $NVMF_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TYPE -a $NVMF_TARGET_IP -s $NVMF_PORT
|
||||
# Test perf as host with different io_size and qd_depth in nightly
|
||||
qd_depth=("1" "128")
|
||||
io_size=("512" "131072")
|
||||
for qd in ${qd_depth[@]}; do
|
||||
for o in ${io_size[@]}; do
|
||||
$rootdir/examples/nvme/perf/perf -q $qd -o $o -w randrw -M 50 -t 10 -r "trtype:$TYPE adrfam:IPv4 traddr:$NVMF_TARGET_IP trsvcid:4420"
|
||||
$rootdir/examples/nvme/perf/perf -q $qd -o $o -w randrw -M 50 -t 10 -r "trtype:$TYPE adrfam:IPv4 traddr:$NVMF_TARGET_IP trsvcid:$NVMF_PORT"
|
||||
done
|
||||
done
|
||||
|
||||
|
@ -24,10 +24,10 @@ $rpc_py nvmf_create_transport -t rdma -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
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
echo "[Nvme]" > $testdir/bdevperf.conf
|
||||
echo " TransportID \"trtype:rdma adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420\" Nvme0" >> $testdir/bdevperf.conf
|
||||
echo " TransportID \"trtype:rdma adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT\" Nvme0" >> $testdir/bdevperf.conf
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -m 0x10 -i 1 -c $testdir/bdevperf.conf -q 128 -o 4096 -w write -t 1 &
|
||||
WRITE_PID=$!
|
||||
$rootdir/test/bdev/bdevperf/bdevperf -m 0x20 -i 2 -c $testdir/bdevperf.conf -q 128 -o 4096 -w read -t 1 &
|
||||
|
@ -20,10 +20,10 @@ $rpc_py nvmf_create_transport -t rdma -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
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
echo "[Nvme]" > $testdir/bdevperf.conf
|
||||
echo " TransportID \"trtype:rdma adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420\" Nvme0" >> $testdir/bdevperf.conf
|
||||
echo " TransportID \"trtype:rdma adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT\" Nvme0" >> $testdir/bdevperf.conf
|
||||
|
||||
$rootdir/test/bdev/bdevio/bdevio -c $testdir/bdevperf.conf
|
||||
|
||||
|
@ -24,7 +24,7 @@ bdev="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
||||
$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 $bdev
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
num_iterations=200
|
||||
@ -34,7 +34,7 @@ fi
|
||||
|
||||
set +x
|
||||
for i in $(seq 1 $num_iterations); do
|
||||
nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "4420"
|
||||
nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
|
||||
waitforblk "nvme0n1"
|
||||
nvme disconnect -n "nqn.2016-06.io.spdk:cnode1"
|
||||
waitforblk_disconnect "nvme0n1"
|
||||
|
@ -31,7 +31,7 @@ $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK0000000000000
|
||||
for null_bdev in $null_bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $null_bdev
|
||||
done
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
nvme discover -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -30,7 +30,7 @@ $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK0000000000000
|
||||
for null_bdev in $null_bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $null_bdev
|
||||
done
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
nvme discover -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -24,7 +24,7 @@ for incapsule in 0 4096; do
|
||||
$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
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT"
|
||||
|
||||
|
@ -29,7 +29,7 @@ $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK0000000000000
|
||||
for malloc_bdev in $malloc_bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 "$malloc_bdev"
|
||||
done
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
# Append the raid0 bdev into subsystem
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 raid0
|
||||
|
@ -29,7 +29,7 @@ for i in $(seq 0 5); do
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK00000000000001
|
||||
$rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode${i}" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" -i 16
|
||||
waitforblk "nvme${i}n1"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user