From patchwork Thu Feb 24 12:52:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianli Lai X-Patchwork-Id: 108260 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24D13A034E; Thu, 24 Feb 2022 13:52:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B033141155; Thu, 24 Feb 2022 13:52:31 +0100 (CET) Received: from smtp.tom.com (smtprz14.163.net [106.3.154.247]) by mails.dpdk.org (Postfix) with ESMTP id 5CB5A4114D for ; Thu, 24 Feb 2022 13:52:30 +0100 (CET) Received: from my-app01.tom.com (my-app01.tom.com [127.0.0.1]) by freemail01.tom.com (Postfix) with ESMTP id 32FAC1E8C1E0 for ; Thu, 24 Feb 2022 20:52:29 +0800 (CST) Received: from my-app01.tom.com (HELO smtp.tom.com) ([127.0.0.1]) by my-app01 (TOM SMTP Server) with SMTP ID 462400464 for ; Thu, 24 Feb 2022 20:52:29 +0800 (CST) Received: from antispam3.tom.com (unknown [172.25.16.54]) by freemail01.tom.com (Postfix) with ESMTP id 1B8FB1E8C1DE for ; Thu, 24 Feb 2022 20:52:28 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=201807; t=1645707149; bh=VR6FITNqvpkkTsr6DyeYMJ4GDojI56WJ4R+p3hevow8=; h=From:To:Subject:Date:From; b=j4JmtgF+renLed+/h7uXot79EE8ZSmafITDac9N2DOzHZzRjJKJRijTK73UE8NIjN eyVcwVXbXwG9apoAoO8UXvqrDn7TeOFk2pKdXeSDEF/VdGb3R9dg9qqXChRtHnAnNB CRQnV2eow2kftl/Nim9CneO/ps9wFelCbdsH2JQ8= Received: from antispam3.tom.com (antispam3.tom.com [127.0.0.1]) by antispam3.tom.com (Postfix) with ESMTP id D96519C1A75 for ; Thu, 24 Feb 2022 20:52:28 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam3.tom.com Received: from antispam3.tom.com ([127.0.0.1]) by antispam3.tom.com (antispam3.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NQgoe6aWeJQI for ; Thu, 24 Feb 2022 20:52:28 +0800 (CST) Received: from haizhi-vm.localdomain (unknown [113.88.15.206]) by antispam3.tom.com (Postfix) with ESMTPA id F18969C1A35 for ; Thu, 24 Feb 2022 20:52:25 +0800 (CST) From: Tianli Lai To: dev@dpdk.org Subject: [PATCH] app/pdump: free mempool at cleanup resources Date: Thu, 24 Feb 2022 20:52:17 +0800 Message-Id: <1645707137-53479-1-git-send-email-laitianli@tom.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org the mempool should be free when cleanup resources. Signed-off-by: Tianli Lai --- app/pdump/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/pdump/main.c b/app/pdump/main.c index 04a38e8..9c77fc6 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -507,6 +507,10 @@ struct parse_val { /* free the rings */ rte_ring_free(pt->rx_ring); rte_ring_free(pt->tx_ring); + if (pt->mp) { + rte_mempool_free(pt->mp); + pt->mp = NULL; + } } }