fast filter updates for packet classification using tcam authors: haoyu song, jonathan turner....
Post on 19-Dec-2015
220 views
TRANSCRIPT
Fast Filter Updates for Packet Classification using
TCAM
Authors: Haoyu Song, Jonathan Turner.
Publisher: GLOBECOM 2006, IEEE
Present: Chen-Yu Lin
Date: Nov, 8, 2007
Problem statement
To addresses the problem of efficient filter updates in TCAM.
Encodes filter priority as a TCAM field.
Introduction
TCAM remain the most popular choice for high performance packet classification.
Some drawbacks for TCAM• Low Density & High Cost.
• High Power Consumption.
• Arbitrary Range Support.
• Multiple-Match Support.
Focus on TCAM set management.• New filters may be inserted and existing one deleted or
modified.
Introduction
TCAM returns the first matching filter, based on storage position within the TCAM.
A TCAM chip support a sustained search rate of 250 million packet per second.
Even for OC-192 networks, the peak packet rate in the worst case is no more than 30M packet/sec.
Tradeoff
• Lookup throughput for more efficient filter updates.
Algorithm
Allocate enough empty entries between any two filters in a TCAM.• Benefit
• Insert new filter without moving any other filters.
• Drawback• We prefer to store the filter set in as few TCAM segments as
possible.
• We cannot predict and guarantee that there will always be an empty position in TCAM for future updates.
Two important objectives.• Store the filter set in a TCAM compactly.
• Minimize the movement of entries.
Algorithm
Real Filter Priority• Filter’s order in a filter set naturally reflects its priority, so
the filter index can be used as its priority value.
Divide filters into groups• Filters in the same group can exchange order at will.
• The order of groups cannot be exchanged.
• Each group is assigned a priority value.
• The group with a higher priority must be stored in a lower address region of TCAM.
Algorithm
Algorithm for grouping:• Step 1: For each filter ,we examine all the other filters
which overlap with • If i>j, create a directed edge from j to i.
• Otherwise, create a directed edge from i to j.
• Step 2: Assign priority to filters
Algorithm
Observation:
• # distinct priority value <<< # filters
• # priority levels is insensitive to # filters.
• This property implies that if filters are updated based on their priority values, significantly less work needs to be done than using absolute position in TCAM.
Algorithm
Insert a new filter R (index between r1 & r2)• Updating a filter may change multiple filter’s priority
values.
Algorithm
Using Extended Filter• A typical TCAM entry configuration results in some
unused bits. Using a few of these unused bits, we attach the real priority to each filter.
• Benefit •A new filter can be written in any empty entry in a
TCAM and no other filter needs to be moved.
•The lookup process is no longer looking for the matching filter with minimum TCAM index but the matching filter with the minimum attached priority value.
Algorithm
Linear search on the priority does not scale to large filter sets with many priority levels.
Fortunately, TCAM have a set of reconfigurable Global Mask Registers (GMR) which can selectively mask out any bits in all entries as “don’t care”.
Each TCAM lookup therefore designates one of the preset GMR to search only a range of priority values.
Algorithm
Given a packet header:• 1. Search any matching filter with priority between 0~15.
• If (True), search any matching filter between 0~7.• If (True), search between 0~3• If (False), search between 8~11
• If (False), search any matching filter between 16~23. Since each lookup step halves the searched priority range, this sch
eme needs only logN lookups per packet to find the best matching filter.
N = # unique priority values
Algorithm
If we also know the matching filter’s priority value, we can accelerate the search.
• If in the first attempt:• Find a matching filter with priority of zero no further search
needed.
• Find a matching filter with priority of two directly search the range 0~1 rather than 0~7.
Algorithm
Update• Including inserting, deleting, and modifying filters.
• All of these may result in multiple filters changing their priority values.
• We can do an update using the spare TCAM cycles without blocking the normal lookups.
Evaluation
Filter distribution• The efficiency of our algorithm depends on the filter
distribution.
The majority of filters are concentrated in group with small priority values
Evaluation
Two favorable implications
• It benefits the lookup process• A packet has a higher possibility to match a filter with small
priority value, and our search start from the filters with small priority values.
• It implies the long dependent chains comprise only a few filters, hence our update process will not affect too many filters.
Evaluation
Lookup throughput performance• Worst case: storing all filters in TCAM in decreasing
priority value.
• Best case: storing all filters in TCAM in increasing priority value.
• Average case: randomly permuted in TCAM.
A packet needs at most 6 TCAM accesses to find the best matching filter