Exploiting Order Independence for Scalable and Expressive Packet Classification Author: Kirill Kogan, Sergey I. Nikolenko, Ori Rottenstreich, William Culhane, and Patrick Eugster Presenter: Qing Lyu 2017/04/12 IEEE/ACM TRANSACTIONS ON NETWORKING, VOL. 24, NO. 2, APRIL 2016
Outline l Introduction l Order-independence l Problem formulation and theorem l Solutions l Simulations l Conclusions 2 Outline
Outline l Introduction l Order-independence l Problem formulation and theorem l Solutions l Simulations l Conclusions 3 Outline
Packet Classification 4 l Introduction
Packet Classification TCAM l NFV, power consumption and heat l cannot efficiently represent range rules, especially multiple fields l exponential space growth Software (SW) l tradeoffs between (memory) space and (lookup) time. 5 Introduction
TCAM Advantages: efficiently represent multi-field classification with prefixes Disadvantages: suffers an exponential blowup from range expansion each range-based field in a rule introduces an additional multiplicative factor 6 Introduction
SW-Complexity bounds Software-based packet classifier with rules and fields K β₯ 3 O(π ( ) space, π(logπ) time π π π‘ππππ , π(πππ (67 π) time E.g. 100 rules and 4 fields, O(π ( ) is about 100MB, π(πππ (67 π) time is about 350 memory accesses 7 Introduction
Ranges Standard five-tuples with two fields which include ranges Desired implementations for classifiers on ranges: IP or MAC addresses dates packet lengths etc 8 Introduction
Outline l Introduction l Order-independence l Problem formulation and theorem l Solutions l Simulations l Conclusions 9 Outline
Contributions Exploit the order-independenceof classifiers Reduce the number of classification fields represented by prefixes or ranges Implemented in linear space and with worst-case guaranteed logarithmic time Allows the addition of more fields including range constraints without impacting space and time complexities 10 Introduction
Model Description A packet header contains π fields A field π, 1 β€ i β€ π is a string of π ? bits A classifier K is an ordered set of rules , π 7 , β¦ , π B A rule π C is a is an ordered set of π fields and an associated action π΅ C A field πΊ ? is represented by a range of values on π ? bits each rule contains π ranges π = (π½ 7 , β¦ , π½ ( ) , π½ ? = [π ? , π£ ? ] 11 Order-independence
Denotation K 6K the classifier obtained from by K by removing a set of fields πΊ from each rule K LK the classifier obtained from K by extending its rules with πΊ (with values defined separately for every rule) 12 Order-independence
Denotation πππ’ππ π‘πππ’ at least one header that matches both rules π 7 , π P πππ‘πππππ’ π 7 , π S π 7 = 100 β ππ πππ β πππππππππππ’ π S = 01 ββ π 7 , π S are order-independent if the π P = 1 βββ corresponding sets of matching headers are disjoint, every header matches at most one of them. 13 Order-independence
Denotation A classifier K is called order-independent if any two of its rules are filter-order-independent K ( S ) denotes a classifier that uses only a subset π of fields in classification 14 Order-independence
Order-independence K X : with the same rules as K sorted in a different order Then, any packet header π is matched by the same rule in K X and K The condition is satisfied when rules do not intersect i.e., for each pair of rules there is at least one field in which the corresponding ranges (or prefixes) are disjoint. Transitively order- dependent π 7 , π S π S , π P 15 Order-independence
Cont. K π 7 =([1,3],[4,5]) π S =([5,6],[4,5]) order-independent K X π P =([1,3],[4,5]) π Z =([2,4],[4,5]) order-dependent as (3,4) matches both rules 16 Order-independence
Two Encoding Schemes Binary Encoding Worst case 2(π β 1) TCAM entries SRGE Encoding Worst case 2(π β 2) TCAM entries Multi-field ( π -field) range, upper bound entries # Binary: (π β 2) ( , SRGE: (π β 4) ( 17 Order-independence
Binary Encoding Binary Encoding π β πππ’ range is encoded as a union of disjoint subtrees in the binary tree of 2 ^ leaves Each subtree is represented by a single prefix TCAM entry the maximal number of entries to encode a range (worst-case expansion) is 2(π β 1) 18 Order-independence
Binary Encoding π = 5 Range [16,23] A single entry (01 βββ) Range 1,30 2π β 2 entries (00001),(0001*),(001**),(01***),(10***),(110**),(1 110*),(11110) 19 Order-independence
SRGE Improve the worst-case bound to 2(π β 2) entries by representing values in Gray code. Entries are not necessarily prefixes and do not necessarily represent disjoint subsets of the range Range 1,30 2π β 4 entries 20 Order-independence
Example1 K = π 7 , π S ,π P with two fields of 5 bits each π 7 = ( 1,3 , [4,31]) Binary encoding 1 st field:(00001,0001*) 6 entries 2 nd field:(00100,01***,1****) π S = ( 4,4 ,[2,30]) 7 entries 1 st field:(00100) 2 nd field:(00010,001**,01***,10***,110**,1110*,11110) π P = ( 7,9 ,[5,21]) 10 entries 1 st field:(00111,0100*) 2 nd field:(00101,0011*,01***,100**,1010*) 21 Order-independence
Example1 K L7 = π 7 L7 with one additional fields L7 ,π S L7 , π P of 5 bits L7 = ( 1,3 , 4,31 , [1,28]) π 7 L7 = ( 4,4 , 2,30 , [4,27]) π S L7 = ( 7,9 , 5,21 , [3,18]) π P 42+28+50=120 entries 22 Order-independence
Outline l Introduction l Order-independence l Problem formulation and theorem l Solutions l Simulations l Conclusions 23 Outline
Tested Classifiers 12 classifiers from Classbench generated with real parameters Each with 50K rule on 6 fields 5 real-life classifiers from Cisco Systems 24 Problem formulation and theorem
Tested Classifiers 12 25 Problem formulation and theorem
Fields Expansion Theorem ---Theorem 1 let K Ld be a classifier that results from an order- independent classifier K by adding new fields π of any width Then, K with a false-positive check of a single matched rule is a semantically equivalent representation of K Ld 26 Problem formulation and theorem
Theorem 1 Introducing additional fields based on prefixes or ranges to an orderβdependent classifier 1. affects only the encoding size of its orderβdependent part 2. new fields in the order-independent part can be ignored without affecting the classification outcome 3. The space and lookup time complexity of classification in the order-independent do not increase 27 Problem formulation and theorem
Theorem 1 Previous new fields based on prefixes or ranges significant increase the software solution π(πππ (67 π) look up time in linear memory Likewise, TCAM-based solution, range converted to prefixes, new field based on ranges adds an additional multiplicative factor for the required TCAM space 28 Problem formulation and theorem
Theorem 1 Support for additional fields amenable to range rules would greatly improve classification expressiveness e.g., ranges on dates, packet length, etc 29 Problem formulation and theorem
Theorem 1 fsadf 30 Problem formulation and theorem
Theorem 1 fsadf 31 Problem formulation and theorem
Example2 K = π 7 , π S ,π P with three fields of 5 bits π 7 = ( 1,3 , 4,31 , [1,28]) π S = ( 4,4 , 2,30 , [4,27]) 42+28+50=120 entries π P = ( 7,9 , 5,21 , [3,18]) K 6{S,P} = (π 7 6{S,P} ,π S 6{S,P} , π P 6{S,P} ) 6{S,P} = ( 1,3 ) π 7 6{S,P} = 2+1+2=5 entries π S 4,4 6{S,P} = ( 7,9 ) π P 32 Problem formulation and theorem
Fields Reduction Theorem ---Theorem 2 let K 6d be a classifier that results from an order- independent classifier K by removing π fields If K 6d is order-independent,then, K 6d with a false-positive check of a single matched rule is a semantically equivalent representation of K 33 Problem formulation and theorem
Theorem 2 If the reduced classifier K 6d contains at most two fields Then, we can efficiently implement lookup in time logarithmic π in with (near-) linear memory For TCAM based solutions, reduces the required TCAM space proportionally 34 Problem formulation and theorem
Theorem 2 asfd 35 Problem formulation and theorem
Fields Subset Minimization (FSM) Find a maximal subset of fields M of an order- independent classifier K such that K 6d is order-independent οΌ if there are several such subsets, choose M with maximal total width (to minimize lookup word width) multi-group representation πΎ groups 36 Problem formulation and theorem
FSM+multi-group representation πΎ groups: 1. each rule belongs to a single group 2. the rules of each group are order-independent on a subset of π fields of K 3. different groups can reuse the same fields to keep order-independence π β ππ»π: find the minimal number of disjoint groups that each group is order-independent on π fields 37 Problem formulation and theorem
FSM+multi-group representation dfs 38 Problem formulation and theorem
Recommend
More recommend