Skip to content

XDP at the NIC driver

Step 2 of 9Solution
SK_BUFF
not allocated
THROUGHPUT
10M+ pps/core
VERDICTS
DROP/TX/PASS
DIRECTION
ingress only
  • ingress frame
  • egress / socket
  • XDP drop / redirect
XDP, TC & Socket Hooks, step 2 of 9

XDP (eXpress Data Path) runs your eBPF program inside the NIC driver before Linux allocates an sk_buff. Your hook receives raw packet bytes (data to data_end) and returns a verdict.

XDP_DROP discards DDoS floods at 10–24M pps per core; XDP_TX bounces packets back out the same NIC (L4 load balancers like Katran); XDP_REDIRECT forwards to another NIC or AF_XDP socket; XDP_PASS hands off to Linux.

What changed

  • Late iptables drop → drop at NIC ring before sk_buff
  • Per-packet heap alloc → zero-allocation DMA buffer read
  • Full stack traversal → immediate XDP_TX / XDP_REDIRECT

Type to search…

↑↓ navigate↵ selectEsc close