diff mbox series

[net-next,1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup

Message ID 20211124114019.3949125-1-boon.leong.ong@intel.com (mailing list archive)
State Accepted
Commit 61da6ac715700bcfeef50d187e15c6cc7c9d079b
Delegated to: Netdev Maintainers
Headers show
Series [net-next,1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 17 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ong Boon Leong Nov. 24, 2021, 11:40 a.m. UTC
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")
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Kurt Kanzenbach Nov. 24, 2021, 11:56 a.m. UTC | #1
On Wed Nov 24 2021, Ong Boon Leong 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")
> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>

Tested-by: Kurt Kanzenbach <kurt@linutronix.de>
patchwork-bot+netdevbpf@kernel.org Nov. 26, 2021, 3:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

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")
> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
> 
> [...]

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!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 21111df7371..a122a161872 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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;