1 Space-Efficient TCAM-based Classification Using Gray Coding Anat Bremler – Barr Interdisciplianry Center Danny Hendler Ben-Gurion University Infocom.

Slides:



Advertisements
Similar presentations
Multi-dimensional Packet Classification on FPGA: 100Gbps and Beyond
Advertisements

Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Fast Firewall Implementation for Software and Hardware-based Routers Lili Qiu, Microsoft Research George Varghese, UCSD Subhash Suri, UCSB 9 th International.
CPSC 502, Lecture 15Slide 1 Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 15 Nov, 1, 2011 Slide credit: C. Conati, S.
Bio Michel Hanna M.S. in E.E., Cairo University, Egypt B.S. in E.E., Cairo University at Fayoum, Egypt Currently is a Ph.D. Student in Computer Engineering.
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B+-Tree Index Files B-Tree.
Outline Introduction Related work on packet classification Grouper Performance Empirical Evaluation Conclusions.
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
A Ternary Unification Framework for Optimizing TCAM-Based Packet Classification Systems Author: Eric Norige, Alex X. Liu, and Eric Torng Publisher: ANCS.
1 TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs Department of Computer Science and Information Engineering National.
On the Code Length of TCAM Coding Schemes Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel) 1.
Efficient Multi-match Packet Classification with TCAM Fang Yu Randy H. Katz EECS Department, UC Berkeley {fyu,
Fast Filter Updates for Packet Classification using TCAM Authors: Haoyu Song, Jonathan Turner. Publisher: GLOBECOM 2006, IEEE Present: Chen-Yu Lin Date:
1 Layered Interval Codes for TCAM-based Classification Author: Anat Bremler-Barr, David Hay, Danny Hendler Publisher: IEEE INFOCOM 2009 Presenter: Chun-Yi.
Worst-Case TCAM Rule Expansion Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel)
1 Energy Efficient Multi-match Packet Classification with TCAM Fang Yu
CS 268: Lectures 13/14 (Route Lookup and Packet Classification) Ion Stoica April 1/3, 2002.
Efficient Multidimensional Packet Classification with Fast Updates Author: Yeim-Kuan Chang Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL.
Parallel-Search Trie-based Scheme for Fast IP Lookup
1 Range Encoding Cheng-Chien Su. 2 Outline DRES: Dynamic Range Encoding Scheme for TCAM Coprocessors  Hao Che, Zhijun Wang, Kai Zheng, Bin Liu  IEEE.
Efficient Multi-Match Packet Classification with TCAM Fang Yu
1 DRES:Dynamic Range Encoding Scheme for TCAM Coprocessors Authors: Hao Che, Zhijun Wang, Kai Zheng and Bin Liu Publisher: IEEE Transactions on Computers,
PEDS: Parallel Error Detection Scheme for TCAM Devices David Hay, Politecnico di Torino Joint work with Anat Bremler Barr (IDC), Danny Hendler (BGU) and.
SSA: A Power and Memory Efficient Scheme to Multi-Match Packet Classification Fang Yu 1 T. V. Lakshman 2 Martin Austin Motoyama 1 Randy H. Katz 1 1 EECS.
Efficient Gray Code Based Range Encoding Schemes for Packet Classification in TCAM Author: Yeim-Kuan Chang, Cheng-Chien Su, and Yung-Chieh Lin Publisher:
Algorithms for Advanced Packet Classification with TCAMs Karthik Lakshminarayanan UC Berkeley Joint work with Anand Rangarajan and Srinivasan Venkatachary.
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
Worst-Case TCAM Rule Expansion Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel)
Fast binary and multiway prefix searches for pachet forwarding Author: Yeim-Kuan Chang Publisher: COMPUTER NETWORKS, Volume 51, Issue 3, pp , February.
Existing Range Encoding Schemes Presenter: Kai-Yang, Liu Date: 2011/11/23.
1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:
A prefix-based approach for managing hybrid specifications in complex packet filtering Author: Nizar Ben Neji, Adel Bouhoula Publisher: Computer Networks.
PEDS: Parallel Error Detection Scheme for TCAM Devices David Hay, Politecnico di Torino Joint work with Anat Bremler Barr (IDC, Israel), Danny Hendler.
Layered Interval Codes for TCAM-based Classification David Hay, Politecnico di Torino Joint work with Anat Bremler-Barr (IDC), Danny Hendler (BGU) and.
Applied Research Laboratory Edward W. Spitznagel 7 October Packet Classification for Core Routers: Is there an alternative to CAMs? Paper by: Florin.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Minimizing Rulesets for TCAM Implementation.
Timothy Whelan Supervisor: Mr Barry Irwin Security and Networks Research Group Department of Computer Science Rhodes University Hardware based packet filtering.
GLOBECOM (Global Communications Conference), 2012
Fast Packet Classification Using Bloom filters Authors: Sarang Dharmapurikar, Haoyu Song, Jonathan Turner, and John Lockwood Publisher: ANCS 2006 Present:
Packet Classifiers In Ternary CAMs Can Be Smaller Qunfeng Dong (University of Wisconsin-Madison) Suman Banerjee (University of Wisconsin-Madison) Jia Wang.
Towards a Billion Routing Lookups per Second in Software  Author: Marko Zec, Luigi, Rizzo Miljenko Mikuc  Publisher: SIGCOMM Computer Communication Review,
Multi-Field Range Encoding for Packet Classification in TCAM Author: Yeim-Kuan Chang, Chun-I Lee and Cheng-Chien Su Publisher: INFOCOM 2011 Presenter:
Applied Research Laboratory Edward W. Spitznagel 24 October Packet Classification using Extended TCAMs Edward W. Spitznagel, Jonathan S. Turner,
1. Outline Introduction Related work on packet classification Grouper Performance Analysis Empirical Evaluation Conclusions 2/42.
On Finding an Optimal TCAM Encoding Scheme for Packet Classification Ori Rottenstreich (Technion, Israel) Joint work with Isaac Keslassy (Technion, Israel)
1 Power-Efficient TCAM Partitioning for IP Lookups with Incremental Updates Author: Yeim-Kuan Chang Publisher: ICOIN 2005 Presenter: Po Ting Huang Date:
IPv6-Oriented 4 OC768 Packet Classification with Deriving-Merging Partition and Field- Variable Encoding Scheme Mr. Xin Zhang Undergrad. in Tsinghua University,
A Smart Pre-Classifier to Reduce Power Consumption of TCAMs for Multi-dimensional Packet Classification Yadi Ma, Suman Banerjee University of Wisconsin-Madison.
TCAM –BASED REGULAR EXPRESSION MATCHING SOLUTION IN NETWORK Phase-I Review Supervised By, Presented By, MRS. SHARMILA,M.E., M.ARULMOZHI, AP/CSE.
AUTHOR: NIZAR BEN NEJI, ADEL BOUHOULA PUBLISHER: IEEE INTERNATIONAL CONFERENCE,2011 PRESENTER: KAI-YANG LIU DATE:2011/08/31 1 NAF Conversion: An Efficient.
Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: 2012 IEEE/ACM.
CS 740: Advanced Computer Networks IP Lookup and classification Supplemental material 02/05/2007.
Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:
Parallel tree search: An algorithmic approach for multi- field packet classification Authors: Derek Pao and Cutson Liu. Publisher: Computer communications.
1 Bit Weaving: A Non-Prefix Approach to Compressing Packet Classifiers in TCAMs Author: Chad R. Meiners, Alex X. Liu, and Eric Torng Publisher: IEEE/ACM.
Packet Classification Using Multidimensional Cutting Sumeet Singh (UCSD) Florin Baboescu (UCSD) George Varghese (UCSD) Jia Wang (AT&T Labs-Research) Reviewed.
On-Chip Logic Minimization Roman Lysecky & Frank Vahid* Department of Computer Science and Engineering University of California, Riverside *Also with the.
IP Routing table compaction and sampling schemes to enhance TCAM cache performance Author: Ruirui Guo a, Jose G. Delgado-Frias Publisher: Journal of Systems.
1 Space-Efficient TCAM-based Classification Using Gray Coding Authors: Anat Bremler-Barr and Danny Hendler Publisher: IEEE INFOCOM 2007 Present: Chen-Yu.
1 IP Routing table compaction and sampling schemes to enhance TCAM cache performance Author: Ruirui Guo, Jose G. Delgado-Frias Publisher: Journal of Systems.
Hierarchical packet classification using a Bloom filter and rule-priority tries Source : Computer Communications Authors : A. G. Alagu Priya 、 Hyesook.
Author : Lynn Choi, Hyogon Kim, Sunil Kim, Moon Hae Kim Publisher/Conf : IEEE/ACM TRANSACTIONS ON NETWORKING Speaker : De yu Chen Data :
Packet Classification Using Multi- Iteration RFC Author: Chun-Hui Tsai, Hung-Mao Chu, Pi-Chung Wang Publisher: 2013 IEEE 37th Annual Computer Software.
DRES: Dynamic Range Encoding Scheme for TCAM Coprocessors 2008 YU-ANTL Lab Seminar June 11, 2008 JeongKi Park Advanced Networking Technology Lab. (YU-ANTL)
Yotam Harchol The Hebrew University of Jerusalem, Israel
Yeim-Kuan Chang, Cheng-Chein Su, and Yung-Cheih Lin
Yotam Harchol The Hebrew University of Jerusalem, Israel
Author: Yaron Weinsberg ,Shimrit Tzur-David ,Danny Dolev and Tal Anker
Worst-Case TCAM Rule Expansion
Packet Classification Using Binary Content Addressable Memory
Presentation transcript:

