app: add NoPci field to config file
Allow disabling entire PCI access via config file. Change-Id: Ib571529fdcdfe0e8f43e0d69b32efa633c364f8f Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/381203 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ae19c072e8
commit
dbad65c383
@ -19,6 +19,11 @@
|
|||||||
# on core 0.
|
# on core 0.
|
||||||
#ReactorMask 0xFFFF
|
#ReactorMask 0xFFFF
|
||||||
|
|
||||||
|
# Disable PCI access. PCI is enabled by default. Setting this
|
||||||
|
# option will hide any PCI device from all SPDK modules, making
|
||||||
|
# SPDK act as if they don't exist.
|
||||||
|
#NoPci Yes
|
||||||
|
|
||||||
# Tracepoint group mask for spdk trace buffers
|
# Tracepoint group mask for spdk trace buffers
|
||||||
# Default: 0x0 (all tracepoint groups disabled)
|
# Default: 0x0 (all tracepoint groups disabled)
|
||||||
# Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
|
# Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
# on core 0.
|
# on core 0.
|
||||||
#ReactorMask 0xFFFF
|
#ReactorMask 0xFFFF
|
||||||
|
|
||||||
|
# Disable PCI access. PCI is enabled by default. Setting this
|
||||||
|
# option will hide any PCI device from all SPDK modules, making
|
||||||
|
# SPDK act as if they don't exist.
|
||||||
|
#NoPci Yes
|
||||||
|
|
||||||
# Tracepoint group mask for spdk trace buffers
|
# Tracepoint group mask for spdk trace buffers
|
||||||
# Default: 0x0 (all tracepoint groups disabled)
|
# Default: 0x0 (all tracepoint groups disabled)
|
||||||
# Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
|
# Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
|
||||||
|
@ -302,17 +302,17 @@ spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
|
|||||||
spdk_log_set_level(SPDK_APP_DEFAULT_LOG_PRIORITY);
|
spdk_log_set_level(SPDK_APP_DEFAULT_LOG_PRIORITY);
|
||||||
spdk_log_open();
|
spdk_log_open();
|
||||||
|
|
||||||
if (opts->reactor_mask == NULL) {
|
|
||||||
sp = spdk_conf_find_section(g_spdk_app.config, "Global");
|
sp = spdk_conf_find_section(g_spdk_app.config, "Global");
|
||||||
if (sp != NULL) {
|
if (opts->reactor_mask == NULL) {
|
||||||
if (spdk_conf_section_get_val(sp, "ReactorMask")) {
|
if (sp && spdk_conf_section_get_val(sp, "ReactorMask")) {
|
||||||
opts->reactor_mask = spdk_conf_section_get_val(sp, "ReactorMask");
|
opts->reactor_mask = spdk_conf_section_get_val(sp, "ReactorMask");
|
||||||
} else {
|
} else {
|
||||||
opts->reactor_mask = SPDK_APP_DPDK_DEFAULT_CORE_MASK;
|
opts->reactor_mask = SPDK_APP_DPDK_DEFAULT_CORE_MASK;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
opts->reactor_mask = SPDK_APP_DPDK_DEFAULT_CORE_MASK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!opts->no_pci && sp) {
|
||||||
|
opts->no_pci = spdk_conf_section_get_boolval(sp, "NoPci", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
spdk_env_opts_init(&env_opts);
|
spdk_env_opts_init(&env_opts);
|
||||||
|
Loading…
Reference in New Issue
Block a user