• No se han encontrado resultados

II. LOS RELATOS INTERCALADOS

II.2. LOS RELATOS BREVES

II.2.5. EL JUEGO DE PALABRAS EN LOS RELATOS

The Lulea scheme [15] first converts the trie into a complete prefix trie so that each node has either two children or no children. This is achieved with a technique known as leaf pushing in which the information associated with a node is pushed to the children of that node. The resulting trie is expanded with stride lengths of 16, 8, and 8. The expanded trie is represented using three levels of data structures containing bitmaps which can be indexed using the first 16 bits, next 8 bits and the last 8 bits of an IP address prefix. At each level, a set bit indicates that the search either terminates there in which case the next hop information is retrieved or the search continues further so that the pointer to the next level bitmap is retrieved. If the bit is not set then the search terminates there and the next hop associated with the nearest ancestor of the current node is used to forward the packet. The authors use several techniques for reducing the memory requirement. This algorithm, although faster than the basic radix tree, does not match the performance of TCAM. It is primarily geared towards a software implementation. The incremental updates to the prefix set are difficult due to the trie expansion involved in the algorithm.

Waldvogel et. al. introduced a technique based on hash tables that performs a binary search on prefix lengths [40]. Assume that the prefixes of length i are kept in hash table i. For IPv4, we would have 32 hash tables in the worst case. Given the range of prefix lengths, the algorithm looks up the hash table of the middle prefix length (Hash table 16 for IPv4) with the corresponding number of IP prefix bits. If the match is found, the binary search continues in the hash tables on the right half, otherwise, it continues in the left half. Thus, if a match is found in hash table 16, then hash table 24 is probed with 24 prefix bits. Otherwise, hash table 8 is probed with 8 prefix bits. However, this scheme won’t work without modification to the prefix set. For instance, let’s assume that the longest matching prefix of an IP address is 9-bits long, 100110100*. When the search is conducted on the left half of the prefix lengths, the hash table 8 would be looked up. To get the match for our 9-bit prefix, we must get a match for the 8-bit prefix so that the search is guided to the hash tables between 8 and 15. If there is no prefix 10011010* in hash table 8, then it will be a mismatch and the result will be incorrect. Hence, a prefix 10011010*, called marker, is artificially added to the hash table 8 in order to preserve the correctness. By adding markers

to the hash tables whenever necessary, the correct longest matching can always be found. Binary search on prefix length requires log2W hash table accesses in the worst case which is 5 for IPv4 and 7 for IPv6. Although attractive from the worst case performance perspective, this scheme makes the incremental updates to the data structure difficult due to the requirement of markers. The average performance does not match the performance of a TCAM.

Srinivasan et. al. introduced another technique called Controlled Prefix Expansion which is similar to the Lulea scheme [32]. All the prefixes are converted into a set of fixed length prefixes by expanding a shorter prefix to multiple longer prefixes of a predetermined length. Consider a 2-bit prefix 10* which can be expanded to a set of 4-bit prefixes 1000*, 1001*, 1010*, 1011*. Specific prefix lengths can be picked and any prefix with shorter length can be expanded to multiple prefixes of the next predetermined longer length. The authors give an algorithm to pick the most optimal prefix lengths to expand the prefix sets. After the expansion, various LPM algorithms can be used. The authors illustrate how a multi-bit trie can be used, similar to the one used in Lulea. Binary search on prefix length algorithm can also be used. Due to the reduction in the distinct prefix lengths, the search speed improves.

Using a multi-bit trie, multiple bits of an IP address can be matched at a time. Each node in a multi-bit trie represents a set of nodes in the radix trie. The tree bitmap technique proposed by Eatherton et. al. uses a compressed representation of multi-bit trie [18]. A radix trie of depth i has 2i−1 nodes and 2ichildren. Eatherton’s technique

uses two bit maps to encode the 2i− 1 nodes of a radix trie in a single super-node: an

“internal bitmap” that contains 2i− 1 bits and an “external bitmap” containing 2i

bits. A bit in the internal bitmap indicates if the corresponding node in the radix trie represents a valid prefix. A bit in the external bitmap indicates if the corresponding child exists. If a child exists then the search continues. All the children super-nodes of each super-node are arranged in consecutive memory slots and only the pointer to the first child is maintained. Using the knowledge from the external bitmap, the exact child super-node can be accessed by adding the corresponding offset in the base pointer. This technique saves a significant amount of memory but complicates the memory management and incremental updates. Overall, the compressed multi-bit trie is a fast and memory efficient technique but can not beat the performance of TCAM due to multiple dependent memory accesses for each lookup.

Counting Bloom Filter W

Arbitration for

bit W−1

Counting Bloom Filter 1 Counting Bloom Filter 2

Bloom Filter W

Bloom Filter 2

Bloom Filter 1

Lookup Result

off−chip memory Unified Hash Table for all Prefixes

bit W bit 1

Hash Table Access

IP Address

Add / Delete Item

MatchVector

Control Processor

Figure 3.1: Basic configuration of Longest Prefix Matching using Bloom filters.