1 Space-Efficient TCAM-based Classification Using Gray Coding Anat Bremler – Barr Interdisciplianry Center Danny Hendler Ben-Gurion University Infocom paper presentation

2 Talk outline Definitions Problem definition, prior art The Short Range Gray Encoding Algorithm Experimental results Future work

3 Packet Classification

4 ACL ID Source addr Source port Dest addr Dest port Protocol Action ACL *.*.* 80 TCP Allow ACL *.*.* UPD Allow ACL ≤ ≤ 1024 TCP Deny ACL UDP Log ACL *.*.* 25 TCP Deny ACL > TCP Allow ACL > TCP Log ACL database f headerpayload search key

5 Ternary content-addressable memory XX00X XXXX 11X00X X0X XXXX 10XX010100X0XX X XXXXXXXXXXXXXXXXXXXXXXX XX010X01X X0XXXXX TCAM Associative memory: parallel comparisons against all entries Fixed-width entries Ternary digits: 0 / 1 / X (don ’ t care) Only first match is returned Width of W digits Search key

6 TCAM: pros, cons, usage Pros High throughput Deterministic throughput Cons Higher cost (~X30 than SRAM) Higher power consumption XX00X XXXX 11X00X X0X XXXX 10XX010100X0XX X XXXXXXXXXXXXXXXXXXXXXXX XX010X01X X0XXXXX TCAM Usage Over 6M deployed devices (2004) Used in multi-gigabit systems with >10K rules May support 128K entries of 144- bit, 133M searches/second.

