* [PATCH net 1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release()
@ 2022-11-10 6:45 Noor Azura Ahmad Tarmizi
2022-11-12 4:05 ` Jakub Kicinski
2022-11-12 5:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Noor Azura Ahmad Tarmizi @ 2022-11-10 6:45 UTC (permalink / raw)
To: David S . Miller, Giuseppe Cavallaro, Alexandre Torgue,
Jose Abreu, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Maxime Coquelin, Alexei Starovoitov, Daniel Borkmann,
Jesper Dangaard Brouer, John Fastabend, Ong Boon Leong
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, bpf,
Song Yoong Siang, Mohd Faizal Abdul Rahim
From: Mohd Faizal Abdul Rahim <faizal.abdul.rahim@intel.com>
When stmmac_xdp_release() is called, there is a possibility that tx
function is still running on other queues which will lead to tx queue
timed out and reset adapter.
This commit ensure that tx function is not running xdp before release
flow continue to run.
Fixes: ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance")
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
Signed-off-by: Mohd Faizal Abdul Rahim <faizal.abdul.rahim@intel.com>
Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
---
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 8273e6a175c8..6b43da78cdf0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6548,6 +6548,9 @@ void stmmac_xdp_release(struct net_device *dev)
struct stmmac_priv *priv = netdev_priv(dev);
u32 chan;
+ /* Ensure tx function is not running */
+ netif_tx_disable(dev);
+
/* Disable NAPI process */
stmmac_disable_all_queues(priv);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net 1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release()
2022-11-10 6:45 [PATCH net 1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release() Noor Azura Ahmad Tarmizi
@ 2022-11-12 4:05 ` Jakub Kicinski
2022-11-12 5:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-11-12 4:05 UTC (permalink / raw)
To: Noor Azura Ahmad Tarmizi
Cc: David S . Miller, Giuseppe Cavallaro, Alexandre Torgue,
Jose Abreu, Eric Dumazet, Paolo Abeni, Maxime Coquelin,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Ong Boon Leong, netdev, linux-stm32,
linux-arm-kernel, linux-kernel, bpf, Song Yoong Siang,
Mohd Faizal Abdul Rahim
On Thu, 10 Nov 2022 14:45:52 +0800 Noor Azura Ahmad Tarmizi wrote:
> When stmmac_xdp_release() is called, there is a possibility that tx
> function is still running on other queues which will lead to tx queue
> timed out and reset adapter.
>
> This commit ensure that tx function is not running xdp before release
> flow continue to run.
Do we still need that netif_trans_update() later in the function?
That looks odd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net 1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release()
2022-11-10 6:45 [PATCH net 1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release() Noor Azura Ahmad Tarmizi
2022-11-12 4:05 ` Jakub Kicinski
@ 2022-11-12 5:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-12 5:10 UTC (permalink / raw)
To: Noor Azura Ahmad Tarmizi
Cc: davem, peppe.cavallaro, alexandre.torgue, joabreu, edumazet, kuba,
pabeni, mcoquelin.stm32, ast, daniel, hawk, john.fastabend,
boon.leong.ong, netdev, linux-stm32, linux-arm-kernel,
linux-kernel, bpf, yoong.siang.song, faizal.abdul.rahim
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 10 Nov 2022 14:45:52 +0800 you wrote:
> From: Mohd Faizal Abdul Rahim <faizal.abdul.rahim@intel.com>
>
> When stmmac_xdp_release() is called, there is a possibility that tx
> function is still running on other queues which will lead to tx queue
> timed out and reset adapter.
>
> This commit ensure that tx function is not running xdp before release
> flow continue to run.
>
> [...]
Here is the summary with links:
- [net,1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release()
https://git.kernel.org/netdev/net/c/77711683a504
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-12 5:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 6:45 [PATCH net 1/1] net: stmmac: ensure tx function is not running in stmmac_xdp_release() Noor Azura Ahmad Tarmizi
2022-11-12 4:05 ` Jakub Kicinski
2022-11-12 5:10 ` patchwork-bot+netdevbpf
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).