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: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-on: https://review.gerrithub.io/423630 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
51606ed402
commit
9eae89f10c
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user