env_dpdk: set g_external_init in end of func
Set g_external_init to false when the function calling is succeed in the end of function spdk_env_init. Change-Id: I3fc4b4c87b11ca34354efafdd9644c077309c638 Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3455 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: GangCao <gang.cao@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
29bbb9ba9c
commit
30ff304290
@ -511,8 +511,6 @@ spdk_env_init(const struct spdk_env_opts *opts)
|
||||
int orig_optind;
|
||||
bool legacy_mem;
|
||||
|
||||
g_external_init = false;
|
||||
|
||||
rc = build_eal_cmdline(opts);
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "Invalid arguments to initialize DPDK\n");
|
||||
@ -559,7 +557,12 @@ spdk_env_init(const struct spdk_env_opts *opts)
|
||||
legacy_mem = true;
|
||||
}
|
||||
|
||||
return spdk_env_dpdk_post_init(legacy_mem);
|
||||
rc = spdk_env_dpdk_post_init(legacy_mem);
|
||||
if (rc == 0) {
|
||||
g_external_init = false;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user