mirror_ubuntu-kernels/drivers/net/ethernet/toshiba
Christian Marangi be176234d0 net: tc35815: rework network interface interrupt logic
Rework network interface logic. Before this change, the code flow was:
1. Disable interrupt
2. Try to schedule a NAPI
3. Check if it was possible (NAPI is not already scheduled)
4. emit BUG() if we receive interrupt while a NAPI is scheduled

If some application busy poll or set gro_flush_timeout low enough, it's
possible to reach the BUG() condition. Given that the condition may
happen and it wouldn't be a bug, rework the logic to permit such case
and prevent stall with interrupt never enabled again.

Disable the interrupt only if the NAPI can be scheduled (aka it's not
already scheduled) and drop the printk and BUG() call. With these
change, in the event of a NAPI already scheduled, the interrupt is
simply ignored with nothing done.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20231009133754.9834-4-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-10-11 17:28:06 -07:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
ps3_gelic_net.c net/ps3_gelic_net: Use dma_mapping_error 2023-03-20 10:20:40 +00:00
ps3_gelic_net.h net/ps3_gelic_net: Fix RX sk_buff length 2023-03-20 10:20:40 +00:00
ps3_gelic_wireless.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ps3_gelic_wireless.h toshiba: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
spider_net_ethtool.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
spider_net.c net: spider_net: Use size_add() in call to struct_size() 2023-09-18 09:39:41 +01:00
spider_net.h eth: spider: remove a copy of the NAPI_POLL_WEIGHT define 2022-04-29 11:56:42 +01:00
tc35815.c net: tc35815: rework network interface interrupt logic 2023-10-11 17:28:06 -07:00