26
Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu , Shijie Zhou , Viktor K. Prasanna Publisher :International Symposium on Computer Architecture and High Performance Computing Presenter : Kai-Hsun Li Date : 2014/12/10 Department of Computer Science and Information Engineering National Cheng Kung University, Taiwan R.O.C.

Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Embed Size (px)

Citation preview

Page 1: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Scalable Many-field Packet Classificationon Multi-core Processors

  Authors : Yun R. Qu , Shijie Zhou , Viktor K. Prasanna  Publisher :International Symposium on Computer Architecture and High

Performance Computing  Presenter : Kai-Hsun Li  Date : 2014/12/10

Department of Computer Science and Information Engineering National Cheng Kung University, Taiwan R.O.C.

Page 2: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Introduction

A recent trend in packet classification is to match a large number of packet header fields.

Another trend in packet classification is to use software-based solutions employing multi-core general purpose processors and virtual machines.

In this paper, propose a decomposition-based packet classification approach.

National Cheng Kung University CSIE Computer & Internet Architecture Lab

2

Page 3: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Related Work

National Cheng Kung University CSIE Computer & Internet Architecture Lab

3

OpenFlow 15-field packet classification rule set

Page 4: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(1/11)

Given a rule set consisting of 15 fields, we present our decomposition-based approach in three phases

•Preprocess

•Search

•Merge

National Cheng Kung University CSIE Computer & Internet Architecture Lab

4

Page 5: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(2/11)

Given a rule set consisting of 15 fields, we present our decomposition-based approach in three phases

•Preprocess

For each of the 15 fields we construct range-tree or hash table for efficient search in that field.

•Search

•Merge

National Cheng Kung University CSIE Computer & Internet Architecture Lab

5

Page 6: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(3/11)- Preprocess(1/3)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

6

Overlapping ranges

Non-overlapping subranges

Rule 1, 3

Rule 2, 4, 5

X0 X2

X1 X3

Rule 1, 3 Rule 1~5 Rule 2, 4, 5X0 X1 X2 X3

Page 7: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(4/11)- Preprocess(2/3)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

7

Rule 1, 3 Rule 1~5 Rule 2, 4, 5

X0 X1 X2 X3

Page 8: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(4/11)- Preprocess(2/3)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

8

Rule 1, 3 Rule 1~5 Rule 2, 4, 5

X0 X1 X2 X3

X0

X1

X2

X3

T0

Page 9: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(5/11)- Preprocess(3/3)-Hash table

National Cheng Kung University CSIE Computer & Internet Architecture Lab

9

Hash key Hash Value

80 1

1704 2

1708 3

59 4

123 5

46 6

Page 10: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(6/11)

Given a rule set consisting of 15 fields, we present our decomposition-based approach in three phases

•Preprocess

•SearchUse range-tree search or Cuckoo hashing for each field, and record the partial matching result of each field in a Bit Vector.

•Merge

National Cheng Kung University CSIE Computer & Internet Architecture Lab

10

Page 11: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(7/11)- Search(1/2)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

11

X2

X1

X0

X3

No match No match

Rule 1,3 Rule 1~5 Rule 1~5

Page 12: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(7/11)- Search(1/2)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

12

X2

X1

X0

X3

No match No match

Rule 1,3 Rule 1~5 Rule 1~5

Page 13: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(7/11)- Search(1/2)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

13

X2

X1

X0

X3

No match No match

Rule 1,3 Rule 1~5 Rule 1~5

Page 14: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(7/11)- Search(1/2)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

14

X2

X1

X0

X3

No match No match

Rule 1,3 Rule 1~5 Rule 1~5

Page 15: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(7/11)- Search(1/2)-range-tree

National Cheng Kung University CSIE Computer & Internet Architecture Lab

15

X2

X1

X0

X3

No match No match

Rule 1,3 Rule 1~5 Rule 1~5

Page 16: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(8/11)- Search(2/2)-hashing

National Cheng Kung University CSIE Computer & Internet Architecture Lab

16

Hash key Hash Value

80 1

1704 2

1708 3

59 4

123 5

46 6

Input:80

f0(80) = 5

Page 17: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(8/11)- Search(2/2)-hasing

National Cheng Kung University CSIE Computer & Internet Architecture Lab

17

Hash key Hash Value

80 1

1704 2

1708 3

59 4

123 5

46 6

Input:80

f1(80) = 1

Page 18: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(9/11)

Given a rule set consisting of 15 fields, we present our decomposition-based approach in three phases

•Preprocess

•Search

•MergeThe partial results from all the fields are merged in

parallel to compute the final result.

National Cheng Kung University CSIE Computer & Internet Architecture Lab

18

Page 19: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(10/11)- Merge(1/2)

0 1 0 0 1 1 0 1

National Cheng Kung University CSIE Computer & Internet Architecture Lab

19

1 0 1 0 1 1 1 1

0 0 0 0 1 1 0 1

Merging N-bit vectors(N=8)

Bitwise AND

Page 20: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Proposed Scheme(11/11)- Merge(2/2)

National Cheng Kung University CSIE Computer & Internet Architecture Lab

20

0 1 0 0 1 1 0 1

1 0 1 0 1 1 1 1

0 0 0 0 1 1 0 1

Bitwise AND Bitwise AND

Merging 2sets of x-bit subvectors(x=8)

Page 21: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Experiment Results(1/6) – Simulation Environment

National Cheng Kung University CSIE Computer & Internet Architecture Lab

21

Item Intel AMDCPU 2x Intel Xeon E5-2470 2x AMD Opteron 6278

Core 16 physical cores @ 2.3GHz 16 physical cores @ 2.4GHz

L1 cache 32KB 16KB

L2 cache 256KB 2MB

L3 cache 20MB 6MB

RAM 48GB DDR3-1600 64GB DDR3-1600

Page 22: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Experiment Results(2/6) – Superfield(1/2)

National Cheng Kung University CSIE Computer & Internet Architecture Lab

22

MPLS_tfc

ToSSuperfield (*,0) , (0,*) ,

(*,*)

Page 23: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Experiment Results(3/6) – Superfield(2/3)

National Cheng Kung University CSIE Computer & Internet Architecture Lab

23

super field 1 = {Eth_type 、 MPLS_lbl 、 ToS}super field 2 = {Ingr 、 VID 、 Vprty 、 Ptrl 、 MPLS_tfc}super field 3 = {Mata-data}super field 4 = {Eth_src}super field 5 = {Eth_dst}super field 6 = {SA}super field 7 = {DA}super field 8 = {SP}super field 9 = {DP}

Page 24: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Experiment Results(4/6) – Superfield(3/3)

National Cheng Kung University CSIE Computer & Internet Architecture Lab

24

Page 25: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Experiment Results(5/6) – Intel vs AMD

National Cheng Kung University CSIE Computer & Internet Architecture Lab

25

Page 26: Scalable Many-field Packet Classification on Multi-core Processors Authors : Yun R. Qu, Shijie Zhou, Viktor K. Prasanna Publisher : International Symposium

Experiment Results(6/6) - Comparision summary

National Cheng Kung University CSIE Computer & Internet Architecture Lab

26