From: Ong Boon Leong <boon.leong.ong@intel.com> To: netdev@vger.kernel.org Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, "David S . Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, alexandre.torgue@foss.st.com, Kurt Kanzenbach <kurt@linutronix.de>, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Ong Boon Leong <boon.leong.ong@intel.com> Subject: [PATCH net-next 1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup Date: Wed, 24 Nov 2021 19:40:19 +0800 [thread overview] Message-ID: <20211124114019.3949125-1-boon.leong.ong@intel.com> (raw) 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(-) 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; -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Ong Boon Leong <boon.leong.ong@intel.com> To: netdev@vger.kernel.org Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, "David S . Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, alexandre.torgue@foss.st.com, Kurt Kanzenbach <kurt@linutronix.de>, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Ong Boon Leong <boon.leong.ong@intel.com> Subject: [PATCH net-next 1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup Date: Wed, 24 Nov 2021 19:40:19 +0800 [thread overview] Message-ID: <20211124114019.3949125-1-boon.leong.ong@intel.com> (raw) 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(-) 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; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-11-24 11:42 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-24 11:40 Ong Boon Leong [this message] 2021-11-24 11:40 ` [PATCH net-next 1/1] net: stmmac: perserve TX and RX coalesce value during XDP setup Ong Boon Leong 2021-11-24 11:56 ` Kurt Kanzenbach 2021-11-24 11:56 ` Kurt Kanzenbach 2021-11-26 3:30 ` patchwork-bot+netdevbpf 2021-11-26 3:30 ` patchwork-bot+netdevbpf
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211124114019.3949125-1-boon.leong.ong@intel.com \ --to=boon.leong.ong@intel.com \ --cc=alexandre.torgue@foss.st.com \ --cc=alexandre.torgue@st.com \ --cc=davem@davemloft.net \ --cc=joabreu@synopsys.com \ --cc=kuba@kernel.org \ --cc=kurt@linutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=peppe.cavallaro@st.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.