From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 014391B147; Mon, 14 Jan 2019 23:30:24 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7925C28D74; Mon, 14 Jan 2019 17:30:23 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 14 Jan 2019 17:30:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=5XnF4HuFC4rKv7vEQVW1k7Bbr8U/3Xyet6XlnOdNc40=; b=L1U5Y6/+4oi1 tClCwZ2S0hWChFwtKsMzZ9XKUqXSDSTVzvmPiXF1QD+4vbQ0VbqbS48p9FIihXyz IMmLUNYBoqUmGnL745hG8n752pQ4qzFXN6WiqvdPVpAiGnvz28uJQzk6AauOV0wu rkgwgjrpouPwBIpDjJgCvfqJrd6TNWQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=5XnF4HuFC4rKv7vEQVW1k7Bbr8U/3Xyet6XlnOdNc 40=; b=mg3/Ej6moyggxGT8Xke4ET2o1iYRW62EMViykk6vIVK6bMLquSLZIlkzL B1Tnn7rLl8WURkvmwWTS2qlW0ej0J1CoDjeuf8CW/oEKYD3iuD09jhzkka/NNwSy TNfYQRXI2bQYubTnG2m7liFHzITGd+4oO32yCAMJ9UDP57uinsygrkM3ZrBtSv7S h+pt3s830D7SqqiFgvdu0mQVNeFvML6siogAFzKpbEmE+sSUnYKtVEiADxTPabHQ O3CtTtUEDrIqFQOdZluQlUjdZCuzU4wtMLrsNaBLkbATcAKJo29Wv2oKb3E3RRIR wpHnOJHSePrcCuWqndpjZOMjV+d+g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrgedugdduheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id CB35B100BA; Mon, 14 Jan 2019 17:30:21 -0500 (EST) From: Thomas Monjalon To: byron.marohn@intel.com, pablo.de.lara.guarch@intel.com Cc: stable@dpdk.org, Hari Kumar Vemula , dev@dpdk.org, reshma.pattan@intel.com, jananeex.m.parthasarathy@intel.com, maxime.coquelin@redhat.com Date: Mon, 14 Jan 2019 23:30:18 +0100 Message-ID: <2704785.Ctf98vYVr8@xps> In-Reply-To: <1547207341-22001-1-git-send-email-hari.kumarx.vemula@intel.com> References: <1542109533-14283-1-git-send-email-hari.kumarx.vemula@intel.com> <1547207341-22001-1-git-send-email-hari.kumarx.vemula@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH v3] lib/efd: fix to free tail queue entry after use X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 22:30:24 -0000 Any review please? 11/01/2019 12:49, Hari Kumar Vemula: > In rte_efd_create() allocated memory for tail queue entry but > not freed. > Added freeing the tail queue entry. > > Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") > Cc: stable@dpdk.org > > Signed-off-by: Hari Kumar Vemula > Acked-by: Reshma Pattan > > --- > v3: Replaced TAILQ_FOREACH_SAFE with TAILQ_FOREACH > v2: Updated commit message. > --- > lib/librte_efd/rte_efd.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c > index e6e5cfda2..8b8330e0b 100644 > --- a/lib/librte_efd/rte_efd.c > +++ b/lib/librte_efd/rte_efd.c > @@ -740,17 +740,32 @@ void > rte_efd_free(struct rte_efd_table *table) > { > uint8_t socket_id; > + struct rte_efd_list *efd_list; > + struct rte_tailq_entry *te, *temp; > > if (table == NULL) > return; > > + efd_list = RTE_TAILQ_CAST(rte_efd_tailq.head, rte_efd_list); > + > for (socket_id = 0; socket_id < RTE_MAX_NUMA_NODES; socket_id++) > rte_free(table->chunks[socket_id]); > + rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK); > > + TAILQ_FOREACH_SAFE(te, efd_list, next, temp) { > + if (te->data == (void *) table) { > + TAILQ_REMOVE(efd_list, te, next); > + rte_free(te); > + te = NULL; > + } > + } > + > + rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK); > rte_ring_free(table->free_slots); > rte_free(table->offline_chunks); > rte_free(table->keys); > rte_free(table); > + > } > > /** >