Commit 9eae89f1 authored by wuzhouhui's avatar wuzhouhui Committed by Jim Harris
Browse files

app: initializing log after DPDK



DPDK initializes log as well (in rte_eal_init()), so we should
re-initialize log after DPDK did that.

Change-Id: I36843a6d09d1e2d84e76284899348b84364e18b7
Signed-off-by: default avatarwuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-on: https://review.gerrithub.io/423630


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
parent 51606ed4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -495,7 +495,7 @@ spdk_app_setup_env(struct spdk_app_opts *opts)
	free(env_opts.pci_whitelist);

	if (rc < 0) {
		SPDK_ERRLOG("Unable to initialize SPDK env\n");
		fprintf(stderr, "Unable to initialize SPDK env\n");
	}

	return rc;
@@ -591,12 +591,12 @@ spdk_app_start(struct spdk_app_opts *opts, spdk_event_fn start_fn,
	}

	spdk_log_set_level(SPDK_APP_DEFAULT_LOG_LEVEL);
	spdk_log_open();

	if (spdk_app_setup_env(opts) < 0) {
		goto app_start_log_close_err;
		goto app_start_setup_conf_err;
	}

	spdk_log_open();
	SPDK_NOTICELOG("Total cores available: %d\n", spdk_env_get_core_count());

	spdk_thread_lib_init();