Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Packet classification using diagonal-based tuple space search Department of Computer Science and Information Engineering National Cheng Kung University,

Similar presentations


Presentation on theme: "1 Packet classification using diagonal-based tuple space search Department of Computer Science and Information Engineering National Cheng Kung University,"— Presentation transcript:

1 1 Packet classification using diagonal-based tuple space search Department of Computer Science and Information Engineering National Cheng Kung University, Taiwan R.O.C. Authors: Fu-Yuan Lee *, Shiuhpyng Shieh Publish: Computer Networks 50 (2006) 1831–1842 Present: Chi-Lu Yang ( 楊淇祿 ) Date: October, 30, 2007

2 2 Outline 1. Introduction Problem statement 2. Fundamentals of tuple space Fundamentals of the tuple space search ( 概述, 同 2001 那一篇 ) Proposed tuple space search strategy 3. Diagonal-based tuple space schema 3.1 Create Markers (Fig. and alg.) 3.2 Create Conflict Resolvers—auxiliary filter (Fig. and alg.) 3.3 Perform Pre-computation (Fig. and alg.) 3.4 Find T Imdt on diagonal tuples 4. Tuple space construction and search algorithm 4.1 Construct Tuple Groups 4.2 Binary search scheme 4.3 Others discussion : Dynamic update of filter sets– Insert, Delete 5. Performance evaluation and comparison 6. Conclusions

3 3 Introduction Filters are grouped according to prefix lengths. Tuple Space Framework searches on composition of prefix specifications. The number of tuples is generally much smaller than the number of filters. This approach will: focus on reducing time for classification, extend the tuple space framework to perform hash- based binary search on the tuple space.

4 4 Problem statement A packet p is said to match a filter f if and only if prefixes of the selected packet header fields of p are correspondingly the same as the prefixes specified by f. It’s possible that a packet can match more than one filter. Each filter is associated with a priority. The highest priority is selected as the best matched filter. Packet classification is also the process of determining the best matched filter for the packet p.

5 5 Fundamentals of tuple space T a (i,j), S(T a ), L(T a ), IC(T a ) L(T a ): leave markers S(T a ): pre-compute best filter for F belong toT a (i,j)

6 6 Fundamentals of tuple space (cont.) If no matched filter is found in a tuple T for a given packet, filters mapped to tuples in L(T) can be eliminated from the search space. (Fig.2) If the probe in T returns a match, the search space can be restricted to the filters mapped to the tuples in L(T) and IC(T). ( Fig. 3)

7 7 Define Conflict (overlap) Resolved Definition of Filter conflict resolved: (1) For any pair of (f i, f j ), f i ≠ f j, f i does not overlap with f j. (2) For each pair of overlapped filters (f i, f j ), f i ≠ f j, there must be a filter which is equivalent to the resolver of f i and f j. Definition of Filter-Marker conflict resolved: For any pair of filter and marker (f i,m j ), if f i overlaps with m j then there must be a filter equivalent to the resolver of f j and m j. where f i denotes a filter in F, and m j represents a marker of a filter f j,

8 8 Proposed tuple space search strategy Lemma 1: Given a filter-marker conflict resolved tuple space, if there is a filter or marker in tuple T which can match a given packet p, then filters mapped to tuples in S(T) and IC(T) can be eliminated from the search space.

9 9 Diagonal-based tuple space schema

10 10 3.1 Create Markers A filter f mapped to tuple (i, j). Let s = min(i, j). Then markers of filter f are inserted into tuples from (i, j) to (s, s) and from (s, s) to (1, 1). For example, as shown in Fig. 4, filters mapped to tuple (16, 24) leave markers in tuples (16, 23), (16, 22), (16, 21),..., (16, 17), (16, 16), (15, 15),..., (2, 2), (1, 1).

11 11 3.2 Create Conflict Resolvers — auxiliary filters Step1:Resolvers are created for each pair of overlapped filters in the original filter set F. Step2:a resolver is created if there is a filter overlapp- ed with a marker in a diagonal tuple. Filter f in tuple T(i, j): let i < j. Conflicts only need be examined between f and markers in diagonal tuples from (i+1, i+1) to (j-1, j-1). (Fig.5) 更詳細完整請見 p 1413- -p1415, Fig.6. –Fig11.

12 12 3.2 Create Conflict Resolvers (Cont.) — Alg. Create resolvers for F-M 更詳細完整請 見 Alg.2., p 1417 左上角與 p1418 左上角。

13 13 3.3 Perform Pre-computation Pre-computation is performed for all the filters. (See Alg.4.) including the filters in the original classifier F, markers and resolvers.

14 14 3.4 Find T Imdt on diagonal tuples As proved in Lemma 1: (Fig. 12.) If a matched filter is found in a diagonal tuple, then Region 2 can be eliminated from the search space. If no matched filter is found in a diagonal tuple, then there can’t be any matched filters in L(T). Region 1 can be eliminated from the search space.

15 15 3.4 Find T Imdt on diagonal tuples (Cont.) T Imdt := T(m, m), last matched diagonal tuple : (1) If there is a matched filter found in a diagonal tuple T(m, m), AND (2) If there is no matched filter found in tuple T(m + 1, m + 1), ===> then the remaining search space can be restricted to tuples: {(i, j) | i = m, m <= j <= w or j = m, m<= j <= w}. An example (Fig. 13.) : If T lmdt = (16, 16), then the remaining search space includes tuples: (32, 16), (31, 16), (30, 16)..., (16, 16), (16, 17),..., (16, 31), (16, 32).

16 16 3.4 Find T Imdt on diagonal tuples (Cont.) T lmdt is determined by: (1) a naive search algorithm is to probe all remaining tuples and thus requires O(w) hashes. (2) However, the search time can be further reduced by applying binary search on the remaining tuple. Thus, only O(log(w)) hash probes in total is required. Our improvement is based on observation : All the remaining tuples are either in the same column or row with T lmdt.

17 17 4.1 Construct balanced binary search tree for tuple groups TG(i) - Tuple groups: collection of non- empty tuples in the same column or row. TG(i).col TG(i).row

18 18 4.2 Binary search scheme The diagonal-based tuple space search algorithm: (Alg.5.) (1) First, the algorithm performs binary search to determines T lmdt using balanced binary search tree, diagonal-tuple tree. (2) Next, the search algorithm traverses the row tree and column tree corresponding to the T lmdt. In this way, a best matched filter can be determined in O(log(w)) hash operation.

19 19 Performance evaluation

20 20 Conclusions In this paper, authors proposed a algorithm for packet classification: A binary search algorithm in O(log(w)) hash operations. The memory usage can reach O(n 2 ) in the worst case.


Download ppt "1 Packet classification using diagonal-based tuple space search Department of Computer Science and Information Engineering National Cheng Kung University,"

Similar presentations


Ads by Google