nvmf: Include the JSON RPC server

This allows live configuration of the target, much like
the iSCSI target. More function calls will be added
over time.

Also, make the tests wait until the target is listening
on the RPC port to determine that the target is ready.

Change-Id: I8f762e49511d482ef820f6b25a7d3ad9a8bb41f9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Ben Walker 2016-08-17 15:42:21 -07:00
parent 5d21943624
commit f0ab59a325
7 changed files with 10 additions and 4 deletions

View File

@ -59,6 +59,8 @@ SPDK_LIBS = \
$(SPDK_ROOT_DIR)/lib/rpc/libspdk_rpc.a \ $(SPDK_ROOT_DIR)/lib/rpc/libspdk_rpc.a \
$(SPDK_ROOT_DIR)/lib/jsonrpc/libspdk_jsonrpc.a \ $(SPDK_ROOT_DIR)/lib/jsonrpc/libspdk_jsonrpc.a \
$(SPDK_ROOT_DIR)/lib/json/libspdk_json.a \ $(SPDK_ROOT_DIR)/lib/json/libspdk_json.a \
$(SPDK_ROOT_DIR)/lib/event/rpc/libspdk_app_rpc.a \
$(SPDK_ROOT_DIR)/lib/log/rpc/libspdk_log_rpc.a \
LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \ LIBS += $(BLOCKDEV_MODULES_LINKER_ARGS) \
$(COPY_MODULES_LINKER_ARGS) $(COPY_MODULES_LINKER_ARGS)

View File

@ -4,6 +4,7 @@ NVMF_PORT=4420
NVMF_IP_PREFIX="192.168.100" NVMF_IP_PREFIX="192.168.100"
NVMF_IP_LEAST_ADDR=8 NVMF_IP_LEAST_ADDR=8
NVMF_FIRST_TARGET_IP=$NVMF_IP_PREFIX.$NVMF_IP_LEAST_ADDR NVMF_FIRST_TARGET_IP=$NVMF_IP_PREFIX.$NVMF_IP_LEAST_ADDR
RPC_PORT=5260
function load_ib_rdma_modules() function load_ib_rdma_modules()
{ {

View File

@ -25,7 +25,7 @@ nvmfpid=$!
trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
sleep 10 waitforlisten $nvmfpid ${RPC_PORT}
modprobe -v nvme-rdma modprobe -v nvme-rdma

View File

@ -20,7 +20,7 @@ nvmfpid=$!
trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
sleep 5 waitforlisten $nvmfpid ${RPC_PORT}
modprobe -v nvme-rdma modprobe -v nvme-rdma

View File

@ -20,7 +20,7 @@ nvmfpid=$!
trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
sleep 10 waitforlisten $nvmfpid ${RPC_PORT}
modprobe -v nvme-rdma modprobe -v nvme-rdma

View File

@ -19,7 +19,7 @@ nvmfpid=$!
trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT trap "killprocess $nvmfpid; exit 1" SIGINT SIGTERM EXIT
sleep 5 waitforlisten $nvmfpid ${RPC_PORT}
modprobe -v nvme-rdma modprobe -v nvme-rdma

View File

@ -2,6 +2,9 @@
Comment "Global section" Comment "Global section"
LogFacility "local7" LogFacility "local7"
[Rpc]
Enable Yes
[Nvmf] [Nvmf]
MaxQueuesPerSession 4 MaxQueuesPerSession 4