Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: ks8851: Avoid excess softirq scheduling

The code injects a packet into netif_rx() repeatedly, which will add
it to its internal NAPI and schedule a softirq, and process it. It is
more efficient to queue multiple packets and process them all at the
local_bh_enable() time.

Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Fixes: e0863634bf9f ("net: ks8851: Queue RX packets in IRQ handler instead of disabling BHs")
Cc: stable@vger.kernel.org
Signed-off-by: Marek Vasut <marex@nabladev.com>
Link: https://patch.msgid.link/20260415231020.455298-2-marex@nabladev.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Marek Vasut and committed by
Jakub Kicinski
22230e68 5c9fcac3

+4 -1
+4 -1
drivers/net/ethernet/micrel/ks8851_common.c
··· 373 373 if (status & IRQ_LCI) 374 374 mii_check_link(&ks->mii); 375 375 376 - if (status & IRQ_RXI) 376 + if (status & IRQ_RXI) { 377 + local_bh_disable(); 377 378 while ((skb = __skb_dequeue(&rxq))) 378 379 netif_rx(skb); 380 + local_bh_enable(); 381 + } 379 382 380 383 return IRQ_HANDLED; 381 384 }