Commit 4bcfef00 authored by Jim Harris's avatar Jim Harris
Browse files

rpc: remove rpc subsystem



RPC is core functionality for SPDK applications and should always
be initialized last (after all subsystems have been initialized).
So make RPC a first class citizen and integrate it with the
app framework directly instead of making it an "optional" subsystem.
Then we initializing it after all subsystems have completed
initialization, and tear it down before tearing down subsystems.

We can also do some other cleanup while here - for example, reactors
are already started when spdk_rpc_initialize() is called, so remove
the extra event that was added during initialization since this is no
longer needed.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I4cc63586a6d55be68786629a2176c61a88979267

Reviewed-on: https://review.gerrithub.io/385914


Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 0441ffcc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ CFLAGS += -I$(SPDK_ROOT_DIR)/lib

C_SRCS := iscsi_tgt.c

SPDK_LIB_LIST = event_bdev event_copy event_iscsi event_net event_rpc event_scsi
SPDK_LIB_LIST = event_bdev event_copy event_iscsi event_net event_scsi
SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev iscsi scsi net copy trace conf
SPDK_LIB_LIST += util log log_rpc event app_rpc

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ CFLAGS += $(ENV_CFLAGS)

C_SRCS := conf.c nvmf_main.c nvmf_tgt.c nvmf_rpc.c

SPDK_LIB_LIST = event_bdev event_copy event_rpc
SPDK_LIB_LIST = event_bdev event_copy
SPDK_LIB_LIST += nvmf event log trace conf util bdev copy rpc jsonrpc json
SPDK_LIB_LIST += app_rpc log_rpc bdev_rpc

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ CFLAGS += $(ENV_CFLAGS)

C_SRCS := vhost.c

SPDK_LIB_LIST = event_bdev event_copy event_net event_rpc event_scsi event_vhost
SPDK_LIB_LIST = event_bdev event_copy event_net event_scsi event_vhost
SPDK_LIB_LIST += jsonrpc json rpc bdev_rpc bdev scsi net copy trace conf
SPDK_LIB_LIST += util log log_rpc event app_rpc
SPDK_LIB_LIST += vhost rte_vhost
+4 −0
Original line number Diff line number Diff line
@@ -76,6 +76,10 @@ void spdk_subsystem_init_next(int rc);
void spdk_subsystem_fini_next(void);
void spdk_subsystem_config(FILE *fp);

void spdk_rpc_initialize(void);
void spdk_rpc_finish(void);
void spdk_rpc_config_text(FILE *fp);

/**
 * \brief Register a new subsystem
 */
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

CFLAGS += $(ENV_CFLAGS)
LIBNAME = event
C_SRCS = app.c reactor.c subsystem.c
C_SRCS = app.c reactor.c rpc.c subsystem.c

DIRS-y = rpc subsystems

Loading