[PATCH net-next] net: stmmac: stm32: Set TSO/TBS Tx queues default settings

Kurt Kanzenbach <[email protected]>
Newsgroups org.kernel.vger.netdev,org.infradead.lists.linux-arm-kernel
Message-ID <[email protected]>
TSO and TBS cannot coexist. Use the first queue with TSO and the rest for
TBS. Tx queues with TBS can support etf qdisc hw offload. This is done
similar to dwmac-imx and dwmac-intel.

Tested on stm32mp257f-dk with AF_XDP and Tx Launch Time on queue 1.

Signed-off-by: Kurt Kanzenbach <[email protected]>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index e1b260ed4790..8e15094eeab9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -557,6 +557,12 @@ static int stm32_dwmac_probe(struct platform_device *pdev)
 		return ret;
 	}
 
+	/* Default TX Q0 to use TSO and rest TXQ for TBS */
+	if (dwmac->ops->is_mp2) {
+		for (int i = 1; i < plat_dat->tx_queues_to_use; i++)
+			plat_dat->tx_queues_cfg[i].tbs_en = 1;
+	}
+
 	plat_dat->flags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;
 	plat_dat->bsp_priv = dwmac;
 	plat_dat->suspend = stm32_dwmac_suspend;

---
base-commit: ac155a26750a595703e7dadff84735456d75a479
change-id: 20260811-stm32mp2_txtime-6bf9e01c968e

Best regards,
--  
Kurt Kanzenbach <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.