From patchwork Sat Jan 27 18:31:16 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: 34568 X-Patchwork-Delegate: thomas@monjalon.net 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 52AA91B1AF; Sat, 27 Jan 2018 19:31:35 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E54A12BBD for ; Sat, 27 Jan 2018 19:31:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jan 2018 10:31:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,423,1511856000"; d="scan'208";a="199296837" Received: from silpixa00398672.ir.intel.com ([10.237.223.111]) by fmsmga006.fm.intel.com with ESMTP; 27 Jan 2018 10:31:24 -0800 From: Harry van Haaren To: dev@dpdk.org Cc: thomas@monjalon.net, Harry van Haaren , vipin.varghese@intel.com Date: Sat, 27 Jan 2018 18:31:16 +0000 Message-Id: <1517077877-53654-3-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517077877-53654-1-git-send-email-harry.van.haaren@intel.com> References: <1517077877-53654-1-git-send-email-harry.van.haaren@intel.com> Subject: [dpdk-dev] [PATCH 3/4] app/pdump: call eal finalize 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 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; }