From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40F3CA04DD; Wed, 21 Oct 2020 05:02:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D87A1AC82; Wed, 21 Oct 2020 05:02:41 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 41F3FAC80; Wed, 21 Oct 2020 05:02:39 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A17881FB; Tue, 20 Oct 2020 20:02:37 -0700 (PDT) Received: from net-arm-kp920-01.shanghai.arm.com (net-arm-kp920-01.shanghai.arm.com [10.169.210.104]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4D8F83F719; Tue, 20 Oct 2020 20:02:34 -0700 (PDT) From: Ruifeng Wang To: Bruce Richardson , Vladimir Medvedkin , Ruifeng Wang , Honnappa Nagarahalli , Ray Kinsella Cc: dev@dpdk.org, nd@arm.com, stable@dpdk.org, Phil Yang , Kevin Traynor Date: Wed, 21 Oct 2020 11:02:10 +0800 Message-Id: <20201021030211.36381-2-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201021030211.36381-1-ruifeng.wang@arm.com> References: <20200907081518.46350-1-ruifeng.wang@arm.com> <20201021030211.36381-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/2] lpm: fix free of data structure 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" The container structure should be freed instead of rte_lpm structure after wrapping rte_lpm into internal structure __rte_lpm. Fixes: 8a9f8564e9f9 ("lpm: implement RCU rule reclamation") Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang Reviewed-by: Phil Yang Acked-by: Bruce Richardson Acked-by: Vladimir Medvedkin Acked-by: Kevin Traynor --- lib/librte_lpm/rte_lpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 757436f49..51a0ae578 100644 --- a/lib/librte_lpm/rte_lpm.c +++ b/lib/librte_lpm/rte_lpm.c @@ -268,7 +268,7 @@ rte_lpm_free(struct rte_lpm *lpm) rte_rcu_qsbr_dq_delete(internal_lpm->dq); rte_free(lpm->tbl8); rte_free(lpm->rules_tbl); - rte_free(lpm); + rte_free(internal_lpm); rte_free(te); } -- 2.20.1