From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [dpdk-stable] [PATCH] net/nfp: fix mbufs releasing when stop or close Date: Tue, 24 Apr 2018 15:10:44 +0100 Message-ID: References: <1524482638-22281-1-git-send-email-alejandro.lucero@netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: stable@dpdk.org To: Alejandro Lucero , dev@dpdk.org Return-path: In-Reply-To: <1524482638-22281-1-git-send-email-alejandro.lucero@netronome.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 4/23/2018 12:23 PM, Alejandro Lucero wrote: > PMDs have the responsabilty 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 Applied to dpdk-next-net/master, thanks.