env_dpdk: do rte_eal_cleanup() at process exit
We already use destructor functions in env_dpdk to do some cleanup at process exit, so let's also add one to call rte_eal_cleanup. This ensures all hugepage files are freed before the process exits. Fixes issue #2267. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I8c93f503d77f35717b3d18a63ea49b31789dbc00 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10983 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
1e46373984
commit
8b81801e2d
@ -620,6 +620,15 @@ spdk_env_init(const struct spdk_env_opts *opts)
|
||||
return rc;
|
||||
}
|
||||
|
||||
__attribute__((destructor)) static void
|
||||
dpdk_cleanup(void)
|
||||
{
|
||||
/* Only call rte_eal_cleanup if the SPDK env library called rte_eal_init. */
|
||||
if (!g_external_init) {
|
||||
rte_eal_cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
spdk_env_fini(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user