From a8de86e9aa8256d6680d51ce88259263f4883b3d Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Tue, 13 Oct 2020 06:42:24 -0400 Subject: [PATCH] lib/accel: remove legacy config support for accel module register Since legacy config is being removed, SPDK_ACCEL_MODULE_REGISTER macro no longer needs field corresponding to processing this type of configuration. Signed-off-by: Tomasz Zawadzki Change-Id: I76ca02487a5fb8f9ecc9d33ac6fa514e7226a03b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4636 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- include/spdk/accel_engine.h | 7 ------- include/spdk_internal/accel_engine.h | 9 +-------- lib/accel/Makefile | 2 +- lib/accel/accel_engine.c | 14 +------------- lib/accel/spdk_accel.map | 1 - module/accel/idxd/accel_engine_idxd.c | 2 +- module/accel/ioat/accel_engine_ioat.c | 2 +- module/event/subsystems/accel/accel.c | 1 - 8 files changed, 5 insertions(+), 33 deletions(-) diff --git a/include/spdk/accel_engine.h b/include/spdk/accel_engine.h index 8c1afaee59..d682ad1c48 100644 --- a/include/spdk/accel_engine.h +++ b/include/spdk/accel_engine.h @@ -88,13 +88,6 @@ int spdk_accel_engine_initialize(void); */ void spdk_accel_engine_finish(spdk_accel_fini_cb cb_fn, void *cb_arg); -/** - * Get the configuration for the acceleration engine. - * - * \param fp The pointer to a file that will be written to the configuration. - */ -void spdk_accel_engine_config_text(FILE *fp); - /** * Close the acceleration engine module and perform any necessary cleanup. */ diff --git a/include/spdk_internal/accel_engine.h b/include/spdk_internal/accel_engine.h index b77a06addc..9fa77f30bb 100644 --- a/include/spdk_internal/accel_engine.h +++ b/include/spdk_internal/accel_engine.h @@ -94,12 +94,6 @@ struct spdk_accel_module_if { */ void (*module_fini)(void *ctx); - /** Function called to return a text string representing the - * module's configuration options for inclusion in an - * spdk configuration file. - */ - void (*config_text)(FILE *fp); - /** * Write Acceleration module configuration into provided JSON context. */ @@ -116,11 +110,10 @@ struct spdk_accel_module_if { void spdk_accel_hw_engine_register(struct spdk_accel_engine *accel_engine); void spdk_accel_module_list_add(struct spdk_accel_module_if *accel_module); -#define SPDK_ACCEL_MODULE_REGISTER(init_fn, fini_fn, config_fn, config_json, ctx_size_fn) \ +#define SPDK_ACCEL_MODULE_REGISTER(init_fn, fini_fn, config_json, ctx_size_fn) \ static struct spdk_accel_module_if init_fn ## _if = { \ .module_init = init_fn, \ .module_fini = fini_fn, \ - .config_text = config_fn, \ .write_config_json = config_json, \ .get_ctx_size = ctx_size_fn, \ }; \ diff --git a/lib/accel/Makefile b/lib/accel/Makefile index 0d41104de7..b196ed3ccd 100644 --- a/lib/accel/Makefile +++ b/lib/accel/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -SO_VER := 3 +SO_VER := 4 SO_MINOR := 0 SO_SUFFIX := $(SO_VER).$(SO_MINOR) diff --git a/lib/accel/accel_engine.c b/lib/accel/accel_engine.c index 4682406b00..ce260ccbf9 100644 --- a/lib/accel/accel_engine.c +++ b/lib/accel/accel_engine.c @@ -571,18 +571,6 @@ spdk_accel_engine_finish(spdk_accel_fini_cb cb_fn, void *cb_arg) spdk_accel_engine_module_finish(); } -void -spdk_accel_engine_config_text(FILE *fp) -{ - struct spdk_accel_module_if *accel_engine_module; - - TAILQ_FOREACH(accel_engine_module, &spdk_accel_module_list, tailq) { - if (accel_engine_module->config_text) { - accel_engine_module->config_text(fp); - } - } -} - /* * The SW Accelerator module is "built in" here (rest of file) */ @@ -1031,4 +1019,4 @@ sw_accel_engine_fini(void *ctxt) } SPDK_ACCEL_MODULE_REGISTER(sw_accel_engine_init, sw_accel_engine_fini, - NULL, NULL, sw_accel_engine_get_ctx_size) + NULL, sw_accel_engine_get_ctx_size) diff --git a/lib/accel/spdk_accel.map b/lib/accel/spdk_accel.map index bfccf0a900..20f86c56f4 100644 --- a/lib/accel/spdk_accel.map +++ b/lib/accel/spdk_accel.map @@ -4,7 +4,6 @@ # public functions spdk_accel_engine_initialize; spdk_accel_engine_finish; - spdk_accel_engine_config_text; spdk_accel_engine_module_finish; spdk_accel_engine_get_io_channel; spdk_accel_get_capabilities; diff --git a/module/accel/idxd/accel_engine_idxd.c b/module/accel/idxd/accel_engine_idxd.c index f5fcb9e02c..3dd5edd63c 100644 --- a/module/accel/idxd/accel_engine_idxd.c +++ b/module/accel/idxd/accel_engine_idxd.c @@ -841,7 +841,7 @@ accel_engine_idxd_write_config_json(struct spdk_json_write_ctx *w) } SPDK_ACCEL_MODULE_REGISTER(accel_engine_idxd_init, accel_engine_idxd_exit, - NULL, accel_engine_idxd_write_config_json, + accel_engine_idxd_write_config_json, accel_engine_idxd_get_ctx_size) SPDK_LOG_REGISTER_COMPONENT(accel_idxd) diff --git a/module/accel/ioat/accel_engine_ioat.c b/module/accel/ioat/accel_engine_ioat.c index b6fceb7421..ba00ba3b89 100644 --- a/module/accel/ioat/accel_engine_ioat.c +++ b/module/accel/ioat/accel_engine_ioat.c @@ -163,7 +163,7 @@ accel_engine_ioat_get_ctx_size(void) } SPDK_ACCEL_MODULE_REGISTER(accel_engine_ioat_init, accel_engine_ioat_exit, - NULL, NULL, accel_engine_ioat_get_ctx_size) + NULL, accel_engine_ioat_get_ctx_size) static void ioat_done(void *cb_arg) diff --git a/module/event/subsystems/accel/accel.c b/module/event/subsystems/accel/accel.c index 957a496868..dd20c3b221 100644 --- a/module/event/subsystems/accel/accel.c +++ b/module/event/subsystems/accel/accel.c @@ -64,7 +64,6 @@ static struct spdk_subsystem g_spdk_subsystem_accel = { .name = "accel", .init = accel_engine_subsystem_initialize, .fini = accel_engine_subsystem_finish, - .config = spdk_accel_engine_config_text, .write_config_json = spdk_accel_write_config_json, };