2024-01-26 10:13:22

by Esben Haabendal

[permalink] [raw]
Subject: [PATCH v2 0/2] net: stmmac: dwmac-imx: Time Based Scheduling support

This small patch series allows using TBS support of the i.MX Ethernet QOS
controller for etf qdisc offload.
It achieves this in a similar manner that it is done in dwmac-intel.c,
dwmac-mediatek.c and stmmac_pci.c.

Changes since v1:

- Simplified for loop by starting at index 1.
- Fixed problem with indentation.


Esben Haabendal (2):
net: stmmac: do not clear TBS enable bit on link up/down
net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings

drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 4 ++++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
2 files changed, 7 insertions(+)

--
2.43.0



2024-01-26 11:02:14

by Esben Haabendal

[permalink] [raw]
Subject: [PATCH v2 1/2] net: stmmac: do not clear TBS enable bit on link up/down

With the dma conf being reallocated on each call to stmmac_open(), any
information in there is lost, unless we specifically handle it.

The STMMAC_TBS_EN bit is set when adding an etf qdisc, and the etf qdisc
therefore would stop working when link was set down and then back up.

Fixes: ba39b344e924 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open")
Cc: [email protected]
Signed-off-by: Esben Haabendal <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b334eb16da23..25519952f754 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3932,6 +3932,9 @@ static int __stmmac_open(struct net_device *dev,
priv->rx_copybreak = STMMAC_RX_COPYBREAK;

buf_sz = dma_conf->dma_buf_sz;
+ for (int i = 0; i < MTL_MAX_TX_QUEUES; i++)
+ if (priv->dma_conf.tx_queue[i].tbs & STMMAC_TBS_EN)
+ dma_conf->tx_queue[i].tbs = priv->dma_conf.tx_queue[i].tbs;
memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf));

stmmac_reset_queues_param(priv);
--
2.43.0


2024-01-30 12:21:17

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] net: stmmac: dwmac-imx: Time Based Scheduling support

Hello:

This series was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

On Fri, 26 Jan 2024 10:10:40 +0100 you wrote:
> This small patch series allows using TBS support of the i.MX Ethernet QOS
> controller for etf qdisc offload.
> It achieves this in a similar manner that it is done in dwmac-intel.c,
> dwmac-mediatek.c and stmmac_pci.c.
>
> Changes since v1:
>
> [...]

Here is the summary with links:
- [v2,1/2] net: stmmac: do not clear TBS enable bit on link up/down
https://git.kernel.org/netdev/net/c/4896bb7c0b31
- [v2,2/2] net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings
https://git.kernel.org/netdev/net/c/3b12ec8f618e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html