---
title: "XDP at the NIC driver"
---

> Documentation Index
> Fetch the complete documentation index at: https://example.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XDP at the NIC driver

[XDP](https://example.com/ebpf-field-guide/glossary/#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

Source: https://example.com/ebpf-field-guide/networking-and-packet-path/networking-hooks/xdp/index.mdx
