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 0DB30325F for ; Sun, 6 May 2018 08:38:06 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AF25C218EB; Sun, 6 May 2018 02:38:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 06 May 2018 02:38:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mwH+XseyF2J3fsvu5 sbWnnIU0a+KBZUzYF6qc4H7EKs=; b=nKUGvD9cIAnnjoHvtcrrMC2l4oVtvj2Hg F18WILLY+5qP3mcUhL1KRYeDTSmIbJhoAziZS1n4IxkWuXqr+cnmQlTgzk6k8Rot tEhclp7b/18w0FL+l7T8TlxoVtI9cmFVQFZJWR85IwSzizTVsFqshue4fmgqvu3c AMe0jrHHJAcQJG9ZUMPT19iBcUhmiKnaf9p3hRUt+ZhldejZTCDIpU4LJB0otE4a jOWfpgrSRyII4jMXj9UDSoiT92o8t6VyHVul1KR5mfuPuyClSPpQ5lrJeWLXPBKq VDSxl50AxguqvMhQM9ljf8pbMTjlmLOihM4c3HMiGhnQ6D6vdxFhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=mwH+XseyF2J3fsvu5sbWnnIU0a+KBZUzYF6qc4H7EKs=; b=fctMA6IX mQIsGhOEKoc3wIim4hU51AvsmTByLTC3hvhvCz8e29+tkEBOA2Drif3VhfOD3po3 9hEaSSmmKGQ7Bbnm+XmXVlJVO3nKT5S+KQ+AC1p14hSJY1TaxrQdy2AApcTAzr54 S6EkrDC+GUaxMvj7U40B5ggUkxjc2laTY2Oj1enolkIWxueCnoM3OjQcMaODYXor SaH/hMcbs7Oo0cwQAZ7F8pAsC3vLX+lri680asAhVOnSxasZ0x/RNRuuz5ND6KKN zMlpGDyeQeixCHnkbtE+dJVLBqYlyijs+DLBF47i+boRYvtYhQRrB4++aO4trIH2 2uBzZ6nkjAXBkA== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.102]) by mail.messagingengine.com (Postfix) with ESMTPA id 1EED010253; Sun, 6 May 2018 02:38:03 -0400 (EDT) From: Yuanhan Liu To: Alejandro Lucero Cc: dpdk stable Date: Sun, 6 May 2018 14:36:35 +0800 Message-Id: <20180506063639.23196-22-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180506063639.23196-1-yliu@fridaylinux.org> References: <20180506063639.23196-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/nfp: fix mbufs releasing when stop or close' has been queued to LTS release 17.11.3 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: Sun, 06 May 2018 06:38:06 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/09/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 26e8845b2614eca8942a157870ba2627fce1df6c Mon Sep 17 00:00:00 2001 From: Alejandro Lucero Date: Mon, 23 Apr 2018 12:23:58 +0100 Subject: [PATCH] net/nfp: fix mbufs releasing when stop or close [ upstream commit 0c0e46c36bcc5dfe9d2aa605e1a5f714d45e0b7f ] PMDs have the responsibility of releasing mbufs sent through xmit burst function. NFP PMD attaches those sent mbufs to the TX ring structure, and it is at the next time a specific ring descriptor is going to be used when the previous linked mbuf, already transmitted at that point, is released. Those mbufs belonging to a chained mbuf got its own link to a ring descriptor, and they are released independently of the mbuf head of that chain. The problem is how those mbufs are released when the PMD is stopped or closed. Instead of releasing those mbufs as the xmit functions does, this is independently of being in a mbuf chain, the code calls rte_pktmbuf_free which will release not just the mbuf head in that chain but all the chained mbufs. The loop will try to release those mbufs which have already been released again when chained mbufs exist. This patch fixes the problem using rte_pktmbuf_free_seg instead. Fixes: b812daadad0d ("nfp: add Rx and Tx") Signed-off-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index cfb357b91..d9cd04732 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -301,7 +301,7 @@ nfp_net_tx_queue_release_mbufs(struct nfp_net_txq *txq) for (i = 0; i < txq->tx_count; i++) { if (txq->txbufs[i].mbuf) { - rte_pktmbuf_free(txq->txbufs[i].mbuf); + rte_pktmbuf_free_seg(txq->txbufs[i].mbuf); txq->txbufs[i].mbuf = NULL; } } -- 2.11.0