From patchwork Mon Jan 29 12:08:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Van Haaren, Harry" X-Patchwork-Id: 34614 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 513EC1B6C2; Mon, 29 Jan 2018 13:08:44 +0100 (CET) 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2018 04:08:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,429,1511856000"; d="scan'208";a="23303116" Received: from silpixa00398672.ir.intel.com ([10.237.223.111]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jan 2018 04:08:36 -0800 From: Harry van Haaren To: dev@dpdk.org Cc: Harry van Haaren , thomas@monjalon.net, vipin.varghese@intel.com Date: Mon, 29 Jan 2018 12:08:15 +0000 Message-Id: <1517227695-146913-4-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517227695-146913-1-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> Subject: [dpdk-dev] [PATCH v3 4/4] app/proc_info: call eal cleanup before exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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 Acked-by: Vipin Varghese --- 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; }