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 EEA9AA04DE; Fri, 23 Oct 2020 11:39:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB15AA908; Fri, 23 Oct 2020 11:38:41 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 52E06A8F1 for ; Fri, 23 Oct 2020 11:38:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603445918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JLcxJCQNvRL/dip4B0eHz2MlFTtch1zZU5/06vRmiLI=; b=ZdhQ7t3P4y+j+CvkPQF85hyYcIrfJoxuGIxLsDBxZdMVSH5p0aHUW+Y5Sg8OQDrwqZ/pYk 5sqYs/vIoyXJjGKUZrRDZIxWdr8W61exRty/iP1lxS8M3hLbYVmF80ccTpqTw2nGCPiic1 lvLK0RkRQxmWSeSU8WhPdb5eXhJi+Do= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-bEVl-PugN8a6tN5yDhsn1w-1; Fri, 23 Oct 2020 05:38:34 -0400 X-MC-Unique: bEVl-PugN8a6tN5yDhsn1w-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F9208049FC; Fri, 23 Oct 2020 09:38:32 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id B3F8827BCD; Fri, 23 Oct 2020 09:38:28 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, nd@arm.com, Phil Yang , Bruce Richardson , Vladimir Medvedkin , Kevin Traynor , Ray Kinsella Date: Fri, 23 Oct 2020 11:38:17 +0200 Message-Id: <20201023093818.6030-2-david.marchand@redhat.com> In-Reply-To: <20201023093818.6030-1-david.marchand@redhat.com> References: <20200907081518.46350-1-ruifeng.wang@arm.com> <20201023093818.6030-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH v3 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" From: Ruifeng Wang 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") 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 757436f492..51a0ae5780 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.23.0