lib/event: remove deprecated fields from spdk_app_opts

max_delay_us was deprecated in SPDK 19.04.
config_file was deprecated in SPDK 20.10.
master_core/pci_blacklist/pci_whitelist were deprecated in SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie8be4c347de58044a7c3d5b1329d96e47ce084b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6594
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Tomasz Zawadzki 2021-02-26 07:44:39 -05:00
parent 4fb0b89625
commit a38d241cd6
3 changed files with 9 additions and 42 deletions

View File

@ -14,6 +14,11 @@ the allowed list after the application has started.
Removed the `pci_whitelist`, `pci_blacklist` and `master_core` members of struct `spdk_env_opts`.
### event
Removed the `config_file`, `max_delay_us`, `pci_whitelist`
and `pci_blacklist` members of struct `spdk_app_opts`.
### accel
Two new accelerated crc32 functions 'spdk_accel_submit_crc32cv' and

View File

@ -89,7 +89,6 @@ typedef void (*spdk_sighandler_t)(int signal);
*/
struct spdk_app_opts {
const char *name;
const char *config_file; /* deprecated */
const char *json_config_file;
bool json_config_ignore_errors;
const char *rpc_addr; /* Can be UNIX domain socket path or IP address + TCP port */
@ -102,10 +101,7 @@ struct spdk_app_opts {
bool enable_coredump;
int mem_channel;
union {
int main_core;
int master_core __attribute__((deprecated));
};
int main_core;
int mem_size;
bool no_pci;
bool hugepage_single_segments;
@ -113,25 +109,10 @@ struct spdk_app_opts {
const char *hugedir;
enum spdk_log_level print_level;
size_t num_pci_addr;
union {
struct spdk_pci_addr *pci_blocked;
struct spdk_pci_addr *pci_blacklist __attribute__((deprecated));
};
union {
struct spdk_pci_addr *pci_allowed;
struct spdk_pci_addr *pci_whitelist __attribute__((deprecated));
};
struct spdk_pci_addr *pci_blocked;
struct spdk_pci_addr *pci_allowed;
const char *iova_mode;
/* DEPRECATED. No longer has any effect.
*
* The maximum latency allowed when passing an event
* from one core to another. A value of 0
* means all cores continually poll. This is
* specified in microseconds.
*/
uint64_t max_delay_us;
/* Wait for the associated RPC before initializing subsystems
* when this flag is enabled.
*/

View File

@ -418,7 +418,6 @@ app_copy_opts(struct spdk_app_opts *opts, struct spdk_app_opts *opts_user, size_
} \
SET_FIELD(name);
SET_FIELD(config_file);
SET_FIELD(json_config_file);
SET_FIELD(json_config_ignore_errors);
SET_FIELD(rpc_addr);
@ -439,7 +438,6 @@ app_copy_opts(struct spdk_app_opts *opts, struct spdk_app_opts *opts_user, size_
SET_FIELD(pci_blocked);
SET_FIELD(pci_allowed);
SET_FIELD(iova_mode);
SET_FIELD(max_delay_us);
SET_FIELD(delay_subsystem_init);
SET_FIELD(num_entries);
SET_FIELD(env_context);
@ -448,7 +446,7 @@ app_copy_opts(struct spdk_app_opts *opts, struct spdk_app_opts *opts_user, size_
/* You should not remove this statement, but need to update the assert statement
* if you add a new field, and also add a corresponding SET_FIELD statement */
SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 200, "Incorrect size");
SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 184, "Incorrect size");
#undef SET_FIELD
}
@ -476,18 +474,6 @@ spdk_app_start(struct spdk_app_opts *opts_user, spdk_msg_fn start_fn,
app_copy_opts(opts, opts_user, opts_user->opts_size);
if (opts->config_file) {
SPDK_ERRLOG("opts->config_file is deprecated. Use opts->json_config_file instead.\n");
/* For now we will just treat config_file as json_config_file. But if both were
* specified we will return an error here.
*/
if (opts->json_config_file) {
SPDK_ERRLOG("Setting both opts->config_file and opts->json_config_file not allowed.\n");
return 1;
}
opts->json_config_file = opts->config_file;
}
if (!start_fn) {
SPDK_ERRLOG("start_fn should not be NULL\n");
return 1;
@ -707,11 +693,6 @@ spdk_app_parse_args(int argc, char **argv, struct spdk_app_opts *opts,
memcpy(&g_default_opts, opts, sizeof(g_default_opts));
if (opts->config_file && access(opts->config_file, R_OK) != 0) {
SPDK_WARNLOG("Can't read JSON configuration file '%s'\n", opts->config_file);
opts->config_file = NULL;
}
if (opts->json_config_file && access(opts->json_config_file, R_OK) != 0) {
SPDK_WARNLOG("Can't read JSON configuration file '%s'\n", opts->json_config_file);
opts->json_config_file = NULL;