Commit dbad65c3 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Daniel Verkamp
Browse files

app: add NoPci field to config file



Allow disabling entire PCI access via config file.

Change-Id: Ib571529fdcdfe0e8f43e0d69b32efa633c364f8f
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/381203


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent ae19c072
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,11 @@
  #  on core 0.
  #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
  # Default: 0x0 (all tracepoint groups disabled)
  # Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,11 @@
  #  on core 0.
  #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
  # Default: 0x0 (all tracepoint groups disabled)
  # Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
+7 −7
Original line number Diff line number Diff line
@@ -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_open();

	if (opts->reactor_mask == NULL) {
	sp = spdk_conf_find_section(g_spdk_app.config, "Global");
		if (sp != NULL) {
			if (spdk_conf_section_get_val(sp, "ReactorMask")) {
	if (opts->reactor_mask == NULL) {
		if (sp && spdk_conf_section_get_val(sp, "ReactorMask")) {
			opts->reactor_mask = spdk_conf_section_get_val(sp, "ReactorMask");
		} else {
			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);