// HANDS-ON
Dataplane Learning — 21 C Modules
Build a production-grade URL filtering engine from scratch — from a bare config parser all the way to a full DPDK multi-lcore pipeline with Hyperscan pattern matching, Kafka CDR export, and DNS sinkholing. Each module is a standalone C program with downloadable source files.
Phase 1 — C Foundations (Modules 01–07)
Pure C — no external dependencies. Build and run on any Linux box.
Config Parser
INI parser driving all subsystem init
Logger
Thread-safe, level-filtered, dual output
Ring Buffer
Lock-free SPSC — manual rte_ring
Hash Map
Open-addressing — manual rte_hash
Packet Structs
ETH/IP/UDP/TCP header parsing
DNS Parser
Wire format, compression, TCP/UDP
TLS SNI Extractor
ClientHello parsing + Hyperscan offsets
Phase 2 — DPDK Infrastructure (Modules 08–14)
Reference code — requires DPDK. Read alongside the DPDK documentation.
EAL Init
Hugepages, lcore launch, shutdown
Mempool + mbuf
Pre-alloc, layout, HW checksum offload
Port Init
RSS, descriptors, offload capability
Pipeline
RX→worker→TX multi-lcore skeleton
rte_hash CRUD
Bulk lookup, CRC32, NUMA, RW concurrency
Atomic Stats
False sharing, memory ordering, rate calc
NUMA Alloc
Socket placement, rte_malloc, memzone
Phase 3 — SASE Engine (Modules 15–18)
Hyperscan required for 15–17. Module 18 is pure C.
HS Compile
Regex + literal DB, parseFile, serialize
HS Scan
Scratch clone, onMatch, SNI offsets
Policy Lookup
Two-tier hash+HS, multi-group, malicious
DNS Sinkhole
In-place mbuf rewrite, answer injection
Phase 4 — Integration (Modules 19–21)
librdkafka required for 19–20. Module 21 is standalone.