Binary Search Tree with Compressed Hash Tables for Longest Prefix Match
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modern internet routers face bottlenecks in routing throughput due to the complexity and high power consumption of circuitry required for implementing longest prefix match (LPM) in large routing tables, which is exacerbated by increasing internet traffic and demands for reduced latency.
Innovation Solution
Representing the routing table as a binary search tree with hash tables that compress entries by sharing mask values among prefixes, allowing for efficient traversal and processing of data packets by extracting keys and performing hash lookups to find matching entries and action codes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If hardware-based LPM solutions are implemented, then routing throughput is improved, but device complexity and power consumption increase
Solution Approach 1:
The routing table is segmented into multiple levels of binary search trees, where each level handles a specific range of prefix lengths. This segmentation allows the complex LPM problem to be broken down into smaller, more manageable sub-problems, reducing the complexity of individual hardware circuits while maintaining overall routing throughput.
Solution Approach 2:
The invention introduces a hierarchical dimension to the LPM search process by organizing the binary search tree into multiple levels. Instead of a single flat search structure, packets traverse through levels sequentially, with each level performing a simplified match on a portion of the destination address. This dimensional transformation reduces the complexity of individual match circuits.
2Measurement precision
If larger routing tables are used to accommodate more prefixes, then routing accuracy is improved, but memory consumption and search time increase
Solution Approach 1:
The routing table is divided into multiple binary search trees organized in levels, with each tree handling a specific range of prefix lengths. This segmentation allows the large routing table to be distributed across multiple smaller structures, reducing the memory burden on any single structure while maintaining comprehensive prefix coverage for accurate routing.
Solution Approach 2:
The binary search tree structure allows dynamic adaptation to different routing table sizes and prefix distributions. The tree can be reconfigured or pruned based on the actual routing requirements, optimizing memory usage while maintaining routing accuracy for the specific network topology and prefix set.
3Measurement precision
If more markers are added to binary search tree to ensure correct LPM results, then routing accuracy is improved, but device complexity increases
Solution Approach 1:
The search space is segmented across multiple levels, with each level responsible for a specific range of prefix lengths. This segmentation reduces the number of markers needed at each individual level while maintaining overall LPM accuracy, as the multi-level structure naturally provides the necessary search granularity without requiring excessive markers in any single tree.
Solution Approach 2:
Instead of implementing a single comprehensive binary search tree with all possible markers, the invention uses multiple levels where each level performs a partial match on a portion of the destination address. This partial action approach achieves the necessary LPM accuracy through cumulative matching across levels rather than requiring complete matching in a single complex structure.
Data Source
AI summary
A method for packet processing includes representing a routing table for a network as a binary search tree of address prefixes ordered by prefix lengths. For each node j in the binary search tree, a respective hash table is stored, including entries representing the address prefixes of length Lj. Each address prefix includes Lj-c most significant bits (MSB) and c least significant bits (LSB), and each entry in the respective hash table includes a matching value corresponding to the Lj-c MSB of one or more of the address prefixes and one or more action codes indexed by the c LSB of the one or more of the address prefixes. Upon receiving from the network a data packet having a destination address, the binary search tree is traversed to find a longest prefix match by performing, at each node j, a hash lookup in the respective hash table.


