From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harry van Haaren Subject: [PATCH v3 4/4] app/proc_info: call eal cleanup before exit Date: Mon, 29 Jan 2018 12:08:15 +0000 Message-ID: <1517227695-146913-4-git-send-email-harry.van.haaren@intel.com> References: <1517222751-110376-1-git-send-email-harry.van.haaren@intel.com> <1517227695-146913-1-git-send-email-harry.van.haaren@intel.com> Cc: Harry van Haaren , thomas@monjalon.net, vipin.varghese@intel.com To: dev@dpdk.org Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id BA93E1B6A8 for ; Mon, 29 Jan 2018 13:08:38 +0100 (CET) In-Reply-To: <1517227695-146913-1-git-send-email-harry.van.haaren@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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