[dpdk-stable] patch 'net/bnxt: fix mbuf free when clearing Tx queue' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:33:49 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 1cf806df108542fa2e002200f4a05718c70e26a6 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson at broadcom.com>
Date: Wed, 23 Oct 2019 10:27:35 -0400
Subject: [PATCH] net/bnxt: fix mbuf free when clearing Tx queue

[ upstream commit 00932678c6bbbe922a2790e59fd68b34719f3171 ]

When freeing pending transmit mbufs, use rte_pktmbuf_free_seg()
instead of rte_pktmbuf_free(), otherwise linked mbufs may be freed
more than once.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")

Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>
---
 drivers/net/bnxt/bnxt_txq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 4ecb037674..f0098c3b4a 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -61,7 +61,7 @@ static void bnxt_tx_queue_release_mbufs(struct bnxt_tx_queue *txq)
 	if (sw_ring) {
 		for (i = 0; i < txq->tx_ring->tx_ring_struct->ring_size; i++) {
 			if (sw_ring[i].mbuf) {
-				rte_pktmbuf_free(sw_ring[i].mbuf);
+				rte_pktmbuf_free_seg(sw_ring[i].mbuf);
 				sw_ring[i].mbuf = NULL;
 			}
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:29.633200847 +0000
+++ 0082-net-bnxt-fix-mbuf-free-when-clearing-Tx-queue.patch	2019-12-19 14:32:26.197299650 +0000
@@ -1,14 +1,15 @@
-From 00932678c6bbbe922a2790e59fd68b34719f3171 Mon Sep 17 00:00:00 2001
+From 1cf806df108542fa2e002200f4a05718c70e26a6 Mon Sep 17 00:00:00 2001
 From: Lance Richardson <lance.richardson at broadcom.com>
 Date: Wed, 23 Oct 2019 10:27:35 -0400
 Subject: [PATCH] net/bnxt: fix mbuf free when clearing Tx queue
 
+[ upstream commit 00932678c6bbbe922a2790e59fd68b34719f3171 ]
+
 When freeing pending transmit mbufs, use rte_pktmbuf_free_seg()
 instead of rte_pktmbuf_free(), otherwise linked mbufs may be freed
 more than once.
 
 Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
-Cc: stable at dpdk.org
 
 Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
 Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>
@@ -17,10 +18,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
-index ebb9199d2d..6b866d4454 100644
+index 4ecb037674..f0098c3b4a 100644
 --- a/drivers/net/bnxt/bnxt_txq.c
 +++ b/drivers/net/bnxt/bnxt_txq.c
-@@ -34,7 +34,7 @@ static void bnxt_tx_queue_release_mbufs(struct bnxt_tx_queue *txq)
+@@ -61,7 +61,7 @@ static void bnxt_tx_queue_release_mbufs(struct bnxt_tx_queue *txq)
  	if (sw_ring) {
  		for (i = 0; i < txq->tx_ring->tx_ring_struct->ring_size; i++) {
  			if (sw_ring[i].mbuf) {


More information about the stable mailing list