From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harry van Haaren Subject: [PATCH v2 3/4] app/pdump: call eal finalize before exit Date: Mon, 29 Jan 2018 10:45:50 +0000 Message-ID: <1517222751-110376-3-git-send-email-harry.van.haaren@intel.com> References: <1517077877-53654-1-git-send-email-harry.van.haaren@intel.com> <1517222751-110376-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 mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D715E1B34A for ; Mon, 29 Jan 2018 11:46:08 +0100 (CET) In-Reply-To: <1517222751-110376-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 finalize() function just before quitting the pdump 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 --- Cc: thomas@monjalon.net Cc: vipin.varghese@intel.com --- app/pdump/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/pdump/main.c b/app/pdump/main.c index 0f70c75..6c58cda 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -882,5 +882,10 @@ main(int argc, char **argv) /* dump debug stats */ print_pdump_stats(); + ret = rte_eal_finalize(); + if (ret) + printf("Error from rte_eal_finalize(), %d\n", ret); + + return 0; } -- 2.7.4