Skip to contentSkip to conversation

ipvlan: use netif_receive_skb() in ipvlan_process_multicast()

PATCH Applied Eric Dumazet 2 participants 2 messages May 12 – May 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ipvlan: use netif_receive_skb() in ipvlan_process_multicast()

ipvlan_process_multicast() runs from process context, there is no risk of stack overflow if we call netif_receive_skb() instead of netif_rx().

This avoids some overhead adding/removing skbs to/from a per-cpu backlog and raising/processing NET_RX softirqs.

---
v2: Resend after realizing Sashiko's feedback was not actionable.

 drivers/net/ipvlan/ipvlan_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipvlan/ipvlan_core.c +1 -1
index 1be8620ad3971d281fb36fd0770efd67b566ae60..7ad12dc7845c836bdd04395f153b2b4b397797d6 100644
@@ -286,7 +286,7 @@ void ipvlan_process_multicast(struct work_struct *work)
 				if (tx_pkt)
 					ret = dev_forward_skb(ipvlan->dev, nskb);
 				else
-					ret = netif_rx(nskb);
+					ret = netif_receive_skb(nskb);
 			}
 			ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true);
 			local_bh_enable();
Signature · 1 line
2.54.0.563.g4f69b47b94-goog
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 12 May 2026 04:20:19 +0000 you wrote:

ipvlan_process_multicast() runs from process context, there is no risk of stack overflow if we call netif_receive_skb() instead of netif_rx().

This avoids some overhead adding/removing skbs to/from a per-cpu backlog and raising/processing NET_RX softirqs.

[...]

Here is the summary with links:
- [v2,net-next] ipvlan: use netif_receive_skb() in ipvlan_process_multicast()

    https://git.kernel.org/netdev/net-next/c/d0273dbe8be1

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html