From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id BB2EE2583 for ; Tue, 1 May 2018 12:47:45 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id a137so13163900wme.1 for ; Tue, 01 May 2018 03:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hyr9pvPdj7e4HgCrFQZjxKk02hn7IthBQxhLAvsHFSI=; b=lk+oUd6i2C+XtFyF+crFdjSslc2TBPCZ5kJ4ym0jUv9EnbrW01AixuGIEo/9Tgosf2 mZtWwUMbXbwoxNxdNjsg804ye2njYTTbEO2Pg8RYr86AXubF3gjBwTjk2Co3LwCSDaiF PSUq9PPfliJykahsQJ+hANf0QHZkHoEDw9JIwRWMSe1sZlmRZpPrYDMV0yi346C2g6Fs uwXo2AajjWUHJaj/7RpEhhSYWx43SkzkVWd8rpWojqkDJ+hkjBtMCEIBhp2MI/l0F9Fo CpLZaYL60ABFy7HE5XPrpjKpNH3KQO9atgOoj2oCtqM7rgTh1ABy1NS3AZbCjq5Nm3ac lIMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hyr9pvPdj7e4HgCrFQZjxKk02hn7IthBQxhLAvsHFSI=; b=f1hvTFZ+MCWKDtxaxZnzyWHx15CQd9bpNLutbjcdVkBSRNAwSkTebBU4xtJ3lrwIRi JZoFSSHN6QJ7tGRhEtFSF1BfjoCJYgOmxly6sgjaLvLbMzZhd8QmueRchbVJgOMj7QCl hQK7Ch+zIjbZUTp8+ja6+sSYPeHBAz8es4/u4a5K5RWdowqcGBEJ3uUQ2p+fDiAIYgzC Dza2Fh+fNZFFqrNire7Sru/wpAsPKfBNvELRBBv3Akd0Zrk5YckW5KT5vjgByYh08dFb 8ohDvgij3b9GqxweQDIc8uOEt5QKbSCTztoeK8Qgz6WjJY+Mbup0ncD+mqxtgv2jpZyT C9lQ== X-Gm-Message-State: ALQs6tAzU5RPqywF/y71y2lV4bCfGKfyYpchGB8gB4ALO6gN6NdwZBse SDr4GZxLbMLby2Sj8fzQRv9PJ+4+GaM= X-Google-Smtp-Source: AB8JxZqaeog/Lp4c2KAAA5FoSiDYAZX1QZwZithqhe8mRrGknJM4Ysnmv6r46BgYvObgfXoUCrRPHA== X-Received: by 10.28.141.138 with SMTP id p132mr9229206wmd.49.1525171665483; Tue, 01 May 2018 03:47:45 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id b11-v6sm3505373wrf.50.2018.05.01.03.47.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 May 2018 03:47:44 -0700 (PDT) From: luca.boccassi@gmail.com To: Alejandro Lucero Cc: dpdk stable Date: Tue, 1 May 2018 11:45:08 +0100 Message-Id: <20180501104509.17238-45-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180501104509.17238-1-luca.boccassi@gmail.com> References: <20180501104509.17238-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/nfp: fix mbufs releasing when stop or close' has been queued to LTS release 16.11.7 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: Tue, 01 May 2018 10:47:46 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.7 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/03/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From d91fa14eeae5ef60bb899dfd7e498e2bf1cfe932 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 f70c94f08..911a3d0c6 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -323,7 +323,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.14.2