BPF is not one hook but a set of attachment points, and each one sees different traffic. This diagram maps XDP, TC, socket-level BPF LSM, and sched_ext so you can pick the layer that can actually enforce your rule.
BPF programs are only as capable as the point where the kernel runs them, so the attachment point decides what a program can observe, modify, or deny. This explainer lays out four layers in the order a packet and a system call meet them: XDP at ingress before the network stack, TC filters after the stack has parsed the packet, socket and BPF LSM hooks at connection and syscall time, and sched_ext at the CPU scheduling layer. It also marks the boundaries those choices create, such as why ordinary XDP and TC filters never see VSOCK traffic and why host-side enforcement has to happen at the socket hook instead.
FAQ
What do you give up by attaching deeper in the stack?
XDP gives the fastest ingress path but a narrow view, since it runs before the stack has parsed much. Deeper hooks such as BPF LSM and sched_ext see more context but inherit verifier constraints like bounds checks, harder debugging with dropwatch and perf tracing, and policy-lifetime questions. Choose the shallowest layer that can still see and enforce the thing you care about.
A layered architecture view of fine-tuning a 3D generation model: which flow DiT branches get LoRA adapters, which stay frozen, and how data, compute, and evaluation wrap the adapted core.
ARC Region Switch is a managed failover orchestrator that runs team-owned plans in dependency order. This diagram maps its trigger, orchestration, execution, and region layers and the ownership boundary.
Active learning is a loop that spends a fixed labeling budget on the samples most worth annotating. This diagram maps its stages — pool, score, label, train, evaluate — and the return path that closes the cycle.
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.