Encoding Short Ranges in TCAM Without Expansion: Efficient Algorithm and Applications

Similar documents
Encoding Short Ranges in TCAM Without Expansion: Efficient Algorithm and Applications

Encoding Short Ranges in TCAM Without Expansion: Efficient Algorithm and Applications

Encoding Short Ranges in TCAM Without Expansion: Efficient Algorithm and Applications

Ultra-Fast Similarity Search Using Ternary Content Addressable Memory

Multi-Field Range Encoding for Packet Classification in TCAM

Deep Packet Inspection of Next Generation Network Devices

Multi-Field Range Encoding for Packet Classification in TCAM

Making Network Functions Software-Defined

Efficient TCAM Encoding Schemes for Packet Classification using Gray Code

Tree-Based Minimization of TCAM Entries for Packet Classification

SSA: A Power and Memory Efficient Scheme to Multi-Match Packet Classification. Fang Yu, T.V. Lakshman, Martin Austin Motoyama, Randy H.

Switch and Router Design. Packet Processing Examples. Packet Processing Examples. Packet Processing Rate 12/14/2011

Layered Interval Codes for TCAM-based Classification

PEDS: A Parallel Error Detection Scheme for TCAM Devices

PEDS: A Parallel Error Detection Scheme for TCAM Devices

100 GBE AND BEYOND. Diagram courtesy of the CFP MSA Brocade Communications Systems, Inc. v /11/21

Decision Forest: A Scalable Architecture for Flexible Flow Matching on FPGA

CS 268: Route Lookup and Packet Classification

Generic Architecture. EECS 122: Introduction to Computer Networks Switch and Router Architectures. Shared Memory (1 st Generation) Today s Lecture

Geometric Data Structures Multi-dimensional queries Nearest neighbour problem References. Notes on Computational Geometry and Data Structures

Configure Routing Resources on the Switch

EECS 122: Introduction to Computer Networks Switch and Router Architectures. Today s Lecture

Multidimensional Indexes [14]

Efficient Gray-Code-Based Range Encoding Schemes for Packet ClassificationinTCAM

PC-DUOS: Fast TCAM Lookup and Update for Packet Classifiers

Scalable Name-Based Packet Forwarding: From Millions to Billions. Tian Song, Beijing Institute of Technology

PC-TRIO: An Indexed TCAM Architecture for Packet Classifiers

ECE697AA Lecture 21. Packet Classification

Implementation of Boundary Cutting Algorithm Using Packet Classification

An Efficient TCAM Update Scheme for Packet Classification

CS 5114 Network Programming Languages Data Plane. Nate Foster Cornell University Spring 2013

A middle ground between CAMs and DAGs for high-speed packet classification

Multi-core Implementation of Decomposition-based Packet Classification Algorithms 1

Packet Classification Using Dynamically Generated Decision Trees

Data Mining. 3.5 Lazy Learners (Instance-Based Learners) Fall Instructor: Dr. Masoud Yaghini. Lazy Learners

Performance Evaluation and Improvement of Algorithmic Approaches for Packet Classification

Rule Caching in Software- Define Networkings. Supervisor: Prof Weifa Liang Student: Zhenge Jia, u Date of presentation: 24 th May 2016

ECE697AA Lecture 20. Forwarding Tables

Bit Weaving: A Non-prefix Approach to Compressing Packet Classifiers in TCAMs

All-Match Based Complete Redundancy Removal for Packet Classifiers in TCAMs

Image Processing Via Pixel Permutations

AN EFFICIENT HYBRID ALGORITHM FOR MULTIDIMENSIONAL PACKET CLASSIFICATION

Striped Grid Files: An Alternative for Highdimensional

Managing and Securing Computer Networks. Guy Leduc. Chapter 2: Software-Defined Networks (SDN) Chapter 2. Chapter goals:

Clustering Billions of Images with Large Scale Nearest Neighbor Search

Non-Parametric Modeling

PUSHING THE LIMITS, A PERSPECTIVE ON ROUTER ARCHITECTURE CHALLENGES

EE 584 MACHINE VISION

An Architecture for IPv6 Lookup Using Parallel Index Generation Units

We use non-bold capital letters for all random variables in these notes, whether they are scalar-, vector-, matrix-, or whatever-valued.

The Data Link Layer. CS158a Chris Pollett Feb 26, 2007.

6. Dicretization methods 6.1 The purpose of discretization

Forwarding and Routers : Computer Networking. Original IP Route Lookup. Outline

Shape Shifting Tries for Faster IP Route Lookup

Problem Statement. Algorithm MinDPQ (contd.) Algorithm MinDPQ. Summary of Algorithm MinDPQ. Algorithm MinDPQ: Experimental Results.

(Master Course) Mohammad Farshi Department of Computer Science, Yazd University. Yazd Univ. Computational Geometry.

