From 6511969c3b16627095190912b4f76f8946e92404 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Thu, 15 Oct 2020 05:42:47 -0400 Subject: [PATCH] event: remove subsystem legacy config print This patch removes callback function for subsystems to present their options for legacy config. Signed-off-by: Tomasz Zawadzki Change-Id: I63076fc03eff45da5d57fab03501602922a20e3e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4749 Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu Tested-by: SPDK CI Jenkins --- CHANGELOG.md | 4 ++++ include/spdk_internal/event.h | 2 -- lib/event/Makefile | 2 +- lib/event/app.c | 1 - lib/event/spdk_event.map | 1 - lib/event/subsystem.c | 12 ------------ module/event/subsystems/nbd/nbd.c | 1 - module/event/subsystems/net/net.c | 1 - module/event/subsystems/scsi/scsi.c | 1 - module/event/subsystems/vhost/vhost.c | 1 - module/event/subsystems/vmd/vmd.c | 1 - test/unit/lib/event/subsystem.c/subsystem_ut.c | 1 - 12 files changed, 5 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9b681c0..2c6aaaa41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ Removed `spdk_bdev_config_text` function for bdev modules to report legacy confi A new `spdk_bdev_create_bs_dev_ext` function has been added and `spdk_bdev_create_bs_dev_from_desc` function has been deprecated. +### event + +Removed `spdk_subsystem_config` callback for submodules as part of legacy config removal. + ### dpdk Updated DPDK submodule to DPDK 20.08. diff --git a/include/spdk_internal/event.h b/include/spdk_internal/event.h index 2d88d08ba..d48e47a6b 100644 --- a/include/spdk_internal/event.h +++ b/include/spdk_internal/event.h @@ -118,7 +118,6 @@ struct spdk_subsystem { /* User must call spdk_subsystem_init_next() when they are done with their initialization. */ void (*init)(void); void (*fini)(void); - void (*config)(FILE *fp); /** * Write JSON configuration handler. @@ -151,7 +150,6 @@ void spdk_subsystem_init(spdk_subsystem_init_fn cb_fn, void *cb_arg); void spdk_subsystem_fini(spdk_msg_fn cb_fn, void *cb_arg); void spdk_subsystem_init_next(int rc); void spdk_subsystem_fini_next(void); -void spdk_subsystem_config(FILE *fp); void spdk_app_json_config_load(const char *json_config_file, const char *rpc_addr, spdk_subsystem_init_fn cb_fn, void *cb_arg, bool stop_on_error); diff --git a/lib/event/Makefile b/lib/event/Makefile index ccdfc5adc..3cdf6e149 100644 --- a/lib/event/Makefile +++ b/lib/event/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -SO_VER := 5 +SO_VER := 6 SO_MINOR := 0 LIBNAME = event diff --git a/lib/event/app.c b/lib/event/app.c index 7dc45aa46..5317f65ee 100644 --- a/lib/event/app.c +++ b/lib/event/app.c @@ -209,7 +209,6 @@ spdk_app_get_running_config(char **config_str, char *name) setvbuf(fp, vbuf, _IOFBF, BUFSIZ); app_config_dump_global_section(fp); - spdk_subsystem_config(fp); length = ftell(fp); diff --git a/lib/event/spdk_event.map b/lib/event/spdk_event.map index 8208c5e1f..4b1cc0771 100644 --- a/lib/event/spdk_event.map +++ b/lib/event/spdk_event.map @@ -36,7 +36,6 @@ spdk_subsystem_fini; spdk_subsystem_init_next; spdk_subsystem_fini_next; - spdk_subsystem_config; spdk_app_json_config_load; spdk_subsystem_config_json; spdk_rpc_initialize; diff --git a/lib/event/subsystem.c b/lib/event/subsystem.c index 2cff890b2..a4f7092ea 100644 --- a/lib/event/subsystem.c +++ b/lib/event/subsystem.c @@ -265,18 +265,6 @@ spdk_subsystem_fini(spdk_msg_fn cb_fn, void *cb_arg) spdk_subsystem_fini_next(); } -void -spdk_subsystem_config(FILE *fp) -{ - struct spdk_subsystem *subsystem; - - TAILQ_FOREACH(subsystem, &g_subsystems, tailq) { - if (subsystem->config) { - subsystem->config(fp); - } - } -} - void spdk_subsystem_config_json(struct spdk_json_write_ctx *w, struct spdk_subsystem *subsystem) { diff --git a/module/event/subsystems/nbd/nbd.c b/module/event/subsystems/nbd/nbd.c index dc1c3cfa3..1730fd448 100644 --- a/module/event/subsystems/nbd/nbd.c +++ b/module/event/subsystems/nbd/nbd.c @@ -64,7 +64,6 @@ static struct spdk_subsystem g_spdk_subsystem_nbd = { .name = "nbd", .init = nbd_subsystem_init, .fini = nbd_subsystem_fini, - .config = NULL, .write_config_json = nbd_subsystem_write_config_json, }; diff --git a/module/event/subsystems/net/net.c b/module/event/subsystems/net/net.c index 031341cec..60aca98dc 100644 --- a/module/event/subsystems/net/net.c +++ b/module/event/subsystems/net/net.c @@ -58,7 +58,6 @@ static struct spdk_subsystem g_spdk_subsystem_interface = { .name = "interface", .init = interface_subsystem_init, .fini = interface_subsystem_destroy, - .config = NULL, }; SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_interface); diff --git a/module/event/subsystems/scsi/scsi.c b/module/event/subsystems/scsi/scsi.c index f63dc783b..f068b0da6 100644 --- a/module/event/subsystems/scsi/scsi.c +++ b/module/event/subsystems/scsi/scsi.c @@ -58,7 +58,6 @@ static struct spdk_subsystem g_spdk_subsystem_scsi = { .name = "scsi", .init = scsi_subsystem_init, .fini = scsi_subsystem_fini, - .config = NULL, }; SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_scsi); diff --git a/module/event/subsystems/vhost/vhost.c b/module/event/subsystems/vhost/vhost.c index a0c386d98..b348cca5d 100644 --- a/module/event/subsystems/vhost/vhost.c +++ b/module/event/subsystems/vhost/vhost.c @@ -65,7 +65,6 @@ static struct spdk_subsystem g_spdk_subsystem_vhost = { .name = "vhost", .init = vhost_subsystem_init, .fini = vhost_subsystem_fini, - .config = NULL, .write_config_json = spdk_vhost_config_json, }; diff --git a/module/event/subsystems/vmd/vmd.c b/module/event/subsystems/vmd/vmd.c index e7d792d79..2d496994c 100644 --- a/module/event/subsystems/vmd/vmd.c +++ b/module/event/subsystems/vmd/vmd.c @@ -107,7 +107,6 @@ vmd_write_config_json(struct spdk_json_write_ctx *w) static struct spdk_subsystem g_spdk_subsystem_vmd = { .name = "vmd", .fini = vmd_subsystem_fini, - .config = NULL, .write_config_json = vmd_write_config_json, }; diff --git a/test/unit/lib/event/subsystem.c/subsystem_ut.c b/test/unit/lib/event/subsystem.c/subsystem_ut.c index deeb2f3aa..608f2e4b1 100644 --- a/test/unit/lib/event/subsystem.c/subsystem_ut.c +++ b/test/unit/lib/event/subsystem.c/subsystem_ut.c @@ -54,7 +54,6 @@ set_up_subsystem(struct spdk_subsystem *subsystem, const char *name) { subsystem->init = NULL; subsystem->fini = NULL; - subsystem->config = NULL; subsystem->name = name; }