From 276d519afe2252fe4473489b4a98dc10e664e5ea Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 20 Nov 2017 11:06:09 -0700 Subject: [PATCH] test/iscsi/nvme_remote: use UNIX socket for RPC Switch the iSCSI process in the iSCSI/NVMe-oF test to use a UNIX domain socket for RPC instead of a TCP socket. Change-Id: I130b2871c74b6bd9aa55a63d751c995a579e03bf Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/388287 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris --- test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh | 14 +++++++------- test/iscsi_tgt/nvme_remote/iscsi.conf | 4 ---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh b/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh index 49b0313fa..cd483a9c5 100755 --- a/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh +++ b/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh @@ -43,23 +43,23 @@ if [ $1 -eq 1 ]; then echo " TransportID \"trtype:RDMA adrfam:ipv4 traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420 subnqn:nqn.2016-06.io.spdk:cnode1\" Nvme0" >> $testdir/iscsi.conf.tmp fi # Start the iSCSI target without using stub -$rootdir/app/iscsi_tgt/iscsi_tgt -c $testdir/iscsi.conf.tmp -m 0x1 -p 0 -s 512 & +iscsi_rpc_addr="/var/tmp/spdk-iscsi.sock" +$rootdir/app/iscsi_tgt/iscsi_tgt -r "$iscsi_rpc_addr" -c $testdir/iscsi.conf.tmp -m 0x1 -p 0 -s 512 & iscsipid=$! echo "iSCSI target launched. pid: $iscsipid" trap "killprocess $iscsipid; killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT -# The configuration file for the iSCSI target told it to use port 5261 for RPC -waitforlisten_tcp $iscsipid 5261 +waitforlisten $iscsipid "$iscsi_rpc_addr" echo "iSCSI target has started." timing_exit start_iscsi_tgt echo "Creating an iSCSI target node." -$rpc_py -s 127.0.0.1 -p 5261 add_portal_group 1 $TARGET_IP:$ISCSI_PORT -$rpc_py -s 127.0.0.1 -p 5261 add_initiator_group 1 ALL $INITIATOR_IP/32 +$rpc_py -s "$iscsi_rpc_addr" add_portal_group 1 $TARGET_IP:$ISCSI_PORT +$rpc_py -s "$iscsi_rpc_addr" add_initiator_group 1 ALL $INITIATOR_IP/32 if [ $1 -eq 0 ]; then - $rpc_py -s 127.0.0.1 -p 5261 construct_nvme_bdev -b "Nvme0" -t "rdma" -f "ipv4" -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT -n nqn.2016-06.io.spdk:cnode1 + $rpc_py -s "$iscsi_rpc_addr" construct_nvme_bdev -b "Nvme0" -t "rdma" -f "ipv4" -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT -n nqn.2016-06.io.spdk:cnode1 fi -$rpc_py -s 127.0.0.1 -p 5261 construct_target_node Target1 Target1_alias 'Nvme0n1:0' '1:1' 64 1 0 0 0 +$rpc_py -s "$iscsi_rpc_addr" construct_target_node Target1 Target1_alias 'Nvme0n1:0' '1:1' 64 1 0 0 0 sleep 1 echo "Logging in to iSCSI target." diff --git a/test/iscsi_tgt/nvme_remote/iscsi.conf b/test/iscsi_tgt/nvme_remote/iscsi.conf index 410b16a81..432768819 100644 --- a/test/iscsi_tgt/nvme_remote/iscsi.conf +++ b/test/iscsi_tgt/nvme_remote/iscsi.conf @@ -8,7 +8,3 @@ MaxSessions 16 ImmediateData Yes ErrorRecoveryLevel 0 - -[Rpc] - Enable Yes - Listen 127.0.0.1:5261