Network Processor Table Lookup Using Hash Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current network processor table lookup methods are inefficient due to lengthy comparison processes and potential hash conflicts, especially when dealing with varying matching byte lengths, which affects processing efficiency and performance.
Innovation Solution
A table creating and lookup method that calculates storage index values based on matching bit lengths and bit values, using partial-mapping or Hash functions to optimize storage and lookup processes, allowing for reduced comparisons by grouping items by matching lengths and using index values for efficient matching.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If the method of comparing bits one by one is used for table lookup, then the matching accuracy is improved, but the number of comparisons increases significantly when the number of matched bits is large
Solution Approach 1:
The patent segments the table lookup process into two stages: first, use hash function to quickly identify candidate entries; second, perform bit-by-bit comparison only on these candidates. This segmentation reduces the number of full comparisons while maintaining matching accuracy.
Solution Approach 2:
The patent performs preliminary hash calculation on the input key before the actual table lookup. This preliminary action filters out non-matching entries, so that the expensive bit-by-bit comparison is only applied to a small subset of candidates, reducing overall lookup time.
2Speed
If the Hash algorithm is used for table lookup, then the lookup speed is improved, but hash conflicts occur and performance is reduced
Solution Approach 1:
The patent uses the hash function as an intermediary step between the input key and the final matching result. The hash function provides a quick initial filter, while the subsequent bit-by-bit comparison acts as a verification mechanism to resolve hash conflicts, ensuring both speed and accuracy.
Solution Approach 2:
The patent applies partial bit-by-bit comparison instead of full comparison for all entries. By comparing bits only for hash-candidate entries, it performs excessive action on a small subset, which maintains reliability while preserving the speed advantage of hash-based lookup.
3Quantity of substance
If the table is designed with multiple memory levels for data storage, then the storage capacity is improved, but the device complexity increases
Solution Approach 1:
The patent organizes table data in a multi-level hierarchical structure where data is distributed across different memory levels. This dimensional organization allows efficient access patterns by leveraging the hierarchy, achieving high storage capacity while managing complexity through structured design.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention relates to the field of network communication. A table creating and lookup method used by a network processor is disclosed, which is used for configuring and matching list items, calculating storage index values according to the matching bit lengths and matching bit values of the list items, and determining storage areas of the list items according to the storage index values; or determining the storage areas according to the matching bit lengths of the list items, and determining storage positions of the list items with the same matching bit length in the same storage area according to the matching bit values. The present invention optimizes the table structure of the network processor, simplifies the table lookup process of the network processor, improves the processing capability of the network processor and has significant effect especially for the tables with unfixed matching byte lengths.