DPDK (Data Plane Development Kit) is the userspace-networking framework that telecom NFV, software routers, and packet generators use to hit double-digit Mpps per CPU core. It bypasses the kernel networking stack entirely: a poll-mode driver running in userspace pulls packets directly from the NIC’s DMA rings into a userspace memory pool, and userspace code processes them without a context switch. The performance is excellent and the operational cost is real — hugepages, CPU pinning, no kernel TCP/IP for the bypassed NIC, and a debugging experience that does not include tcpdump. This article covers what DPDK is, when it is the right answer, and where eBPF/XDP gets you 80% of the benefit at 20% of the operational weight.
How to verify
Inspect DPDK-bound interfaces and resources:
dpdk-devbind.py --status
cat /proc/meminfo | grep -i hugepages
lscpu | grep -E '^(NUMA|CPU\(s\))'
cat /proc/cmdline
ls /sys/devices/system/node/
testpmd -l 2,3 -n 4 -- --port-topology=loop -i
dpdk-devbind.py --status lists every network device and which driver it is bound to (vfio-pci, uio_pci_generic, or a kernel driver like ixgbe). Devices bound to a DPDK-compatible driver do not appear in ip link — that is by design.
What’s happening
The kernel networking stack does work for every packet: interrupt handling, sk_buff allocation, protocol dispatch, socket lookups, copies into userspace. At 10G line rate with small packets (14.88 Mpps), even with NAPI and offloads, a single core can become the bottleneck. DPDK trades the kernel’s generality for raw throughput:
- No interrupts. Packets are pulled by a tight poll loop running on a dedicated CPU core (the “poll-mode driver”, PMD). The core is busy 100% of the time — DPDK applications are happy to consume a whole core per port.
- No
sk_buff. Packets live inrte_mbufstructures, pre-allocated in a memory pool backed by hugepages. No per-packet allocation, no fragmentation. - No kernel parsing. The application sees raw frames and is responsible for L2/L3/L4 parsing. DPDK provides helpers (
rte_ether_hdr,rte_ipv4_hdr) but does not run the kernel’s TCP stack. - Direct NIC access. The NIC’s TX/RX rings are mapped into the userspace process via VFIO or UIO; the kernel does not see frames received on a DPDK-bound port.
The deployment model has three hard requirements:
- Hugepages — DPDK memory pools require 2 MiB or 1 GiB pages, configured at boot via
hugepageszandhugepageskernel parameters. - IOMMU + VFIO — for safe userspace DMA, enable
intel_iommu=on iommu=pt(or AMD equivalent) and bind devices tovfio-pci. - CPU isolation — the PMD core must not be preempted by the kernel scheduler.
isolcpus=,nohz_full=,rcu_nocbs=on the kernel command line, plus systemdCPUAffinity=away from the PMD cores.
The trade-off: a kernel-free port means no iptables, no tcpdump (DPDK has its own pcap helpers, but they are not the kernel’s), no Linux routing table. Every feature you used to get from the kernel — routing, firewalling, NAT, monitoring — must be re-implemented in the DPDK application or bypassed.
When DPDK is the right answer
- Software-only NFV at >10 Gbps with full L4-L7 processing and per-flow state — the workloads OpenStack Neutron, VPP, and FD.io target.
- Packet generation and load test rigs —
pktgen-dpdk, TRex, MoonGen all push line-rate small-packet traffic. - Carrier-grade routers and BNGs built on VPP (which uses DPDK as the I/O layer).
- High-frequency trading appliances where median latency matters more than throughput.
When eBPF/XDP is enough
For most “I want to filter or load-balance at line rate” cases, XDP is the lower-friction answer:
- XDP runs in-kernel, so the rest of the system still sees the NIC normally
- No hugepages, no IOMMU dance, no CPU isolation required
- tcpdump still works on the same NIC
- Programs are loaded and unloaded without taking the link down
- The downside: XDP cannot easily do per-flow state with full L7 logic; for L7 you eventually want userspace processing, and at that point DPDK starts to make sense
A reasonable rule we apply: if the use case is “drop or pass at L3/L4” or “redirect to one of N backends”, XDP. If the use case is “implement a full BGP-aware software router with firewall and NAT at 40 Gbps”, DPDK.
The procedure
-
Reserve hugepages at boot. Edit
/etc/default/grub:GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=16 \ intel_iommu=on iommu=pt isolcpus=2-5 nohz_full=2-5 rcu_nocbs=2-5"Reboot, confirm:
cat /proc/meminfo | grep Huge -
Install DPDK and tooling.
apt install dpdk dpdk-dev libdpdk-dev dpdk-tools -
Bind a NIC to vfio-pci. Identify by PCI address:
dpdk-devbind.py --status modprobe vfio-pci dpdk-devbind.py -b vfio-pci 0000:01:00.0 -
Run testpmd to validate.
testpmd -l 2,3 -n 4 -- --port-topology=loop -i testpmd> start testpmd> show port stats all -
Reverse the binding when done.
dpdk-devbind.py -b ixgbe 0000:01:00.0The NIC reappears in
ip linkandiptablesworks again.
Operational notes
- Debugging without tcpdump is a culture shock. DPDK provides
rte_pktmbuf_dump, pcap output via--vdev=net_pcap, and integrated tracing via dtrace-like probes. None of it is as fluent as tcpdump for ad-hoc inspection. - NUMA matters acutely. PMD cores, mbuf pools, and NICs must all be on the same NUMA node. Cross-node memory access at line rate is a measurable slowdown.
- Hugepages are not swappable. They are reserved at boot and excluded from the kernel’s page cache. Overcommitting hugepages OOMs the rest of the system.
- Driver/firmware versions matter more than with kernel drivers. Mismatched i40e firmware vs DPDK PMD versions can cause subtle packet drops; pin both.
- VPP, FD.io, and Open vSwitch DPDK offer pre-built integration so you do not write DPDK code from scratch. For most production needs, one of those is the entry point, not the C API.
In the engagements we run, DPDK comes up rarely — it is the right answer for a specific class of client (carrier-grade software routers, very large NFV deployments) and overkill for most. For everything else, the kernel stack with appropriate tuning (conntrack, tc, XDP for the few packet-rate hot paths) covers the territory. When DPDK is the right answer, we run VPP on top so the application layer stays declarative rather than C; the operating model and host setup live in the same library the managed-operations practice maintains.