1 / 25

PEDS: Parallel Error Detection Scheme for TCAM Devices

PEDS: Parallel Error Detection Scheme for TCAM Devices. David Hay, Politecnico di Torino Joint work with Anat Bremler Barr (IDC, Israel), Danny Hendler (BGU, Israel) and Ron Roth (Technion, Israel) Supported by a Cisco grant. 20/6/2008. Bottlenecks in Packet Switching. Packet Classification.

Télécharger la présentation

PEDS: Parallel Error Detection Scheme for TCAM Devices

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. PEDS: Parallel Error Detection Scheme for TCAM Devices David Hay, Politecnico di Torino Joint work with Anat Bremler Barr (IDC, Israel), Danny Hendler (BGU, Israel) and Ron Roth (Technion, Israel) Supported by a Cisco grant 20/6/2008

  2. Bottlenecks in Packet Switching Packet Classification Switching PacketScheduling

  3. deny 0 0 deny 1 1 2 2 accept 3 3 accept 4 4 deny 5 5 deny 6 6 deny 7 7 deny 8 8 accept 9 9 Packet Classification w/ TCAM accept TCAM Array Each entry represents a rule and is a word in {0,1,*}W 2 Encoder Match lines Packet Header

  4. TCAM Dimensions • 100,000-200,000 rules (rows) • Each entry is 100-150 ternary symbols (column) • This leaves few dozens (~36) extra symbols in each entry, that can be used to optimize TCAM performance

  5. TCAM-Related Challenges • How to efficiently represent rules with range fields? • E.g., all packets with dest-port [1,6] or [1024,216-1] are accepted, all other are denied. • One possibility: prefix expansion. Use multiple entries to code a single rule. • [1,6]= {001, 01*,10*, 110} • Causes 16% more entries in real TCAMs. • Better solution: use the extra symbols to code ranges. Reduces dramatically the number of additional entries required. [Bremler-Barr, Hay, Hendler and Farber, SIGMETRICS 2008] • This talk: Error Correction codes for TCAM. [Bremler-Barr, Hay, Hendler and Roth]

  6. 1 1 0 * 1 * 1 *1 1 0 1 1 1 0 * 1 * 1 *1 1 0 1 Types of TCAM Errors 1 0 0 No Match 0 1 1 2 2 • False Miss • False Hit • Indirect False Hit 1 1 0 0 1 1 0 0

  7. 1 1 0 * 1 * 1 *1 1 0 1 1 1 0 * 1 * 1 *1 1 0 1 Types of TCAM Errors 1 0 0 1 0 1 1 2 2 • False Miss • False Hit • Indirect False Hit 1 1 1 1 1 1 1 1

  8. 1 1 0 * 1 * 1 *1 1 0 1 1 1 0 * 1 * 1 *1 1 0 1 Types of TCAM Errors 1 0 0 0 2 1 1 2 2 • False Miss • False Hit • Indirect False Hit 1 1 0 1 1 1 0 1

  9. TCAM Errors vs. SRAM Errors • In SRAM (or any regular memory) • Input: address (entry number) • Output: content of that address • One can apply an error detection/correcting code on that content • In TCAM • Even if the content seems OK, we still have false miss or indirect false miss errors • TCAM EDC/ECC are harder: we prove that on-the-fly error correcting is impossible, and that hardware change is needed for error detection

  10. PEDS • We add one or more check symbols to each entry as error detection code • In most TCAM configuration, extra-bits are available anyway • With the TCAM parallel lookup we provide a generic scheme with tradeoff points between: • Resilience • Number of extra-bits • Time till all errors are detected • Hardware changes • Most tradeoff points can be set after deployment Always Depends on the entry width and not number of entries

  11. Toy Example • For each entry, duplicate each symbol0*10  00**1100 • The entry is correct iff each pair has the equal symbols: 00, 11 or **. • Applying two lookups for the first pair:01******10****** • If 00, 11 – none of the lookups match. If **, both lookups match • If 01, 0*, *1 – only first lookup matches • If 10, 1*, *0 – only second lookup matches • Repeat for all other pairs. Even number of Matches Odd number of Matches

  12. Hardware Change Encoder One XOR gate + One single-bit register per match lines (+control lines) Each register will save the result of the previous match and XOR it withthe result of the current match. This will enable us to determine if we got even or oddnumber of matches .

  13. One Generalization k • One check symbol for each k symbols (a.k.a. k-clause) • Previous toy example: k=1 • Total Space: W/k extra bits. • Resilience*: W/k

  14. Determining Check Symbols • Treat the symbols as element over GF(3) “1” ↔ +1 “0” ↔ -1 “*” ↔ 0 • Each k-clause is just a vector over GF(3)k • Add parity check symbolx for any k-clause, that is where wi is the i-th symbol of the clause “*” has a special semantic and so does 0

  15. Determining Lookup Set • Set of lookup keys C: set of all vectors GF(2)k+1,, such that the sum of all their elements is either +1 or -1 • GF(2)={-1,+1}, no ‘*’s, • Main Theorem - even-correct/odd-wrong property: The number of keys in C that matches a clause i is even if and only if clause i is correct • Proof by induction... • Can be further generalized to any linear [n,k,d] code • This is the linear [n=k+1, k,2] code • (Much) more sophisticated lookup keys derivation, using the parity-check matrix of the code 

  16. PEDS Performance • Total Space: W/k extra bits. • Resilience*: W/k • #keys for k symbols ~ 2k+2/3 • #lookups ~ W[2k+2/(3k)]

  17. Pushing the counters out k M (log M)/2 XOR gates (log M)/M registers per entry on average • Suppose that only one error can occur in the same clause • of each M lines

  18. 1 0 1 0 0 0 0 1 0 0 Pushing the counters out Syndrome of v: s=Hv k 001 010 011 M 100 101 110 111 unit vector v (specific) parity check matrix H Problem: even if we assume one error, we don’t have a unit vector!

  19. Pushing the counters out • Added hardware  multiple a matrix H with a vector v. • returns the right syndrome only if v is a unit vector • We have one vector for each lookup key v1, v2,…vn we compute Hv1Hv2 … Hvn • By even-correct/odd-wrong and the single error assumption: v=v1v2…vn is a unit vector with 1 in the erroneous entry  Hv1Hv2 …  Hvn = H (v1v2 …  vn) =H·v = s is the right syndrome! • Right result in the end, meaningless values in the middle

  20. Wrap-up • Detecting all errors using the built-in parallel lookup of the TCAM • The number of lookups is a function of W, the width of the TCAM word, and not the number of entries in the database. • Requires a hardware change, but only in the peripheral circuitryof the TCAM chip • More generalizations and constructions in the paper… • Using other codes • Using 3-mod counter to reduce time (=hardware-time tradeoff) 

  21. Thank You

  22. Using other codes - Preliminaries • (Ternary) linear code [n,k,d] is a set of 3k vectors of length n over GF(3) that: • forms a linear space over GF(3) • have minimum Hamming distance d • encodes words in GF(3)k to words in GF(3)n • Each linear code has a parity check matrix H • The linear code C is H’s right kernel: C= {vGF(3)n|HvT=0} • If the rows of H are h1,h2,...,hr this is equivalent to: v is error free if and only if for each i, hivT=0

  23. Using other codes – TCAM definition • The support of a vector is the set of indices in which it has no ‘0’. ( no ‘*’) • Two vectors match if they have the same value in their joint support uj=vj for every jJ(u)J(v) J(u) is the support of u

  24. Determining set of search keys • s(h;b) = {uGF(3)n|J(u)=J(v) and huT=b} • Same non-’*’ coordinates, scalar product b • If h has hamming weight w then: • |s(h;0)| = 2/3(2w-1+(-1)w) • |s(h;1)| = 1/3(2w-(-1)w) • L(h) = s(h;+1)s(h;-1) • For h,vGF(3)nwhere h0:hvT=0 iff the number of vectors in L(h) that matches v is even  L = L(h1) L(h2)  …  L(hr) where hi is the i-th row of the parity check matrix of the code. Even number Odd number

More Related