efficient multidimensional packet classification with fast updates

47
Efficient Multidimensional Packet Classification with Fast Updates Author: Yeim-Kuan Chang Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009 Presenter: Chen-Yu Chang Date: 2009/3/17

Upload: marcie

Post on 05-Jan-2016

31 views

Category:

Documents


0 download

DESCRIPTION

Efficient Multidimensional Packet Classification with Fast Updates. Author: Yeim-Kuan Chang Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009 Presenter: Chen-Yu Chang Date: 2009/3/17. Outline. One-Dimensional Packet Classification - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Efficient Multidimensional Packet Classification with Fast Updates

Efficient Multidimensional Packet Classification with Fast UpdatesAuthor: Yeim-Kuan Chang

Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Presenter: Chen-Yu ChangDate: 2009/3/17

Page 2: Efficient Multidimensional Packet Classification with Fast Updates

Outline

One-Dimensional Packet Classification

Multidimensional Packet Classification

Performance Evaluation

Page 3: Efficient Multidimensional Packet Classification with Fast Updates

One-Dimensional Packet Classification

1. Proposed Binary Search for Prefixes Simple k-Bit Segmentation Table k-Bit Segmentation Table and k_Set Simple k_Set

2. Proposed Binary Search for Ranges Simple k-Bit Segmentation Table k-Bit Segmentation Table and k_Set Simple k_Set

Page 4: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Prefixes(1/6) Definition 1:

The inequality 0 < * < 1 is used to compare two prefixes in ternary format.

Definition 2: For a prefix of length i, bW-1, … , bW-i , where bj = 0 or 1 for W-1 > j > W-i, its binary representation is bW-1, … , bW-i 10, … ,0with W-i trailing zeros.

Ex: 0000-0*** can be represented as 0000-0100-0.

Page 5: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Prefixes(2/6) Ex: Dst = 00010

C → D → no prefix match

we generate some auxiliary prefixes that inherit the routing information of th original LPM (e.g., B) and place them at the locations where the binary search operations can find them.

Page 6: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Prefixes(3/6) We use a two-step method to construct the

expansion list consisting of the sorted original and auxiliary prefixes.

First : To construct the hierarchical list.

Page 7: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Prefixes(4/6) Second : Called the Expansion_traversal() function.

Page 8: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Prefixes(5/6) Ex : B1 < D < B2 < C < B3

B1 = LCA( Min (B), D ), B2 = LCA( D, C), B3 = LCA( C, Max (B) ).

The worst-case number of prefixes in the expansion list is less than 2N for a routing table of N prefixes.

Page 9: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Prefixes(6/6) The binary search algorithm on the expansion list

is illustrated as follow.

Page 10: Efficient Multidimensional Packet Classification with Fast Updates

Discuss(1/2)

The differences between BPS and BRS[15]: Each prefix is identified as an individual entity instead of as th

e two endpoints for a range in BRS.

Only one port information is associated with each prefix in BPS while two ports such as “> ” and “=” ports are associated with each endpoint in BRS.

Unlike BRS, the interval not covered by any original prefix will not be stored in the expansion list of BPS.

Therefore, the size of the expansion list in BPS will be smaller than the size of the endpoint list in BRS.

Page 11: Efficient Multidimensional Packet Classification with Fast Updates

Discuss(2/2)

Page 12: Efficient Multidimensional Packet Classification with Fast Updates

Simple k-Bit Segmentation Table

This k-bit segmentation table divides the W-bit address space into 2k segments of 2W-k addresses.

Each element in k-bit segmentation table contains two fields, namely, the default port of the segment and the pointer.

When the update operations are needed, each element needs one more field, called the enclosure list. The port of the longest prefix in the enclosure list is stored in the default port field of the segment.

Page 13: Efficient Multidimensional Packet Classification with Fast Updates

k-Bit Segmentation Table and k_Set(1/2)

The original prefixes of lengths shorter than k bits are not duplicated in the enclosure list of the k-bit segmentation table. Instead, they are placed in an additional subset, called k_Set.

The expansion list constructed from the prefixes in k_Set is also needed.

Since either the segment size or k_Set size is much smaller than the original prefix set, the update performance will be greatly improved.

Page 14: Efficient Multidimensional Packet Classification with Fast Updates

k-Bit Segmentation Table and k_Set(2/2)

We can reuse the idea of the segmentation table to further reduce the search space in the k_Set.

Since there is no prefix of length shorter than 8 in the real routing tables, the best choice of l is 8.

Page 15: Efficient Multidimensional Packet Classification with Fast Updates

Simple k_Set

In this approach, the k-bit segmentation table does not physically exist.

The original prefixes of lengths shorter than k are placed into the k_Set. Other prefixes are placed into a single subset called the main_Set.

