DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/bnxt: fix forcing of mbuf fast free
@ 2026-09-21  3:02 Mohammad Shuab Siddique
  0 siblings, 0 replies; only message in thread
From: Mohammad Shuab Siddique @ 2026-09-21  3:02 UTC (permalink / raw)
  To: dev; +Cc: kishore.padmanabha, Mohammad Shuab Siddique, stable,
	Dakota Sicher

From: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>

bnxt_dev_start_op() unconditionally enabled
RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE on every Tx queue that wasn't in
the PTP/1588 path, overriding any offload configuration the
application had explicitly requested via rte_eth_dev_configure()/
rte_eth_tx_queue_setup(). Applications that need mbuf refcnt tracking
(and therefore must keep this offload disabled) had no way to do so.

Track whether the offload was actually requested at queue-setup time
and only re-enable it in bnxt_dev_start_op() when it was.

Fixes: 5722ed1aafd2 ("net/bnxt: support timestamp parsing in Tx")
Cc: stable@dpdk.org

Signed-off-by: Dakota Sicher <dakota.sicher@broadcom.com>
Signed-off-by: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
 drivers/net/bnxt/bnxt_txq.c    | 3 +++
 drivers/net/bnxt/bnxt_txq.h    | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8e8ead8f61..9f5be8e24b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1939,7 +1939,8 @@ int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 					RTE_MIN(rte_align32pow2(txq->nb_tx_desc) / 4,
 						RTE_BNXT_MAX_TX_BURST);
 		} else {
-			txq->offloads |= RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+			if (txq->fast_free_requested)
+				txq->offloads |= RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
 			txq->tx_free_thresh =
 				RTE_MIN(rte_align32pow2(txq->nb_tx_desc) / 4,
 					RTE_BNXT_MAX_TX_BURST);
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 03407c556a..f6b858c15b 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -177,6 +177,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 		txq->tx_free_thresh = RTE_BNXT_MIN_TX_BURST;
 	txq->offloads = eth_dev->data->dev_conf.txmode.offloads |
 			tx_conf->offloads;
+	txq->fast_free_requested =
+		(txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) != 0;
+
 	/* mbuf fast free not supported for the following. Reset the bit */
 	if (bp->ieee_1588)
 		txq->offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
diff --git a/drivers/net/bnxt/bnxt_txq.h b/drivers/net/bnxt/bnxt_txq.h
index ac8af91c57..ffaac986c7 100644
--- a/drivers/net/bnxt/bnxt_txq.h
+++ b/drivers/net/bnxt/bnxt_txq.h
@@ -22,6 +22,7 @@ struct bnxt_tx_queue {
 	uint8_t			wthresh; /* Write-back threshold reg */
 	uint8_t			tx_deferred_start; /* not in global dev start */
 	uint8_t			tx_started; /* TX queue is started */
+	bool			fast_free_requested;
 
 	struct bnxt		*bp;
 	int			index;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-21  3:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21  3:02 [PATCH] net/bnxt: fix forcing of mbuf fast free Mohammad Shuab Siddique

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox