patch 'net/bnxt: fix memzone free for Tx and Rx rings' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:15 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/20c6894eed7561e7830b5e6042407a5d89bede36

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 20c6894eed7561e7830b5e6042407a5d89bede36 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Mon, 20 Sep 2021 16:11:51 -0700
Subject: [PATCH] net/bnxt: fix memzone free for Tx and Rx rings

[ upstream commit 64a4d59df5d668e18762a80d360a1aa8a9e8d81d ]

The device cleanup logic was freeing most of the ring related memory,
but was not freeing up the memzone associated with the rings.
This patch fixes the issue.

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

Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 3 +++
 drivers/net/bnxt/bnxt_txr.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index f830bb6702..8133889297 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -849,6 +849,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
 		rte_free(rxq->cp_ring->cp_ring_struct);
 		rte_free(rxq->cp_ring);
 
+		rte_memzone_free(rxq->mz);
+		rxq->mz = NULL;
+
 		rte_free(rxq);
 		bp->rx_queues[i] = NULL;
 	}
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 0d6d485ab2..78c3f2918c 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -37,6 +37,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
 		rte_free(txq->cp_ring->cp_ring_struct);
 		rte_free(txq->cp_ring);
 
+		rte_memzone_free(txq->mz);
+		txq->mz = NULL;
+
 		rte_free(txq);
 		bp->tx_queues[i] = NULL;
 	}
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:09.041287523 +0100
+++ 0051-net-bnxt-fix-memzone-free-for-Tx-and-Rx-rings.patch	2021-11-30 16:50:05.690872796 +0100
@@ -1 +1 @@
-From 64a4d59df5d668e18762a80d360a1aa8a9e8d81d Mon Sep 17 00:00:00 2001
+From 20c6894eed7561e7830b5e6042407a5d89bede36 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 64a4d59df5d668e18762a80d360a1aa8a9e8d81d ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index a40fa50138..4c1ee4294e 100644
+index f830bb6702..8133889297 100644
@@ -26 +27 @@
-@@ -1207,6 +1207,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
+@@ -849,6 +849,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
@@ -37 +38 @@
-index 47824334ae..9e45ddd7a8 100644
+index 0d6d485ab2..78c3f2918c 100644
@@ -40 +41 @@
-@@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
+@@ -37,6 +37,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)


More information about the stable mailing list