netif_receive_skb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 netif_receive_skb(9) 🌸

okay bestie, welcome to the Kernel API Manual πŸ’… this one's called netif_receive_skb and tbh it's kind of a big deal β€” it's the function where packets coming off the network actually get processed.


✨ NAME ✨

netif_receive_skb β€” process receive buffer from network πŸ¦‹


✨ SYNOPSIS ✨

int netif_receive_skb (struct sk_buff *skb );

✨ ARGUMENTS ✨

  • skb β€” the buffer to process. that's the packet bestie, hand it over πŸ’–

✨ DESCRIPTION ✨

so like, netif_receive_skb is the main receive data processing function. main character energy fr fr πŸ‘‘ it's the one doing the actual work of taking that buffer and pushing it through the stack.

here's the thing though β€” it always succeeds. yes literally always. no cap. but don't get too comfy, because the buffer may get dropped during processing 😭 either for congestion control or by the protocol layers. it's giving "we did our job, the packet's fate is not our business."

⚠️ major caveat, do not skip this: this function may only be called from softirq context, and interrupts should be enabled. that's not a suggestion bestie, that's the rules πŸ™ˆ

return values (which tbh are usually ignored β€” iconique of them):

  • NET_RX_SUCCESS β€” no congestion πŸ’š
  • NET_RX_DROP β€” packet was dropped πŸ’€

✨ SEE ALSO ✨

kernel file: ./net/core/dev.c

and now, the moment you've all been waiting for, the full friend group 🫢 β€” every single one of these, no skips:


that's the whole page bestie, hope you ate that up πŸ“

kisses from the kernel API manual β€” source dir ./net/core, dated October 2026 πŸŽ€

πŸ“¦ where this page comes from