Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fast and Scalable Packet Classification Using Perfect Hash functions Author: Viktor Puš, Jan Korenek Publisher: FPGA’09 Presenter: Yu-Ping Chiang Date:

Similar presentations


Presentation on theme: "Fast and Scalable Packet Classification Using Perfect Hash functions Author: Viktor Puš, Jan Korenek Publisher: FPGA’09 Presenter: Yu-Ping Chiang Date:"— Presentation transcript:

1 Fast and Scalable Packet Classification Using Perfect Hash functions Author: Viktor Puš, Jan Korenek Publisher: FPGA’09 Presenter: Yu-Ping Chiang Date: 2009/04/15

2 Outline Main architecture  Longest Prefix Match  Perfect hash function  Compare to original rule table Results  Performance  Memory requirement

3 Main architecture

4 Longest Prefix Match (1110…)(1000…) 1* 100 packet : (1110…, 1000…) (1*, 100) NOT a rule !! → in fact match R1(1*, *) Add pseudo rule P1(1*, 100) and set target rule to R1

5 Longest Prefix Match

6 Perfect hash function Get index of rule in original rule table  Original rule (R1, R2, R3) : get index of itself.  Pseudo rule (P1, P2, P3) : get index of target rule.  Others : don’t care (will be drop in next stage.).

7 Perfect hash function ( Index )

8 Perfect hash function - Algo. 1. Input: K keys, each associated with a number which it is to be hashed to. 2. Create graph with N=cK vertices, where c>1 3. Pick any two different oridinary hash functions f1, f2 that output values 0…N-1.

9 Perfect hash function - Algo. 4. For each key, compute h1=f1(key), h2=f2(key), draw an edge between vertices h1 and h2 of the graph and associate the desired hash value with that edge. 5. Check if the graph is acyclic. If not, increase c and go to step 2.

10 Perfect hash function - Algo. 6. Associate values to each vertex such that for each edge you can add the values of both its vertices and get the desired value for the edge. This may by done by depth-first search algorithm, because the graph is acyclic. 1 1 0 2 2 2

11 Perfect hash function - Algo. 7. f1, f2 and vertex values now make up the desired function.

12 Compare to original rule table

13 Outline Main architecture  Longest Prefix Match  Perfect hash function  Compare to original rule table Results  Performance  Memory requirement

14 Results - Performance

15 Results – Memory Requirement


Download ppt "Fast and Scalable Packet Classification Using Perfect Hash functions Author: Viktor Puš, Jan Korenek Publisher: FPGA’09 Presenter: Yu-Ping Chiang Date:"

Similar presentations


Ads by Google