[dpdk-dev,v3,4/4] app/proc_info: call eal cleanup before exit
Checks
Commit Message
This patch adds a call to the newly introduced cleanup()
function just before quitting the app.
Adding this function call before quitting from a secondary processes
is important, as otherwise it will leak hugepage memory. For a secondary
process that is run multiple times, this could cause hugepage memory
to become depleted and stop a secondary process from starting.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
v3:
- Rework to use cleanup() function name (Thomas)
Cc: thomas@monjalon.net
Cc: vipin.varghese@intel.com
---
app/proc_info/main.c | 4 ++++
1 file changed, 4 insertions(+)
Comments
> -----Original Message-----
> From: Van Haaren, Harry
> Sent: Monday, January 29, 2018 5:38 PM
> To: dev@dpdk.org
> Cc: Van Haaren, Harry <harry.van.haaren@intel.com>; thomas@monjalon.net;
> Varghese, Vipin <vipin.varghese@intel.com>
> Subject: [PATCH v3 4/4] app/proc_info: call eal cleanup before exit
>
> This patch adds a call to the newly introduced cleanup() function just before
> quitting the app.
>
> Adding this function call before quitting from a secondary processes is
> important, as otherwise it will leak hugepage memory. For a secondary process
> that is run multiple times, this could cause hugepage memory to become
> depleted and stop a secondary process from starting.
>
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
>
> ---
>
> v3:
> - Rework to use cleanup() function name (Thomas)
>
> Cc: thomas@monjalon.net
> Cc: vipin.varghese@intel.com
> ---
> app/proc_info/main.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/app/proc_info/main.c b/app/proc_info/main.c index
> 94d53f5..2f53e3c 100644
> --- a/app/proc_info/main.c
> +++ b/app/proc_info/main.c
> @@ -660,5 +660,9 @@ main(int argc, char **argv)
> if (enable_metrics)
> metrics_display(RTE_METRICS_GLOBAL);
>
> + ret = rte_eal_cleanup();
> + if (ret)
> + printf("Error from rte_eal_cleanup(), %d\n", ret);
> +
> return 0;
> }
> --
> 2.7.4
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
@@ -660,5 +660,9 @@ main(int argc, char **argv)
if (enable_metrics)
metrics_display(RTE_METRICS_GLOBAL);
+ ret = rte_eal_cleanup();
+ if (ret)
+ printf("Error from rte_eal_cleanup(), %d\n", ret);
+
return 0;
}