Abstract
Modern programmable switches face a significant challenge in scaling IP lookup to accommodate the growing global routing table. While Ternary Content Addressable Memory (TCAM) is ideal for Longest Prefix Match (LPM) operations, its high cost and power consumption limit its availability on-chip. We present MashUp, an architecture that "tiles" trie-based data structures into fixed-size TCAM blocks. By integrating strategic tree splitting, "node hybridization"—selectively utilizing SRAM for prefix expansion—and tagging to reduce internal fragmentation, MashUp achieves up to a 7.5X reduction in memory usage. This allows commodity switches to support massive backbone routing tables that would otherwise exceed their hardware constraints.
Introduction
Internet routers must perform a Longest Prefix Match (LPM) for every incoming packet to determine its destination. Historically, the industry has relied on TCAM because it can search all entries in a single clock cycle and supports wildcard bits. However, TCAM is expensive, requiring significantly more transistors per bit than standard SRAM. As IPv4 routing tables approach one million entries and IPv6 deployment accelerates, the fixed-size TCAM "tiles" in modern reconfigurable chips, such as Intel’s Tofino-3, have become a bottleneck, often proving too small to hold a full backbone routing table using traditional methods.
The MashUp Architecture
MashUp addresses these constraints through a hardware-aware co-design that optimizes how trie structures are mapped to physical memory blocks.
The core components of MashUp include:
- Tiling Trees: Instead of one giant table, MashUp breaks the IP prefix trie into subtrees sized to fit specific hardware "grains" (e.g., 44 bits wide by 512 entries deep).
- Lean Levels: MashUp identifies depths in the trie where branching is naturally minimal to place pointers, minimizing the overhead required to link subtrees.
- Tagging (Super-tables): To combat internal fragmentation, multiple logical tables are packed into a single physical TCAM block. A unique "tag" is prefixed to the search key to disambiguate which logical table is being searched.
- Node Hybridization: This technique swaps expensive TCAM for cheaper SRAM. MashUp identifies subtrees where prefixes can be "expanded" to a fixed length without excessive memory growth. These are moved to SRAM, reserving TCAM for the "heavy" parts of the trie.
Evaluation and Results
The researchers evaluated MashUp using real-world BGP routing tables (AS131072 for IPv6 and AS65000 for IPv4) modeled against the constraints of the Tofino-3 silicon.
- IPv6 Performance: Tiling alone provided a 2X reduction in TCAM bits, which increased to a 4.5X reduction when adding node hybridization.
- IPv4 Breakthrough: For a 900,000-entry database, MashUp with hybridization achieved a 7.5X reduction in memory usage.
- Hardware Feasibility: A standard Tofino-3 chip has 384 TCAM blocks. While a monolithic TCAM would require ~1,762 blocks to hold the current IPv4 backbone, MashUp fits that same database into just 235 blocks, leaving ample room for other switch functions.
Discussion and Limitations
While MashUp significantly improves memory efficiency, it introduces specific trade-offs. Increasing the number of trie levels to save memory can lead to deeper pipelines, potentially impacting latency or exceeding the physical stage limits of the switch. Additionally, node hybridization increases the complexity of routing table updates compared to standard TCAM writes. Future work aims to develop a more robust theory for data structures residing in hybrid SRAM/TCAM memory hierarchies.
Conclusion
MashUp demonstrates that by considering the physical "grain size" of memory during data structure design, it is possible to shoehorn massive routing databases into existing hardware. This hardware-algorithm co-design is essential for the continued scalability of the internet's core routing infrastructure.
Summary updated