Fast Incremental updates on TernaryCAMs for routing lookups and packet classification PowerPoint PPT Presentation

presentation player overlay
1 / 13
About This Presentation
Transcript and Presenter's Notes

Title: Fast Incremental updates on TernaryCAMs for routing lookups and packet classification


1
Fast Incremental updates on Ternary-CAMs for
routing lookups and packet classification
2
Ternary-CAM (TCAM)
  • TCAM is a special type of fully associative
    memory
  • Each cell in a TCAM can takes three logic states
    0, 1, X
  • X allows the TCAM to store wildcards
  • Fully parallel search

3
Longest Prefix match and Packet classification
  • The need to maintain a sorted list makes
    incremental update slow
  • Adding a new entry result in the need to move
    O(N) TCAM entries
  • ( N the total number of prefixes/rules)

4
Longest Prefix matching using TCAM
Empty space
General configuration of a TCM
5
Prefix-length ordering constraint
  • P j the set of all prefixes length j
  • Prefix-length ordering constraint
  • If jgtk, all prefixes in the set P j must appear
    before P k, but prefixes within P j may appear in
    any order

6
L-algorithm
  • L the width of the destination address field

The prefix-length ordering constraint enables an
empty memory location to be found in at most L
32 memory shifts.
7
PLO_OPT algorithm
  • The worse case number of memory operations is at
    least L/2
  • PLO_OPT is optimal on-line algorithm under the
    prefix-length ordering constraint

8
Chain-ancestor ordering constraint
  • If all prefixes were to be stored in a trie, data
    structure, only prefixes that lie on the same
    chain need to be ordered.
  • Only considering overlapping prefixes
  • Q3, Q2, Q1 must be in order
  • Q4 can be stored anywhere with respect to Q2 and
    Q3
  • Q4 must be stored at a lower location than Q1

9
Chain-ancestor ordering constraint
  • LC(p) the longest chain comprising prefix p
  • rootpath(p) the path from the trie root node to
    node p
  • hcld(p) highest prefix-child of p i.e.,
    among the children of p, the node which has the
    highest memory location in the TCAM
  • HCN(p) the chain comprising ancestors of p,
    prefix p itself, hcld(p), hcld(hcld(p)) and so on
    i.e., a descendant node of p is inHCN(p) if it
    is the highest prefix-child of its ancestor

10
CAO_OPT algorithm
Every prefix, p, is at a distance less than or
equal to D/2 prefixes from the free space pool,
where D len(LC(p))
11
Auxiliary trie data structure
  • The information to be keep in a trie node p
  • wt(p)
  • 1 if p is a leaf
  • max(wt(lchild(p),rchild(p))) if p is not a leaf
    and not a prefix
  • 1 max(wt(lchild(p),rchild(p))) otherwise
  • wt_ptr(p)
  • Keeps a pointer to the prefix-child has the
    highest weight
  • hcld_ptr(p)
  • Keeps a pointer to the prefix-child appears at
    the highest memory location in TCAM

12
Insertion in CAO_OPT
the prefix to be inserted is above the free space
pool
the prefix to be inserted is below the free
space pool
13
Deletion in CAO_OPT
Write a Comment
User Comments (0)
About PowerShow.com