Introduction
Regular Expression Matching (REM) is a critical component of Deep Packet Inspection (DPI) systems, such as firewalls and intrusion detection systems (IDS). As network speeds approach 100 Gbps, traditional REM engines face significant scalability challenges. Deterministic Finite Automata (DFA) provide $O(1)$ matching time per byte but suffer from exponential state explosion. Conversely, Nondeterministic Finite Automata (NFA) are memory-efficient but computationally intensive, often failing to meet line-rate requirements.
XAV is a hybrid FPGA-CPU engine designed to overcome these limitations. It achieves a throughput of 75 Gbps for complex rule-sets like Snort by utilizing a novel "anchor DFA" approach combined with pre-filtering and regex decomposition.
The XAV Architecture
The core of XAV is a three-stage matching pipeline that balances the strengths of hardware and software.
- Xor Filter (Pre-filtering): To avoid the overhead of starting a matching thread at every byte, an Xor filter identifies specific string fragments. The subsequent stages are only triggered upon a potential match.
- Anchor DFA: Traditional DFAs explode in size because they must handle matches starting at any position. XAV employs "anchored" DFAs that only match patterns starting at the beginning of a sequence (the
^anchor), significantly reducing the state space. - Verification Engine: Complex regex components that are difficult to implement efficiently in hardware are offloaded to a CPU-based verification engine.
Regex Decomposition and Hybrid Execution
A key innovation in XAV is the decomposition of complex regular expressions into hardware-friendly and software-friendly components.
Regular expressions are split into:
- lsRE (Length-restricted): Simple fragments handled by the FPGA-based Anchor DFA.
- lusRE (Length-unrestricted): Complex parts (e.g.,
.*or large counters) that could lead to long-running threads. These are processed by the CPU.
By implementing the high-frequency "simple" logic on an Intel Stratix 10 FPGA and reserving the CPU for rare, complex verification, XAV maintains high throughput while supporting a wide range of rules.
Performance Evaluation
XAV was evaluated using industry-standard benchmarks, including Snort, ANMLZoo, and the Regex Benchmark Suite. Testing was conducted against both random and realistic campus traffic.
Key Results:
- Throughput: XAV achieved up to 75 Gbps on the Snort rule-set, outperforming the industry-standard Hyperscan software engine by two orders of magnitude.
- Efficiency: XAV provides 2.5x better performance than state-of-the-art FPGA schemes using equivalent hardware resources.
- Scalability: Unlike DPUs (e.g., Nvidia Bluefield-2), which saw performance drops to 26 Gbps under Snort's complexity, XAV maintained line-rate performance.
- Memory Optimization: A hybrid compression scheme for State Transition Tables (STT) reduced memory requirements by up to 98%.
Conclusion
XAV demonstrates that a hybrid approach—combining anchored automata on FPGAs with CPU-based verification—can effectively eliminate state explosion in high-speed REM. While currently limited by PCIe bandwidth and a small subset of rules lacking "friendly" fragments, XAV sets a new benchmark for 100 Gbps network security processing. Future work will focus on tighter hardware-software integration to further push performance boundaries.
Summary updated