Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: IEEE/ACM.

Similar presentations


Presentation on theme: "1 Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: IEEE/ACM."— Presentation transcript:

1 1 Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: IEEE/ACM TRANSACTIONS ON NETWORKING 2011 Presenter: Li-Hsien, Hsu Data: 11/9/2011

2 2 Outline  Introduction  Bit Weaving  Bit swapping  Partial list minimization  Bit merging  Bit recovery  Experimental Results

3 Introduction TCAM-Based Packet Classification  Ternary Content Addressable Memory (TCAM)  Traditional memory: input is the index, output is the entry  TCAM: input is the entry, output the index (or the entry)  Every bit is 0, 1, or * (don’t care)  Search is performed against all entries in parallel and the first result (i.e., the index or the entry) is returned  Widely deployed in routers 3

4 Key issues of TCAM-Based Packet Classification Hardware Limitations  Space  Limited capacity  Larger chips are slower  Power Consumption  Affects the power budget  Cost  TCAMs cost more than NP Application Demands  Classifier size  Growing  Range expansion  Ranges to multiple prefixes  Source and Destination Ports  [1,65534] = 30 prefixes  30 * 30 = 900 rules Research Goal: minimize the classifier’s size in TCAM 4

5 Limitations of Prior Art Prior work produces prefix fields Bit Weaving produces ternary fields F1F2Decision 11** Accept 01**11**Accept 11**01**Accept 01** Accept F1F2Decision *1** Accept ACL Prior Work Bit Weaving 5

6 Bit Weaving - Overview  Weave 織 ; 編, 編制  Basic idea  adjacent TCAM entries that have the same decision and have a hamming distance = 1 can be merged into one entry by replacing the bit in question with * 6

7 Bit Weaving - Bit swapping  Step 1: cut a rule list into a series of partitions  Step 2: permutate bit columns to produce reordered rule predicates for forming one-dimensional prefix rules within each partition 7

8 Bit Weaving - Bit swapping  Step 1: cut a rule list into a series of partitions  Step 2: permutate bit columns to produce reordered rule predicates for forming one-dimensional prefix rules within each partition 8

9 Bit Weaving - Bit swapping  eg. (step 1) 9 Field 1Field 2Decision *1000001 **1000101 **1001001 **1001101 *1010001 **1100001 **1110001 01******2 1*******2 ********0 {1,2} {3,4,5,6,7,8} {3,4,5,6,7,8} {1,2} (cross! → different partitions) {3,4,5,6,7,8} {2,3,4,5,6,7,8} {2,3,4,5,6,7,8} {3,4,5,6,7,8} (enclosed by the lower pattern → same partition) Partition 1 Partition 2 12345678

10 Bit Weaving - Bit swapping  Step 1: cut a rule list into a series of partitions  Step 2: permutate bit columns to produce reordered rule predicates for forming one-dimensional prefix rules within each partition 10

11 Bit Weaving - Bit swapping  eg. (step 2) 11 Field 1Field 2Decision *1000001 **1000101 **1001001 **1001101 *1010001 **1100001 **1110001 01******2 1*******2 ********0 Partition 1 Partition 2 3 4 5 6 7 8 1 2 1 2 3 4 5 6 7 8 3 4 5 6 7 8 1 2 7 7 0 0 0 0 0 0 → 0 0 0 0 0 0 7 7 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 3 3 3 3 3 → 1 2 3 3 3 3 3 3 12345678

12 Bit Weaving - Bit swapping  eg. (step 2) 12 FieldDecision 100000**1 100010**1 100100**1 100110**1 101000**1 110000**1 111000**1 FieldDecision 01******2 1*******2 ********0

13 Bit Weaving - Overview  Weave 織 ; 編, 編制  Basic idea  adjacent TCAM entries that have the same decision and have a hamming distance = 1 can be merged into one entry by replacing the bit in question with * 13

14 Partial Prefix Minimization(TCAM Razor) FieldDecision 100000**accept 100010**accept 100100**accept 100110**accept 101000**accept 110000**accept 111000**accept FieldDecision 01******deny w log 1*******deny w log ********deny FieldDecision 100000**accept 100010**accept 100100**accept 100110**accept 101000**accept 110000**accept 111000**accept FieldDecision 00******deny ********deny w log minimize 14

15 Bit Weaving - Overview  Weave 織 ; 編, 編制  Basic idea  adjacent TCAM entries that have the same decision and have a hamming distance = 1 can be merged into one entry by replacing the bit in question with * 15

16 Bit Weaving - Bit merging  The fundamental idea behind bit merging is to repeatedly find two ternary strings within a partition that differ only in one bit and replace them with a single ternary string where the differing bit is * 16

17 Bit Weaving - Overview  Weave 織 ; 編, 編制  Basic idea  adjacent TCAM entries that have the same decision and have a hamming distance = 1 can be merged into one entry by replacing the bit in question with * 17

18 Bit Recovery FieldDecision 100**0**accept 1**010**accept FieldDecision 00******deny ********deny w log Field 1Field 2Decision **100**0accept **1**010accept Field 1Field 2Decision 00******deny ********deny w log  Swap the bit order back to the original order  Recreate the fields  Concatenate partitions into a new classifier 18

19 Bit Weaving - Overview  Weave 織 ; 編, 編制  Basic idea  adjacent TCAM entries that have the same decision and have a hamming distance = 1 can be merged into one entry by replacing the bit in question with * 19

20 Idea: Bit Swapping  Prefix fields  Shuffle columns  Compress  Unshuffle 11** Accept 01**11**Accept 11**01**Accept 01** Accept 11111111** 11011101** 11101110** 11001100** 11**11**** *1** Accept 20

21 Experimental Results(1/4)  RL denotes a set of 25 real-world packet classifiers  Subscript a and b denotes where the expansion ratio of direct expansion 40 in RLb  |RLa| = 12 and |RLb| = 13  SYN denotes a set of 150 synthetic classifiers with the number of rules ranging from 250 to 8000  Generate a set of classifiers by replacing the decision of every rule in each classifier by a unique decision and denote them with subscript u subscript U  TRS: a set of 490 classifiers produced by Taylor and Turner’s Classbench 21

22 Experimental Results(2/4)  # of rules produced by applying algorithm on the classifier / # of rules produced by applying direct prefix expansion on the classifier  the less, the better 22

23 Experimental Results(3/4)  # of rules produced by applying algorithm on the classifier / # of rules of the classifier  the less, the better 23

24 Experimental Results(4/4) 24  How much additional compression is achieved when adding A’(applying BW to other schemes) to A (other schemes)  the more, the better


Download ppt "1 Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: IEEE/ACM."

Similar presentations


Ads by Google