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 <tomasz.zawadzki@intel.com> Change-Id: I76ca02487a5fb8f9ecc9d33ac6fa514e7226a03b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4636 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
5f90d0c016
commit
a8de86e9aa
@ -88,13 +88,6 @@ int spdk_accel_engine_initialize(void);
|
|||||||
*/
|
*/
|
||||||
void spdk_accel_engine_finish(spdk_accel_fini_cb cb_fn, void *cb_arg);
|
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.
|
* Close the acceleration engine module and perform any necessary cleanup.
|
||||||
*/
|
*/
|
||||||
|
@ -94,12 +94,6 @@ struct spdk_accel_module_if {
|
|||||||
*/
|
*/
|
||||||
void (*module_fini)(void *ctx);
|
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.
|
* 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_hw_engine_register(struct spdk_accel_engine *accel_engine);
|
||||||
void spdk_accel_module_list_add(struct spdk_accel_module_if *accel_module);
|
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 = { \
|
static struct spdk_accel_module_if init_fn ## _if = { \
|
||||||
.module_init = init_fn, \
|
.module_init = init_fn, \
|
||||||
.module_fini = fini_fn, \
|
.module_fini = fini_fn, \
|
||||||
.config_text = config_fn, \
|
|
||||||
.write_config_json = config_json, \
|
.write_config_json = config_json, \
|
||||||
.get_ctx_size = ctx_size_fn, \
|
.get_ctx_size = ctx_size_fn, \
|
||||||
}; \
|
}; \
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
|
|
||||||
SO_VER := 3
|
SO_VER := 4
|
||||||
SO_MINOR := 0
|
SO_MINOR := 0
|
||||||
SO_SUFFIX := $(SO_VER).$(SO_MINOR)
|
SO_SUFFIX := $(SO_VER).$(SO_MINOR)
|
||||||
|
|
||||||
|
@ -571,18 +571,6 @@ spdk_accel_engine_finish(spdk_accel_fini_cb cb_fn, void *cb_arg)
|
|||||||
spdk_accel_engine_module_finish();
|
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)
|
* 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,
|
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)
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
# public functions
|
# public functions
|
||||||
spdk_accel_engine_initialize;
|
spdk_accel_engine_initialize;
|
||||||
spdk_accel_engine_finish;
|
spdk_accel_engine_finish;
|
||||||
spdk_accel_engine_config_text;
|
|
||||||
spdk_accel_engine_module_finish;
|
spdk_accel_engine_module_finish;
|
||||||
spdk_accel_engine_get_io_channel;
|
spdk_accel_engine_get_io_channel;
|
||||||
spdk_accel_get_capabilities;
|
spdk_accel_get_capabilities;
|
||||||
|
@ -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,
|
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)
|
accel_engine_idxd_get_ctx_size)
|
||||||
|
|
||||||
SPDK_LOG_REGISTER_COMPONENT(accel_idxd)
|
SPDK_LOG_REGISTER_COMPONENT(accel_idxd)
|
||||||
|
@ -163,7 +163,7 @@ accel_engine_ioat_get_ctx_size(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SPDK_ACCEL_MODULE_REGISTER(accel_engine_ioat_init, accel_engine_ioat_exit,
|
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
|
static void
|
||||||
ioat_done(void *cb_arg)
|
ioat_done(void *cb_arg)
|
||||||
|
@ -64,7 +64,6 @@ static struct spdk_subsystem g_spdk_subsystem_accel = {
|
|||||||
.name = "accel",
|
.name = "accel",
|
||||||
.init = accel_engine_subsystem_initialize,
|
.init = accel_engine_subsystem_initialize,
|
||||||
.fini = accel_engine_subsystem_finish,
|
.fini = accel_engine_subsystem_finish,
|
||||||
.config = spdk_accel_engine_config_text,
|
|
||||||
.write_config_json = spdk_accel_write_config_json,
|
.write_config_json = spdk_accel_write_config_json,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user