Packet Hash Finishing for Even Port Distribution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The CRC32 hash function fails to produce high-quality hashes for short inputs, leading to uneven distribution of packets across output ports, which can result in overloading or underloading of certain ports in network environments.
Innovation Solution
A physical forwarding element processes packets by dividing the packet header into chunks, hashing these chunks in parallel using multiple processing units, and combining the hashes while optionally performing finishing operations such as accumulating length, multiplying by a prime number, and logical exclusive disjunction to enhance entropy and distribution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the CRC32 hash function is used for short inputs, then computation speed is fast, but hash quality is poor leading to uneven distribution
Solution Approach 1:
The patent divides the short input into multiple smaller segments or chunks, then processes each segment through the CRC32 hash function separately. This segmentation allows the hash function to better distribute the input data, improving hash quality while maintaining computational efficiency. The divided segments are then combined to produce the final hash value.
2Productivity
If CRC32 hashing is performed on short inputs, then processing is quick, but packet distribution becomes uneven across ports
Solution Approach 1:
The patent introduces an additional processing dimension by performing multiple CRC32 hashing operations on divided segments of the input, then combining these results. This multi-dimensional approach transforms the single-hash limitation into a distributed hashing scheme that achieves better uniformity across output ports while maintaining fast processing through parallel segment handling.
3Device complexity
If short inputs are hashed using plain CRC32, then computation is simple and fast, but entropy is insufficient for good distribution
Solution Approach 1:
The patent combines multiple CRC32 hash results from different input segments into a single final hash value. This merging process increases the entropy of the resulting hash by incorporating information from multiple independent hashing operations, while the individual CRC32 operations remain simple and fast, thus maintaining computational simplicity at each step.
Data Source
AI summary
Some embodiments provide a physical forwarding element that hashes portions of packet headers using several novel hashing techniques. The techniques include a novel set of finishing operations that improve the quality of resulting hashes by increasing their distribution and improving their apparent-randomness. In some embodiments, the finishing operation includes at least one of multiplying the hash by a prime number to increase distribution of the bits of the hash, accumulating a length of the portion into the hash, and combining higher bits of the hash with lower bits of the hash in order to increase the entropy of the lower bits of the hash.


