For this reason, it is important to configure a value as large as possible for
object-cache. The lookup table is a hashtable used to retrieve forwarding information for flows and is essential for monitoring and flow aging. The code that creates the flow lookup table is in the function
process_packet(), in the file
The size of the table supported is also important for performance and depends on future testing results, but as a preliminary estimate this example sets the size to store half a million flow hashes. A flow hash is the output of some hash function, with the input being a destination address and destination port in this case.
The hash function output can be thought of in terms of number of bits; this measure is commonly called the width. The wider the output of the hash function is, the larger the table must be, since this table will map (index) a hash output to a table entry. In this example, an entry can contain information for multiple existing flows (also called flow entries).
There is a tradeoff between the table size and the speed of a lookup. This is caused by a larger table (and hash output) having fewer collisions, since the hash function input is wider than its output. When a collision occurs, more than one flow's information goes into a list attached to each table entry. Searching this list for an exact match takes extra time, and the lists can be expected to be shorter when the size of the lookup table is larger (assuming the hash function provides an output with uniform distribution over the output range).
init_packet_loops(), in the file
The aging manager is scheduled to run every 15 seconds. It iterates over the lookup table entries (known flows) and removes entries in the table when they are older than 60 seconds. To do this, it compares the current time to the flow expiration time which was last updated when a packet matching the flow passed through the system.
Monitoring and Mirroring Data