Skip to main content
← CONCEPTS / DEVOPS & INFRASTRUCTURE
An end-to-end domain learning journey

eBPF & XDP
In-Kernel Packet Processing.

eBPF runs sandboxed, JIT-compiled bytecode safely inside the Linux kernel, and XDP (eXpress Data Path) hooks directly into the NIC driver RX ring before sk_buff allocation—enabling 20M+ PPS filtering per core.
Start the journey7 sections· Last modified Nov 23, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

If latency budgets leave no room for synchronous retries, attach XDP at the NIC driver layer to drop or bounce packets before sk_buff allocation, using Per-CPU BPF Maps to avoid cross-core lock contention.

TL;DR30-second simplified summary
▾

eBPF compiles bounded, Verifier-proven bytecode to native machine code inside the Linux kernel. Attached at the NIC driver RX ring via XDP, programs inspect raw DMA frames before sk_buff allocation, using Per-CPU BPF maps and LPM tries to drop, hairpin-forward (XDP_TX), or redirect (AF_XDP) 20M+ PPS per core.

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
Zero-Copy I/O, sendfile & io_uring
Zero-copy I/O keeps file bytes inside the Linux kernel page cache and streams them straight to a network socket via DMA scatter-gather, while io_uring batches asynchronous syscalls over shared memory ring buffers.
Full walkthrough · 7 stages
01
L4 · FUNDAMENTALS

.

02
L4 · FUNDAMENTALS

.

03
L5 · APPLIED DESIGN

.

04
L5 · APPLIED DESIGN

.

05
L6 · SCALE & TRADE-OFFS

.

06
L6 · SCALE & TRADE-OFFS

.

07
L7 · STAFF / PRINCIPAL

.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

Why does the Linux eBPF Verifier reject an XDP program that reads `iph->saddr` without first checking `(void *)(iph + 1) <= data_end`?

Recommended Learning Flow