Small Forwarding Tables for Fast Routing Lookup Data

Small Forwarding Tables for Fast Routing Lookup Data : 2014. 04. 13 1

Design goals and parameters The Small Forwarding Table(SFT), In general, The small forwarding table is the compressed version of a 16 -8 -8 trie. Since SFT organizes the first 16 levels of trie in a 12 -4 hierarchical Fashion, it can be also classified as a 12 -4 -8 -8 trie. When designing the data structure used in the forwarding table, The primary goal was to minimize lookup time. To reach that goal, we simultaneously minimize two parameters. l The number of memory accesses required during lookup. l The size of the data structure. 2

The data structure for level 1 (1/10) The forwarding table is essentially tree with three levels. The forwarding table is a representation of the binary tree spanned by all routing entries. This is called the prefix tree. it’s require that the prefix tree is complete. 3

The data structure for level 1 (2/10) Nodes with a single child must be expanded to have two Children, the children added in this way are always leaves, and Their next-hop is the same as the next-hop of the closest ancestor With next hop information, or the “undefined” next-hop if no such ancestor exists. 4

The data structure for level 1 (3/10) � Level 1 of the data structure Image a cut through the prefix tree down to depth 16, the Cut is represented by bit-vector, with one bit per possible node at depth 16, are required fort this. When there is node in the prefix tree at depth 16, the corresponding bit in the vector is set. • Bit is set: prefix continues below the cut, called a root head. • Bit is set: a leaf at depth 16 or less, a genuine head. • Bit is unset. 5

The data structure for level 1 (4/10) Leaf push 6

The data structure for level 1 (5/10) root head: bits 6, 12, 13 Genuine head: bits 0, 4, 7, 8, 14, 15 The bit-vector is divided into bit-mask of length 16. There are 7

The data structure for level 1 (6/10) The head information is encoded in 16 -bit pointers stored consecutively in an array (pointer group). Two bits of each pointer encode what kind of pointer it is, and 14 remaining bits either form an index into the next-hop table or an index into an array containing level two chunks 8

The data structure for level 1 (7/10) � Code word Original 16 -bit array and Base index array (1) The code words consists of a 10 bit value(r 1, r 2, …) and a 6 -bit offset (0, 3, 10, …). (2) After four code words, the offset value might be too large to represent with 6 bits, therefore, a base index is used together with the offset to find a group of pointers. ( length of base index array element is 16 bits. ) 9

The data structure for level 1 (8/10) � Maptable Pointer group 0 1 2 3 4 ……. 10

The data structure for level 1 (9/10) � Maptable a non-zero 2 n-bit bitmask = a combination of two non-zero n-bit bitmasks + 10000000… (one followed by 2 n – 1 zeros). Let a(n) = # of non-zero 2 n-bit bitmasks a(0) = 1 and a(n) = 1 + a(n – 1)2 a(4) + 1 (all zero bitmask) = 678 combinations of 16 -bit bitmasks 11

1111 a(0)=1, bit 1111. 1110 1 1111. 1011 a(1)=2 , 21 bit 1111. 1010 10 1111. 1000 11 1110 2 a(2)=a(1)*a(1)+1, 2 bit 1110. 1011 =4+1=5 1110. 1010 1111 1110. 1000 1110 1011. 1111 1011. 1110 1011 1000 1011. 1010 1011. 1000 3 a(3)=a(2)*a(2)+1, 2 bit 1010. 1111 =5*5+1=26 1010. 1110 1010. 1011 1010. 1000. 1111 1000. 1110 1000. 1011 1000. 1010 1000. 0000 20 678=676+1+1 0000 1000. 0000. 1010 1000. 0000. 1011. . . maptable 0000 1111. 2222 1111. 2222. 3333 1111. 2222. 3344 1111. 2222. 3345. . . 12

The data structure for level 1 (10/10) � Searching: search the first level of the data structure. 13

The data structure for level 2、3 (1/2) Levels two and three of the data structure consist of chunks. A chunk covers a subtree of height 8 and can contain at most 28 = 256 heads. A root head in level 1 and level 2 points to a chunk in level 2 and level 3, respectively. There are three varieties of chunks depending on how many heads the imaginary bit vector contains. When there are l 1 -8 heads, the chunk is sparse and is represented by an array of the 8 -bit indices of the head plus eight 16 -bit pointers. l need to search the array of eight 8 -bit indices sequentially. l 8*8 -bit+8*16 -bit = 24 bytes 14

The data structure for level 2、3 (2/2) n 9 -64 heads, the chunk is dense. It’s represented analogously with level 1, except for the number of base indices. The difference is that only one base index is needed for all 16 code words, because 6 -bits offsets can cover all 64 pointers. A total of 34 bytes are needed. 2 (1 base) + 16*2 (16 codewords) + (9 -64 pointers) l = 34 + 2*(9 to 64) bytes n 65 -256 heads, the chunk is very dense. It’s represented analogously with level 1, 16 codewords and 4 base indices give a total of 40 bytes. l 8 (4 bases) +16*2 (16 codewords) + (65 -256 pointers) l = 40 + 2*(65 to 256) l 15
- Slides: 15