dev_forward_skb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

dev_forward_skb(9) πŸ’…βœ¨

okay so bestie, welcome to the dev_forward_skb page from the Kernel API Manual πŸŽ€ β€” this one's literally about yeeting an skb from one netif into another's receive queue, and the way it handles namespaces is iconic. let's get into it 🫢


✨ NAME ✨

dev_forward_skb β€” loopback an skb to another netif πŸ”


🌸 SYNOPSIS 🌸

int dev_forward_skb (struct net_device *dev , struct sk_buff *skb );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the destination network device, aka where the packet is headed 🎯
  • skb β€” the buffer to forward, the actual packet bestie πŸ’Œ

πŸ’œ DESCRIPTION πŸ’œ

return values, no cap:

  • NET_RX_SUCCESS β€” (no congestion) βœ…
  • NET_RX_DROP β€” (packet was dropped, but freed) πŸ’€

so basically, dev_forward_skb can be used for injecting an skb from the start_xmit function of one device into the receive queue of another device. it's giving main character energy in the networking stack, fr fr πŸ”₯

and here's the important part: the receiving device may be in another namespace, so we have to clear all information in the skb that could impact namespace isolation. like, can't have cross-namespace drama leaking through, periodt πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

okay bestie, buckle up, this list is long but every single one is here 🫢 β€” Kernel file ./net/core/dev.c, plus:


shoutout to the ./net/core kernel file and the spooky-cute October 2026 release date β€” this page was brought to you by the Kernel API Manual, and you're all caught up bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from