Skip to main content
InterviewHubPRO
Section Overview
Q29

Question 29 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

58%
Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

How does Network Packet Processing work in the Linux Kernel (sk_buff, Netfilter, eBPF)?

senior Levellinux-osAdvanced Internals

In Simple Words:

  1. NIC receives packet, DMA-transfers bytes to host RAM, triggers a hardware interrupt.
  2. Kernel processes packet via NAPI polling loop, wraps raw bytes in an sk_buff (Socket Buffer).
  3. Packet traverses the Netfilter architecture (iptables / nftables chains: PREROUTING, INPUT, FORWARD, OUTPUT, POSTROUTING).
  4. eBPF (Extended Berkeley Packet Filter): Allows running sandboxed bytecode directly inside the kernel network driver layer (XDP - eXpress Data Path), dropping malicious DDoS packets or routing packets in nanoseconds before sk_buff allocation!