netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] net: stmmac: dwmac-qcom-ethqos: Enable TBS on all queues but 0
@ 2024-02-07  0:10 Abhishek Chauhan
  2024-02-07 17:26 ` Jeff Johnson
  2024-02-07 18:33 ` Andrew Halaney
  0 siblings, 2 replies; 5+ messages in thread
From: Abhishek Chauhan @ 2024-02-07  0:10 UTC (permalink / raw)
  To: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Alexandre Torgue,
	Jose Abreu, Maxime Coquelin, netdev, linux-arm-msm, devicetree,
	linux-kernel, linux-stm32, Prasad Sodagudi, Andrew Halaney,
	Rob Herring
  Cc: kernel

TSO and TBS cannot co-exist. TBS requires special descriptor to be
allocated at bootup. Initialising Tx queues at probe to support
TSO and TBS can help in allocating those resources at bootup.

TX queues with TBS can support etf qdisc hw offload.

This is similar to the patch raised by NXP <3b12ec8f618e>
<"net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings">

Changes since v1:
- Subject is changed as per upstream guidelines
- Added a reference of a similar change done by NXP in
  body of the commit message

Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 31631e3f89d0..d2f9b8f6c027 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -728,7 +728,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
 	struct stmmac_resources stmmac_res;
 	struct device *dev = &pdev->dev;
 	struct qcom_ethqos *ethqos;
-	int ret;
+	int ret, i;
 
 	ret = stmmac_get_platform_resources(pdev, &stmmac_res);
 	if (ret)
@@ -822,6 +822,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
 		plat_dat->serdes_powerdown  = qcom_ethqos_serdes_powerdown;
 	}
 
+	/*Enable TSO on queue0 and enable TBS on rest of the queues*/
+	for (i = 1; i < plat_dat->tx_queues_to_use; i++)
+		plat_dat->tx_queues_cfg[i].tbs_en = 1;
+
 	return devm_stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-07 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07  0:10 [PATCH v2] net: stmmac: dwmac-qcom-ethqos: Enable TBS on all queues but 0 Abhishek Chauhan
2024-02-07 17:26 ` Jeff Johnson
2024-02-07 18:19   ` Jakub Kicinski
2024-02-07 18:39     ` Andrew Halaney
2024-02-07 18:33 ` Andrew Halaney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).