Page 16: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Ranges(1/3) How to define the endpoints of a range has a strong re

lationship to BRS performance.

In this paper, we propose a BRS based on a different endpoint definition (called BRS_Int) as in [4]. Where each new endpoint is associated with only one port.

Page 17: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Ranges(2/3) Definition 4: The two integer endpoints of a range [L,U] are defined as L - 1 and

U when L != 0, but only one endpoint U is defined when L = 0.

Basically, the search determines two cases where Dst <= E[0].endpoint (matched E[0].port) and

E[i].endpoint < Dst < E[i+1].endpoint, for i > 0 (matched E[i+1].port).

Page 18: Efficient Multidimensional Packet Classification with Fast Updates

Proposed Binary Search for Ranges(3/3)

Page 19: Efficient Multidimensional Packet Classification with Fast Updates

Simple k-Bit Segmentation Table

An array of 2k elements is used as the k-bit segmentation table.

If a range overlaps with any part of the address space of a segment, it is stored in the range subset of that segment.

For each nonempty segment, the proposed BRS (BRS_Int) is performed.

Page 20: Efficient Multidimensional Packet Classification with Fast Updates

k-Bit Segmentation Table and k_Set

The range overlapped with at least three segments is placed into the k_Set; otherwise, it will be placed into the segments with which it overlaps.

The update process for a range R is limited to the segment that completely covers R, the segments partially overlapped with R, or the k_Set.

Page 21: Efficient Multidimensional Packet Classification with Fast Updates

Simple k_Set

The k-bit segmentation table does not physically exist.

The ranges that completely cover any segment or the ranges that overlap with at most two segments are placed into the k_Set. Other ranges are placed into the main_Set.

Page 22: Efficient Multidimensional Packet Classification with Fast Updates

Outline

One-Dimensional Packet Classification

Multidimensional Packet Classification

Performance Evaluation

Page 23: Efficient Multidimensional Packet Classification with Fast Updates

Multidimensional Packet Classification

1. Hierarchical Expansion List

2. Optimizations List Sharing Sequential Search Hierarchical k-Bit Segmentation Table d-Dimensional k1 x … x kd -Bit Segmentation Table

3. Complexity

Page 24: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical Expansion List(1/4)

The basic data structure proposed in this paper for the multidimensional PC is a hierarchical expansion list of BPS and BRS _Int.

The hierarchical data structure is built as follows: 1. Build the F1 hierarchical list based on the F1 field

values of the rules.

Page 25: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical Expansion List(1/4)

2. Push all subrules (F2 , . . . , Fd) associated with the elements of F1 hierarchical list in higher levels to their children in lower levels. We call this operation the rule pushing.

Page 26: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical Expansion List(3/4)

3. Perform an expansion traversal in the F1 hierarchical list to construct the F1 expansion list. Now, each element of the F1 expansion list contains a number of (d-1) -dimensional subrules (F2 , . . . , Fd) .

4. Continue steps 1, 2, and 3 for each dimension except for the rule pushing operation (step 2) which is not required for the last dimension.

Page 27: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical Expansion List(4/4) The complete multidimensional packet classification

algorithm Proposed_PC_Algorithm() is illustrated as follow:

The output of Proposed_PC_Algorithm() is a set of matched rules.

Page 28: Efficient Multidimensional Packet Classification with Fast Updates

List Sharing and Sequential Search

List sharing

Sequential SearchIf the number of subrules left to be matched in a node of the hierarchical list is less than a predefined threshold, it is reasonable to perform a sequential search

Page 29: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical k-Bit Segmentation Table (1/4)

Assume k=2, We first construct the F1 expansion list.

We have two options to construct the F2 expansion lists: with or without rule duplication.

Page 30: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical k-Bit Segmentation Table (2/4)

Option with rule duplication If any rule in k_Set covers a rule in main_Set, its (d-1) -dimension

al subrule is duplicated in the main_Set.

Page 31: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical k-Bit Segmentation Table (3/4)

Option without rule duplication As a result, the (d-1) -dimensional subrule set pointed to by an

y element in the F1 expansion list becomes smaller than the original one.

However, we need to search both the main_Set and the k_Set in each level of the hierarchical expansion lists. The search speed may be worse than the original one.

if the depth of the hierarchical expansion list is not high, this approach may be a good choice.

Page 32: Efficient Multidimensional Packet Classification with Fast Updates

Hierarchical k-Bit Segmentation Table (4/4) Selecting the dimension order

The performance will be different if the dimension order used by the proposed hierarchical scheme is different.

We use the following heuristics to select the best dimension order. Factor1: F1_size is the size of the F1 expansion list.Factor2: max_F2_size is the size of the largest F2 expansion list.