4.1.2 Merge Sort Sorting Lower Bound Counting Sort Sorting in Practice Solving Problems by Sorting...

A Parallel Algorithm for Exact Structure Learning of Bayesian Networks

Shape Shifting Tries for Faster IP Route Lookup

Theorem 2.9: nearest addition algorithm

15-744: Computer Networking. Routers

Scalable Enterprise Networks with Inexpensive Switches

ITTC High-Performance Networking The University of Kansas EECS 881 Packet Switch I/O Processing

Algorithms for Nearest Neighbors

Data Structures for Approximate Proximity and Range Searching

Data Analytics and Boolean Algebras

Approximate Nearest Neighbors. CS 510 Lecture #24 April 18 th, 2014

A Sorted Partitioning Approach to High-speed and Fast-update OpenFlow Classification

Time and Timestamping in Softwarized Environments

Recursive Flow Classification: An Algorithm for Packet Classification on Multiple Fields

Nearest Neighbor Classification

Compact Data Representations and their Applications. Moses Charikar Princeton University

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Predecessor. Predecessor Problem van Emde Boas Tries. Philip Bille

1. Meshes. D7013E Lecture 14

Bitmap Intersection Lookup (BIL) : A Packet Classification s Algorithm with Rules Updating

Router Architectures

Z-KNN Join for the Swiss Feed Database: a feasibility study

Accommodating Bursts in Distributed Stream Processing Systems

Machine Learning. Nonparametric methods for Classification. Eric Xing , Fall Lecture 2, September 12, 2016

Flow Caching for High Entropy Packet Fields

TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs Alex X. Liu, Chad R. Meiners, and Eric Torng

Incompletely Specified Functions with Don t Cares 2-Level Transformation Review Boolean Cube Karnaugh-Map Representation and Methods Examples

Strategies for Mitigating TCAM Space Bottlenecks

Predecessor Data Structures. Philip Bille

Resource-Efficient SRAM-based Ternary Content Addressable Memory

Algorithms for Nearest Neighbors

Network Processors. Nevin Heintze Agere Systems

Efficient Packet Classification using Splay Tree Models

Accelerometer Gesture Recognition

Single Image Interpolation via Adaptive Non-Local Sparsity-Based Modeling

Predecessor. Predecessor. Predecessors. Predecessors. Predecessor Problem van Emde Boas Tries. Predecessor Problem van Emde Boas Tries.

Geometric data structures:

COMPUTATIONAL STATISTICS UNSUPERVISED LEARNING

Dynamic Pipelining: Making IP- Lookup Truly Scalable

ECE276B: Planning & Learning in Robotics Lecture 5: Configuration Space

The Boundary Forest Algorithm

Approximation Algorithms for Geometric Intersection Graphs

Two-Level Logic Optimization ( Introduction to Computer-Aided Design) School of EECS Seoul National University

Spatio-temporal Range Searching Over Compressed Kinetic Sensor Data. Sorelle A. Friedler Google Joint work with David M. Mount

Transcription:

Encoding Short Ranges in TCAM Without Expansion: Efficient Algorithm and Applications Yotam Harchol The Hebrew University of Jerusalem, Israel Joint work with: Anat Bremler-Barr David Hay Yacov Hel-Or IDC Herzliya, Israel To appear in ACM SPAA 26 Hebrew University, Israel IDC Herzliya, Israel This research was supported by the European Research Council under the European Union s Seventh Framework Programme (FP7/27-23)/ERC Grant agreement no 25985.

TCAM Ternary Content Addressable Memory TCAM is an associative memory module Useful for parallel multidimensional prefix lookup Each entry may consist of,, and * bits Widely used in high-speed networking devices Example: 2-dimensional IP lookup: Source IP Dest. IP What about ranges? (e.g., port numbers) ******* ******* ************* *********** 2 3 4 5 P P2 Drop P3 2 3 4 5 TCAM SRAM 2

Range Encoding in Binary Representation Can ternary encode only certain intervals Or we need more than one entry (expansion) 2 3 4 5 6 7 8 9 2 3 4 5 ** *** **???? * *???? * * Exponential space blow-up when using multiple range fields 3

Encoding Short Ranges Ranges of arbitrary length infeasible without expansion Ranges with bounded length feasible! Useful for: Short TCP/UDP ranges (>6% of the ranges in real life) QoS mechanisms (IP ToS/DSCP) Packet size classification (by categories) Timestamps and counters IP spoofing detection (using IP TTL) SDX AS numbering Also useful for applications outside the networking domain 4

Range Encoding on TCAM: Two Approaches Database-independent encoding: [Lakshminarayanan et al., 25], [Bremler Barr et al., 27] f enc ([x, y]) = ***** ****** ******* Easy to update Lower bound for w-bits field without expansion: 2 w - bits per range [Lakshminarayanan et al., 25] Database-dependent encoding: [Liu, 22], [Van Lunteren & Engbersen, 23], [Chang & Su, 27], [Che et al., 28], [Bremler Barr et al., 29], [Rottenstreich & Keslassy, 2], [Rottenstreich et al., 23], [Kogan et al., 24] f (, [x, y]) = enc DB **** ***** Both schemes require expansion for a feasible code length Compact codes 5

