Exact Match Hash Lookup Databases Network Switch Devices
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Hash-based lookup tables in network devices face challenges with collisions, leading to underutilization and inefficiencies due to collisions between different keys that hash to the same value, which affects exact match lookup performance and memory utilization.
Innovation Solution
A method using multiple hash values generated by different hash functions to determine offsets and indices in lookup and forwarding tables, allowing for collision resolution and improved memory utilization by selectively using these values to store and retrieve keys without increasing memory access requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If a hash function is used to implement a lookup table, then the table size is reduced and efficiency is improved, but collisions occur causing some keys to cannot be inserted and lookup performance degrades
Solution Approach 1:
The patent divides the hash table into multiple segments or regions, each managed independently. By segmenting the table, the collision probability within each segment is reduced, allowing more keys to be successfully inserted while maintaining exact match lookup capability. This segmentation approach resolves the contradiction by enabling larger table capacity without sacrificing reliability.
Solution Approach 2:
The patent introduces additional dimensions to the hash table structure, such as multiple hash functions or multi-level indexing. This dimensional expansion allows the system to accommodate more keys by distributing them across multiple dimensions, reducing collisions in any single dimension while preserving exact match lookup performance through coordinated access across dimensions.
2Quantity of substance
If multiple hash functions are used to resolve collisions, then memory utilization improves, but the complexity of the lookup process increases
Solution Approach 1:
The patent pre-computes and stores hash values for multiple hash functions during the table population phase. This preliminary action eliminates the need to compute multiple hash values during lookup, as the pre-computed values are already stored and can be directly used for collision resolution. This resolves the contradiction by improving memory utilization through multi-hash functions while avoiding the complexity penalty during the critical lookup operation.
Solution Approach 2:
The patent creates and maintains multiple copies of hash values corresponding to different hash functions within the table structure. These copied hash values are stored alongside the key-data pairs, enabling efficient collision resolution without re-computation. This copying strategy improves memory utilization by enabling better key distribution while keeping the lookup process simple by directly comparing pre-stored hash copies.
Data Source
AI summary
In a method for forwarding packets in a network device a plurality of hash values is generated based on a lookup key. The plurality of hash values includes at least a first hash value generated using a first hash function, a second hash value generated using a second hash function and a third hash value generated using a third hash function. The third hash function is different from the first hash function and the second hash function. An entry in a lookup table is selected using the first hash value and the second hash value, wherein the selected entry includes an offset for the lookup key. A forwarding entry in a forwarding table is selected using the third hash value and the offset for the lookup key, wherein the forwarding entry corresponds to the lookup key. The packet is forwarded to one or more ports of the network device using the selected forwarding entry.