We select the dimension such that the sum of F1_size and max_F2_size is minimal.

Based on our experiments, the memory sizes are much different if the dimension order is different, but the search performance has no significant difference.

Page 33: Efficient Multidimensional Packet Classification with Fast Updates

d-Dimensional k1 x … x kd -Bit Segmentation Table(1/5) In the real 5D classifier, a 2D k1 x k2 -bit segmentation t

able may have been sufficient to divide the total address space into smaller rectangles.

In the proposed 2D k1 x k2 -bit segmentation table, we have four kinds of rule subsets: k1k2_Set, k1_Set, k2_Set, and segment Si,j for i = 0 to 2k1-1 and j = 0 to 2k2-1.

Page 34: Efficient Multidimensional Packet Classification with Fast Updates

d-Dimensional k1 x … x kd -Bit Segmentation Table(2/5) Assume that a rule R covers the area of

[X1 x X2] x [Y1 x Y2]. Then we defined:

thus (i2 –i1 +1) and (j2 – j1 +1) are the number of segments that covered by R in F1 and in F2.

112/22kWXi 112/11

kWXi

112/22kWYj 112/11

kWYj

Page 35: Efficient Multidimensional Packet Classification with Fast Updates

d-Dimensional k1 x … x kd -Bit Segmentation Table(3/5) Rule R is duplicated in the k1k2_Set, k1_Set, k2_Set, or

segments based on the rule placement algorithm along with two parameters c1 and c2 as follow:

1. If (i2 –i1 +1 > c1) and (j2 – j1 +1 > c2), then R is put in the k1k2_Set.

2. If (i2 – i1 + 1 <= c1 x c2) and (j2 – j1 = 0), then R is put in Si,j1

for i = i2, … , i1. Otherwise, if (i2 – i1 + 1 > c1) and (j2 – j1 + 1 <=

c2), then R is put in k1_Setj for j = j2, … , j1.

Page 36: Efficient Multidimensional Packet Classification with Fast Updates

d-Dimensional k1 x … x kd -Bit Segmentation Table(4/5)

3. If (i2 – i1 + 1 = 0) and (j2 – j1 + 1 = 0) , then R is put in Si1,j

for j = j2, … , j1. Otherwise, if (i2 – i1 + 1 <= c1) and (j2 – j1 + 1

> c2),then R is put in k2_Seti for i = i2, … , i1.

4. If (i2 –i1 +1 <= c1) and (j2 – j1 + 1 <= c2) , then R is put in Si,j for i = i2, … , i1 and j = j2, … , j1.

Page 37: Efficient Multidimensional Packet Classification with Fast Updates

d-Dimensional k1 x … x kd -Bit Segmentation Table(5/5) Further improve:

We record the highest priority values of k1_Set, k2_Set, and k1k2_Set independently.

After finding the matched rule with the highest priority value pri in Si, j, if pri is higher than the highest priority among the rules in other subsets, we no longer need to search other subsets.

Page 38: Efficient Multidimensional Packet Classification with Fast Updates

Complexity

We have shown that there are at most 2N -1 elements in the F1 expansion list in [3]. Thus, the worst-case space complexity is S(N, d) = O(Nd).

The worst-case time complexity of a search operation is O(d x log N).

Page 39: Efficient Multidimensional Packet Classification with Fast Updates

Outline

One-Dimensional Packet Classification

Multidimensional Packet Classification

Performance Evaluation

Page 40: Efficient Multidimensional Packet Classification with Fast Updates

Notation Scheme H

The basic hierarchical expansion list.

Scheme H_k(k1, k2) The hierarchical expansion list optimized by the simple k_Set a

pproach without rule duplication.

Scheme H_2k(k1, k2, c1, c2) The hierarchical expansion list optimized by a 2D k x k2 -bit seg

mentation table of the first two prefix fields.

Scheme H_2k_opt(k1, k2, c1, c2) The improved version of H_2k(k1, k2, c1, c2) optimized by the hig

hest priority arrangements.

Page 41: Efficient Multidimensional Packet Classification with Fast Updates

Prefix length distribution

Page 42: Efficient Multidimensional Packet Classification with Fast Updates

Performance Evaluation(1/6)

Page 43: Efficient Multidimensional Packet Classification with Fast Updates

Performance Evaluation(2/6)

Page 44: Efficient Multidimensional Packet Classification with Fast Updates

Performance Evaluation(3/6)

Page 45: Efficient Multidimensional Packet Classification with Fast Updates

Performance Evaluation(4/6)

Page 46: Efficient Multidimensional Packet Classification with Fast Updates

Performance Evaluation(5/6)

Page 47: Efficient Multidimensional Packet Classification with Fast Updates

Performance Evaluation(6/6)