From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 919BCFFA for ; Mon, 30 Apr 2018 16:55:00 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id n10so14663387wmc.1 for ; Mon, 30 Apr 2018 07:55:00 -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=QpZ5bU/gRshrMpFwY8ylgXOPBBRsjQQBjusDkvZ6MrQ=; b=qa2uo8IFhmRxAAFMCHentgc02vIbXOVSovv41HBnptKmCvGMSYhotq0SFPoGx3zlx/ ZV23LOU5CodsHIa5VaPtZ2q35c4qp+DNfxpSJIGu+KE7BR0kux4gzOILHhs7t3qPOmpd W3w3TC6wNNTFGMpv/+3aE53sFNv+bk8oFD2VRh+8tY5mlNx7iPF47Xir2eKUxatNHlJl gRyRW+tCeal2GEaQJBMfXjKziDyE6neaZ/0Tf2vZ8mN0Njp+24nhNuc9/mH9dqiPYDWo Wlx7z+3I8S/IR57bQFQq8RAytHqrk56fLbBJA/hzWas+TP6kKzzi7RvR7cGnSgxhN9ln giUA== 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=QpZ5bU/gRshrMpFwY8ylgXOPBBRsjQQBjusDkvZ6MrQ=; b=je7cXssu9Rq3Wk3x4fQHCjkP/yCGcPcgNQKMtrS8YNduQIR+FhdWv1vOOST4r7l6ix Vkm4VTLQk6hExtt0ialXuVoJ4JBe6+yNUaOt9JnFiO/f74szgfkBVANscagnYrmgCsO1 ptuQ6DjRhg3PNnSvoL4ryfJywcCkSNWa14GbsTLeDbAp8GRBbesIP3a5wTGggmBXqjSY NpZY8d+sX3x5iKZ7V8GdPNu1xY9gT8fHcWrlqrlze5mT/5HMoAM+/R1YhzAe5vQbIn64 knwoU+bi9Xb5Tqv19Mtz5i+1u8cPwH4UpwrHZKQjkkqf0OxuLAEjz1lM/c0DfS3Dt/rp iVYg== X-Gm-Message-State: ALQs6tCF9EHu3DpxhmzpnUd6DqbI6Hr8h4WjCu/rbDpnx8IjPBjl/q9H 4OjtuE5RKqixIulqKR3iOm4= X-Google-Smtp-Source: AB8JxZrVRxCl2mt2Uig02AZh4zZMa0IFidP/bxSIk5eJzGCM1yrtips2j0zj01sECy9r/27eiqHxxQ== X-Received: by 10.28.35.4 with SMTP id j4mr7372220wmj.48.1525100100249; Mon, 30 Apr 2018 07:55:00 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id z63-v6sm9588177wrb.34.2018.04.30.07.54.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:54:59 -0700 (PDT) From: luca.boccassi@gmail.com To: Alejandro Lucero Cc: dpdk stable Date: Mon, 30 Apr 2018 15:53:55 +0100 Message-Id: <20180430145402.23057-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430145402.23057-1-luca.boccassi@gmail.com> References: <20180430144223.18657-85-luca.boccassi@gmail.com> <20180430145402.23057-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/nfp: fix mbufs releasing when stop or close' has been queued to stable release 18.02.2 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, 30 Apr 2018 14:55:00 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 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/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 7e804dd49698bc425acc3088b1922fa2f28f4741 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 6f795e9d7..d0da35b62 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -310,7 +310,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