7 The problem: TCAM range representation Match-type rule field value matching key-field exact prefix range ***************** > How can we efficiently represent range rules by TCAM entries?

8 Basic approach: prefix expansion Representing [1,6] TCAM entries: 001, 01*, 10*, 110 Prefix expansion is inefficient A range over W-bits may expand to 2W-2 entries For 2 range-fields, may expand to (2W-2) 2 Expansion factor of up to 6 on real-world databases !!! [1,6]

9 Prior art: use of extra bits XX00X XXXX 11X00X X0X XXXX 10XX010100X0XX X XXXXXXXXXXXXXXXXXXXXXXX XX010X01X X0XXXXX TCAM XXXXX Extra bits (typically 36) Hierarchical database dependent encoding [Liu2002], [Lunteren and Engbersen2003] Database-Independent Range Pre-Encoding [Venkatachary,Lakshminarayanan, Rangarajan2005]

10 Prior art: database-dependent encoding Key idea: allocate an extra bit to commonly occurring ranges. Example Source-port ≥ XX00X XXXX 11X00X X0X XXXX 10XX010100X0XX X XXXXXXXXXXXXXXXXXXXXXXX XX010X01X X0XXXXX TCAM XXXXX Representing a rule Set the assigned extra bit to 1 Set all other extra bits to X XXXXXXXXXXXXXXXXXX 1 Generating the search key If source-port within range set extra bit to 1 Otherwise set extra bit to 0

11 Prior art: database-independent range – pre-encoding (DIRPE) Key idea: Use extra bits for independent encoding, use general ternary values rather than prefixes. Fence encoding (w-bit words) RangeEncoding = i0 2 w -i-1 1 i ≥ ix 2 w -i-1 1 i < i0 2 w -i x i-1 [i,j]0 2 w -1-j X j-i 1 i Fence encoding Expansion 1 Requires 2 w -1 bits What if we have a smaller number of bits? Number i is encoded by: 0 2 w -1-i 1 i

