Skip to contentSkip to conversation

net: stmmac: perserve TX and RX coalesce value during XDP setup

PATCH Applied Ong Boon Leong 3 participants 3 messages Nov 24, 2021 – Nov 26, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: stmmac: perserve TX and RX coalesce value during XDP setup

When XDP program is loaded, it is desirable that the previous TX and RX coalesce values are not re-inited to its default value. This prevents unnecessary re-configurig the coalesce values that were working fine before.

Fixes ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance")
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 -2
index 21111df7371..a122a161872 100644
@@ -6527,6 +6527,9 @@ int stmmac_xdp_open(struct net_device *dev)
 		tx_q->tx_tail_addr = tx_q->dma_tx_phy;
 		stmmac_set_tx_tail_ptr(priv, priv->ioaddr,
 				       tx_q->tx_tail_addr, chan);
+
+		hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+		tx_q->txtimer.function = stmmac_tx_timer;
 	}
 
 	/* Enable the MAC Rx/Tx */
@@ -6535,8 +6538,6 @@ int stmmac_xdp_open(struct net_device *dev)
 	/* Start Rx & Tx DMA Channels */
 	stmmac_start_all_dma(priv);
 
-	stmmac_init_coalesce(priv);
-
 	ret = stmmac_request_irq(dev);
 	if (ret)
 		goto irq_error;
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ong Boon Leong

When XDP program is loaded, it is desirable that the previous TX and RX coalesce values are not re-inited to its default value. This prevents unnecessary re-configurig the coalesce values that were working fine before.

Fixes ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance")
#2 lore raw
In reply to Ong Boon Leong
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Wed, 24 Nov 2021 19:40:19 +0800 you wrote:

When XDP program is loaded, it is desirable that the previous TX and RX coalesce values are not re-inited to its default value. This prevents unnecessary re-configurig the coalesce values that were working fine before.

Fixes ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance")

[...]

Here is the summary with links:
- [net-next,1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup

    https://git.kernel.org/netdev/net-next/c/61da6ac71570

You are awesome, thank you!

Signature · 9 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel