Network Switch Deterministic Longest Prefix Match Lookup Pipeline
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing network switches lack deterministic lookup throughput guarantees due to worst-case multiple lookups in a single memory block, especially when using techniques that conserve memory space by storing only a quotient and using the remainder as an index in hash tables for longest prefix matching.
Innovation Solution
A hardware pipeline with configurable stages that perform sequential longest prefix matching lookups, where each stage corresponds to a unique group of prefix lengths, and memory blocks are dynamically allocated to ensure deterministic throughput without duplicating prefix sets or making assumptions on prefix length distribution, allowing simultaneous access to all active memory blocks for each prefix group.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If a hash table stores only a quotient while using a remainder as an index to reduce memory space, then memory space is conserved, but deterministic lookup throughput guarantees are lost due to worst-case multiple lookups in a single memory block
Solution Approach 1:
The patent segments the forwarding table into multiple memory blocks, where each block stores a subset of prefixes. This segmentation distributes the lookup load across multiple blocks, preventing the worst-case scenario where all lookups concentrate in a single block. The hash function maps different prefixes to different blocks based on the remainder, ensuring balanced distribution and deterministic throughput guarantees while maintaining memory efficiency.
2Quantity of substance
If multiple lookups are performed in a single memory block to conserve memory space, then memory usage is reduced, but lookup time becomes non-deterministic with worst-case scenarios
Solution Approach 1:
The forwarding table is divided into multiple memory blocks, each handling a specific range of prefix lengths or subsets of prefixes. This segmentation ensures that lookups are distributed across blocks rather than concentrated in one block, providing deterministic lookup time by bounding the maximum number of lookups per block while maintaining overall memory efficiency.
Solution Approach 2:
The patent introduces an additional dimension to the hash function by using both the quotient and remainder to determine memory block selection. Instead of using only the remainder as an index within a single block, the system uses the quotient to select which memory block to access, adding a dimensional layer that distributes lookups across multiple blocks and guarantees deterministic performance.
Data Source
AI summary
A network switch that provides deterministic and configurable logic for longest prefix matching (LPM) lookups. For an LPM lookup, a hardware pipeline proceeds sequentially through each prefix length group in decreasing or increasing order of prefix length. Each pipeline stage corresponds to a unique group of one or more prefix lengths. For each group there are 0 or more associated memory blocks (e.g., SRAM) that are active. Which memory blocks are associated with which stage of the pipeline is dynamically configurable. The index of the packet for the current prefix length group is obtained, and all active memory blocks for that prefix group are accessed simultaneously and searched at that index. Once the packet passes through all of the pipeline stages, a longest matched prefix can be used to obtain a next hop address.