12 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX W+36 bits Key idea: Divide all (regular plus extra) bits to chunks, encode each by fence encoding Prior art: database-independent range – pre-encoding (cont ’ d) What if a smaller number of bits is available? Chunk1 (k 1 bits) Chunk2 (k 2 bits) Chunk3 (k 3 bits) Chunk4 (k 4 bits) Range expansion increases with the number of chunks

13 An Observation: The problem is equivalent to the DNF expression minimization problem R=[10,11] b 1 b 0 + b 1 b ’ 0 ≈ b 1 The general problem is NP-complete. “ Computing the minimum DNF representation of boolean functions defined by interval ” [Schieber, Geist, Zacks, 2005] A linear-time algorithm for finding minimum-size DNF expression for any range of binary-coded numbers Worst-case expansion for binary-encoded numbers is 2W-4 Thanks to Ronny Roth for the observation and the reference to the paper

14 Talk outline Definitions Problem definition, prior art The Short Range Gray Encoding Algorithm Experimental results Open questions

15 Our solution: Short-Range Gray Encoding (SRGE) Hybrid-SRGE yields range-expansion of only 1.02 on real databases Gain without pain : Range expansion reduction can be obtained without the use of extra bits by changing the encoding scheme (SRGE) SRGE can be combined with database-dependent scheme: the Hybrid-SRGE scheme

16 Our solution: observations 1.Ranges tend to be small: typically correspond to similar- functionality ports:  : snmp, snmptrap  67-68: bootps server, bootps client  : Microsoft DirectX 2.Binary coding not optimal for small ranges Binary encoding An example: covering [1,2] Cover set: {01, 10} Gray encoding Cover set: {*1}

bit BRGC: Binary Reflected Gray Code Obviously, not `our ’ Frank Gray Gray code: codewords for consecutive integers differ by single bit 4-bit BRGC: Transforming binary  BRGC is quick

18 Binary Reflected Gray Code (cont ’ d) It is exactly this reflection property that helps decrease expansion

19 The SRGE algorithm Need to find minimum cover of [s,e] using gray coding. se p Find the least common ancestor p of point s and e

20 Let pl be the rightmost leaf in p’s left sub-tree Let pr be the leftmost leaf in p’s right sub-tree se plpr p The SRGE algorithm

21 First, we handle the smaller of: [s,pl], [e,pr] seplpr p The SRGE algorithm

22 prpl Cover by prefixes the smaller range and its mirror relative to p We still need to cover the leftover range [s’,e], if it is non-empty The SRGE algorithm se p s’

23 s' e pl ’ pr ’ Repeat the previous procedure for the leftover: [s',e] find their least common ancestor p’ let pl' be the rightmost leaf in the left sub-tree of p' let pr' be the leftmost leaf in the right sub-tree of p' p’ p pr s The SRGE algorithm

24 Two cases to consider: 1)|[pr', e]| > |[s', pl']|:  Cover [pr', e] by prefixes  The mirror of [pr', e] ( relative to p') covers [s', pl'] pr s’ pl’ pr’ e p’ p s The SRGE algorithm

25 pr s’ pl’ pr’ e 2)|[s', pl']|>|[pr', e']|:  Cover [pr', e] by prefixes.  Cover [s', pl'] by one a single prefix, corresponding to p' left sub-tree p’ p s ql q The SRGE algorithm

26 Hybrid-SRGE For each unique range, compute total number of redundant entries under SRGE Deal with the most expensive ranges by using standard database-dependent encoding

27 Talk outline Definitions Problem definition, prior art The Short Range Gray Encoding Algorithm Experimental results Future work

28 SRGE range-expansion reduction Random ranges

29 Results on a real-life database 223K rules with 300 unique ranges Combined from collection of 126 separate databases (firewall, acl-routers, intrusion prevention systems) Hybrid SRGE Acknowledgment: Cisco, David Taylor (WHSTL) Algorithm Expansion Redundancy Hybrid DIRPE1.12NA Prefix expansion2.6NA

30 Range-length distribution Almost 60% of the unique ranges have length less then 20 Approx. 40% of the total number of ranges have length less then 20

31 A small number of ranges cause most expansion

32 Range expansion bounds The worst-case expansion ratio of SRGE on w-bit words is 2w-4 The worst-case expansion ratio of any range-covering scheme on w-bit words is at least w, regardless of the encoding scheme

33 Expansion as function of bits number 2w-2 2^w-1 w 1 Number of bits used Number of TCAM entries At least W entries required – regardless of the encoding technique SRGE worst-case expansion is 2W-4 entries Unknown