1 / 19

Efficient packet classification using TCAMs

Efficient packet classification using TCAMs. Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher : Computer Networks 2006 Present: Chen-Yu Lin Date: Jan, 10, 2008. Outline . Introduction Filter encoding scheme P refix I nclusion C oding scheme Performance evaluation.

Télécharger la présentation

Efficient packet classification using TCAMs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Efficient packet classification using TCAMs Authors:Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present:Chen-Yu Lin Date: Jan, 10, 2008

  2. Outline • Introduction • Filter encoding scheme • Prefix Inclusion Coding scheme • Performance evaluation

  3. Introduction • TCAM is currently the dominant solution method used by the industry. High cost and high power consumption are the two major drawbacks of TCAM-based lookup engines. Adoption of IPv6 with increased address length will further exacerbate. • In this paper, we present a filter encoding method, called prefix inclusion coding (PIC) to improve the efficiency of TCAM-based lookup engine. • Filters are stored in an encoded format to reduce storage requirement. • Codeword lookup is equivalent to finding the longest matching prefix in the codeword table.

  4. Filter encoding scheme • Filter encoding is an effective approach to enhanced the efficiency of the TCAM lookup engine. • van Lunteren and engbersen proposed an encoding scheme called P2Cbased on the concept of primitive range hierarchy . • Ranges are mapped to different layers in the hierarchy such that ranges on the same layer must be disjoint and are represented by codeword.

  5. Filter encoding scheme • Style 1 • Primitive ranges in a layer are assigned distinct non-zero codeword. • Style 2 • Allows 2 primitive ranges at the same layer to be assigned a common codeword if both ranges are subsets of two disjoint primitive ranges at other layers. • Style 3 • Primitive ranges on different layers are merged if the number of layers exceeds the physical limit.

  6. Filter encoding scheme

  7. Filter encoding scheme • The codeword lookup method is required to find all matching ranges and combine the code segments for each primitive layer to form the final codeword. • For example, the codeword corresponds to the input address y marked in coding style 2 of figure 2 is 010100. • The proposed method can have better compression ratio compared to P2C. • Our method can reduce the TCAM space requirement by 70% to over 90%

  8. Prefix Inclusion Coding Scheme • A 5-tuple filter <F1,F2,F3,F4,F5> is stored in the TCAM in an encoded format <C1,C2,C3,C4,C5> where Ci is the codeword for field Fi. • Let p and q be two distinct address prefixes where the length if p is shorter than or equal to the length of q. Prefixes p and q are either disjoint, or q is enclosed by p (q is subrange of p). • The codeword assignment satisfies the following 3 requirement. • 1. A valid codeword must have non-zero value. • 2. The inclusion property is preserved. Cq is enclosed by Cp iff q is enclosed by p • 3. If q is enclosed by p, then Cqmust have a non-zero suffix extension from Cp

  9. Prefix Inclusion Coding Scheme • The system maintains two separate codeword tables storing the <prefix, codeword> pairs for the source and destination prefixes. • An input address A is first translated to a codeword CA by finding the longest matching prefix in the corresponding codeword table. • Given a sorted list of n prefixes, a tree (i - tree) that represents the inclusion relationship can be constructed in O(hn) time where h is the depth of the tree. Depends on the maximum nesting level of prefixes.

  10. Prefix Inclusion Coding Scheme • A leaf node in the i – tree can be assigned a full-length codeword that occupies a single point in the code space.

  11. Prefix Inclusion Coding Scheme • The code space occupied by an internal node is greater than or equal to 1 plus the sum of the code space of its children. • The code space occupied by an internal node must be a power of 2. • The minimum codeword length is then equal to log2 of the code space occupied by root.

  12. Prefix Inclusion Coding Scheme

  13. Prefix Inclusion Coding Scheme • An address value is first translated to a value in the code space before the encoded filter table is searched. • In the codeword table, a don’t care bit in a codeword is substituted by a zero. • For example: • Input address is 1110 0111, the best matching prefix is J = 11100* and the return code value will be 10100 • The codeword lookup can be implemented using TCAM or other efficient algorithmic method.

  14. Prefix Inclusion Coding Scheme • PIC can also applied to encode port range values • The port range [0-1023] and [1024-65535] are commonly found in filter sets, other arbitrary port ranges are, in general, subranges of these two ranges. • If two ranges are partially overlapping, one of the 2 ranges will be decomposed.

  15. Prefix Inclusion Coding Scheme

  16. Prefix Inclusion Coding Scheme • Using a pure PIC encoding scheme, there can be 2 options: • 1. range B is decomposed into 2 sub ranges. • 2. range C is decomposed into 2 sub ranges. • One may avoid port range decomposition by using a hybrid encoding method that combines PIC with P2C • Partially overlapped ranges are grouped into a composite range

  17. Performance evaluation • Table 2 shows the required code length for the five fields in a filter.

  18. Performance evaluation • Compare the raw space required by PIC and that of the conventional approach where filters are not encoded.

  19. Performance evaluation • In PIC, TCAM space requirement consists of two components • The encoded filters • The codeword table for the two address fields. • n: total number of distinct prefixes.L: length of the overall codeword for a 5-tuple filter.r: number of replicated entries due to partially overlapping port range. • TCAM space for encoded filter table is (N + r) * L bits, and the space for the codeword table is n*32 bits.

More Related