RENÉ Range Encoding with No Expansion Encoding function for short ranges: f enc ([x, y]) = ***** Database independent - easy to update No row expansion Near-optimal TCAM space usage Useful for packet classification applications Useful for high dimensional nearest neighbor search 6

Binary-Reflected Gray Code (BRGC) Build recursively by reflecting binary code: 2 3 4 5 6 7 8 9 2 3 4 5 Hamming distance between each two adjacent points = 7

Range Encoding with Binary-Reflected Gray Code With ternary BRGC we can encode some of the ranges of length h=2 k (k N) 2 3 4 5 6 7 8 9 2 3 4 5 ** ** ** ** *** ** ** ** ** What about other (red) ranges? 8

Layers Layer: a set of disjoint consecutive ranges Two (blue) layers can be encoded with a BRGC-based ternary word Other (red) layers need more bits 2 3 4 5 6 7 8 ** ** ** ** 9 2 3 4 5 *** ** ** ** ** 9

Cover Ranges Cover range of R: the smallest blue range that fully contains R In red layers: No two consecutive ranges in the same layer are fully contained in a cover range 2 3 4 R 5 6 7 8 9 2 3 4 5 *** cover(r) Given the cover range, one bit is enough to differentiate ranges in the same layer

Single Bit Range Index Red ranges require different encoding Add one bit for each red layer Bit value alternates between ranges in the same layer Bits of other red layers are set to * For blue layers, these bits are always * ** 2 3 4 5 6 7 * * * * * 8 * * * * * 9 2 3 ** ** ** ** ** ** ** ** 4 5

Encoding Scheme for Ranges Encoding of a single range of length h=2 k is: Blue ranges: BRGC(R) Red ranges: BRGC(cover(R)) Ternary BRGC w bits Bit of L... Bit of L h/2- h-2 bits Bit of L h/2+... Bit of L h- Value encoding is now: BRGC Bit of L... Bit of L h/2- Bit of L h/2+... Bit of L h- w bits h-2 bits 2

Toy Example 3

Optimization For ranges of length h=2 k k- LSBs of the BRGC part are always * 2 3 4 5 *** * ** ** Code can be shorten to w-log(h)+h- bits 6 7 ** ** ** ** ** ** ** ** *** * 8 *** * *** * *** * *** * 9 2 3 4 ** ** ** ** ** ** ** ** 5 *** * *** * *** * *** * 4

Encoding Multiple Range Lengths For ranges of length 3, intersect two ranges of length 4: 2 * ** 3 4 5 6 7 We present the conjunction operator Π: ** * * ** ** * 8 9 2 3 4 * ** * ** * ** ** * ** * ** * * ** ( means * ** undefined, * ** ** * and if a i Π b i = ** * then a Π b = ) ** * ** * 5 * ** ** * For two ranges R, R 2 : tcode(v) tcode(r4 7 ) Π tcode(r * ** 2 ) if and only if v R R 2 5 8 (also: tcode(r ) Π tcode(r 2 ) = ** * R R 2 = ) 5 7 * ** Π ** * = * * 5

TCAM bits used per range field (log 2 scale) Theoretical Bound For w=6 Maximal range length (log 2 scale) 6

The Nearest Neighbor Search Problem Input: - A set of data points - A query point (or a series of those) (points are in a discrete space) Output: Data point closest to the query point The Curse of Dimensionality: Hard problem for high dimensions (even over or so) 7

The Nearest Neighbor Search Problem Encode cubes on data points Given a query point, single TCAM lookup returns the smallest cube that contains it No TCAM entry expansion in high dimension Data Query 8

The Nearest Neighbor Search Problem Or instead, save TCAM space Encode cubes on the query point Query TCAM with growing cubes Find first data point to match Data Query 9

Experiment on a Real TCAM Currently - no evaluation board for TCAM Instead, we used a commodity network switch with a TCAM Switch has 48 ports of Gbps each (.5 Million packet per second) TCAM is 92 bits wide d-dimensional Cube Representation: ****************************** Src. MAC Dest. MAC Src. IP Dest. IP st dimension 2 nd dimension 3 rd dimension 4 th dimension 5 th dimension 6 th dimension 7 th dimension OpenFlow flow_mod Single port:.5 Million Queries Per Second! Queries as packets OpenFlow Counters 2

Conclusions Encoding function for short ranges: f enc ([x, y]) = ***** Database independent - easy to update No row expansion Near-optimal TCAM space usage Useful for packet classification applications Useful for high dimensional nearest neighbor search 2

Questions? Thank you. 22