This describes how the flow table in a SmartNIC is managed.
Flow table entry collision
The SmartNIC flow table is managed using the SHA-1 hash algorithm. When an application programs a SmartNIC with new flows, a 128-bit hash value is calculated/generated based on the flow information of each flow. A part of the hash value is used as an index in the flow table to identify and look up a flow. Although the probability is very low, two different flows can be mapped into the same entry in the flow table. If a flow table entry collision occurs, the SmartNIC tries to move existing entries to other locations to make room for the new flow (cuckoo hashing). The SmartNIC tries this operation a number of times. If it still fails to find an available entry in the flow table, it returns an error. The following figure shows flow learning rates and learning failure rates due to flow table entry collisions. The linear graph in orange shows learning failure rates in percentage and the area graph in blue shows learning rate in million flows per second. As shown in the figure, the flow table entry collisions start to occur when over 140 million flows are programmed. When the number of flows programmed increases beyond about 140 million flows, then the number of attempts to find an available entry increases exponentially and the learning failure rate rises dramatically. As a result, the time to program new flows increases exponentially and the learning rate drops significantly.