netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: axienet: start napi before enabling Rx/Tx
@ 2024-07-26  7:06 Andy Chiu
  2024-07-26  7:41 ` Eric Dumazet
  2024-07-29 11:24 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Chiu @ 2024-07-26  7:06 UTC (permalink / raw)
  To: Radhey Shyam Pandey, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Michal Simek, Robert Hancock
  Cc: netdev, linux-arm-kernel, linux-kernel, Andy Chiu

softirq may get lost if an Rx interrupt comes before we call
napi_enable. Move napi_enable in front of axienet_setoptions(), which
turns on the device, to address the issue.

Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html
Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive")
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index db7640529ce7..6fb48268b47c 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1849,9 +1849,9 @@ static void axienet_dma_err_handler(struct work_struct *work)
 			   ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN));
 	axienet_set_mac_address(ndev, NULL);
 	axienet_set_multicast_list(ndev);
-	axienet_setoptions(ndev, lp->options);
 	napi_enable(&lp->napi_rx);
 	napi_enable(&lp->napi_tx);
+	axienet_setoptions(ndev, lp->options);
 }
 
 /**

---
base-commit: 80532af22b67cb83736f62feaeba483b2a5f74db
change-id: 20240726-dev-andyc-net-fixes-306f825878c4

Best regards,
-- 
Andy Chiu <andy.chiu@sifive.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: axienet: start napi before enabling Rx/Tx
  2024-07-26  7:06 [PATCH] net: axienet: start napi before enabling Rx/Tx Andy Chiu
@ 2024-07-26  7:41 ` Eric Dumazet
  2024-07-29 11:24 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-07-26  7:41 UTC (permalink / raw)
  To: Andy Chiu
  Cc: Radhey Shyam Pandey, David S. Miller, Jakub Kicinski, Paolo Abeni,
	Michal Simek, Robert Hancock, netdev, linux-arm-kernel,
	linux-kernel

On Fri, Jul 26, 2024 at 9:06 AM Andy Chiu <andy.chiu@sifive.com> wrote:
>
> softirq may get lost if an Rx interrupt comes before we call
> napi_enable. Move napi_enable in front of axienet_setoptions(), which
> turns on the device, to address the issue.
>
> Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html
> Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive")
> Signed-off-by: Andy Chiu <andy.chiu@sifive.com>

SGTM, although the axienet_setoptions name is a bit confusing...

Reviewed-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: axienet: start napi before enabling Rx/Tx
  2024-07-26  7:06 [PATCH] net: axienet: start napi before enabling Rx/Tx Andy Chiu
  2024-07-26  7:41 ` Eric Dumazet
@ 2024-07-29 11:24 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-29 11:24 UTC (permalink / raw)
  To: Andy Chiu
  Cc: radhey.shyam.pandey, davem, edumazet, kuba, pabeni, michal.simek,
	robert.hancock, netdev, linux-arm-kernel, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 26 Jul 2024 15:06:50 +0800 you wrote:
> softirq may get lost if an Rx interrupt comes before we call
> napi_enable. Move napi_enable in front of axienet_setoptions(), which
> turns on the device, to address the issue.
> 
> Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html
> Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive")
> Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
> 
> [...]

Here is the summary with links:
  - net: axienet: start napi before enabling Rx/Tx
    https://git.kernel.org/netdev/net/c/799a82950750

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:[~2024-07-29 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26  7:06 [PATCH] net: axienet: start napi before enabling Rx/Tx Andy Chiu
2024-07-26  7:41 ` Eric Dumazet
2024-07-29 11:24 ` 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).