Claims
- 1. A method for managing lookup rules in a ternary content addressable memory (CAM), comprising:
performing lookups using a first set of rules; flagging a subset of the first set of rules as old rules; adding a second set of rules, while continuing to perform lookups using the first set of rules; and atomically transitioning to perform lookups using the first set of rules plus the second set of rules minus the old rules.
- 2. The method of claim 1, wherein said atomically transitioning further comprises:
changing the atomic bit in a comparand.
- 3. The method of claim 1, wherein said first set of rules, excluding said subset, are not flagged and said second set of rules are flagged as new rules, further comprising:
using lookup rules that are not flagged, and using lookup rules that are flagged as old rules, prior to said atomically transitioning, wherein said atomically transitioning further comprises ceasing to use lookup rules that are flagged as old rules and beginning to use lookup rules that are flagged as new rules.
- 4. The method of claim 3, further comprising
unflagging the new rules; and deleting the rules flagged as old rules.
- 5. The method of claim 6, wherein said performing lookups using said first set of rules further comprises:
performing, on each rule of the first set of rules, an order of one comparison with a comparand associated with a traffic class of a packet for which the lookup is being performed; and electing a rule of the first set of rules that is a best match for the comparand.
- 6. A packet-based traffic forwarding lookup system configured for use with a packet processor module that receives packets, performs lookups that utilize said system, and forwards said packets according to the lookups, comprising:
a comparand structure including a comparand atomic bit; a lookup table having a plurality of lookup table entries, wherein each lookup table entry is associated with a respective atomic bit and a respective rule, wherein a comparison of the comparand structure with the lookup table entries for which the comparand atomic bit and the respective atomic bits match, establishes one or more matches; and a lookup table management module configured to manipulate the atomic bit and the respective atomic bits to atomically update the lookup table entries such that the respective rules associated with the one or more matches are non-transient.
- 7. The system of claim 6, wherein the lookup table is embodied in a content addressable memory (CAM).
- 8. The system of claim 6, said lookup table management module further comprising:
memory including executable code for routines the lookup table management module is configured to perform; and a processor for executing said routines.
- 9. The system of claim 6, wherein said lookup table entries further include respective comparand keys, and wherein said comparison further comprises comparing the comparand structure with the respective comparand keys.
- 10. The system of claim 9, wherein said comparand atomic bit is in a most significant bit location of the comparand and wherein said respective atomic bits are in most significant bit locations of each comparand key.
- 11. The system of claim 6, wherein said respective atomic bits are configured to include values selected from the values consisting of on, off, and wildcard, wherein said lookup table management module is further configured to:
turn off the comparand atomic bit; receive a set of new rules, wherein when the set of new rules is received the rule configuration is an old rule configuration with an associated set of old rules; flag a subset of the set of old rules, that are to be deleted when transitioning from the old rule configuration to a new rule configuration, by turning off the respective atomic bit of each lookup table entry associated with a respective rule of the subset of old rules; add to the lookup table new lookup table entries, respectively associated with rules of the set of new rules, with respective bits that are on; turn on the comparand atomic bit, thereby atomically transitioning from the old rule configuration to the new rule configuration.
- 12. The system of claim 11, wherein said lookup table management module is further configured to:
delete each lookup table entry associated with a rule of the subset of old rules; set to wildcard the respective atomic bits associated with rules of the set of new rules; and turn off the comparand atomic bit.
- 13. The system of claim 12, wherein said comparand structure is configured to include a comparand associated with a packet, further comprising:
a priority arbiter configured to determine a best match of the one or more matches when a packet processor module performs a lookup for a packet; and an associated data database configured to contain data associated with the set of comparand keys, wherein each comparand key and data associated with the comparand key defines a rule and wherein the rules define a rule configuration.
- 14. The system of claim 13, wherein said system receives said packet from a packet processor module, further comprising:
a lookup engine configured to:
obtain lookup criteria from a packet; store in the comparand structure the lookup criteria; receive from the priority arbiter the best match of said one or more matches for the lookup criteria; find data associated with the lookup criteria in the associated data database; obtain routing information from the associated data; and send the routing information to a packet processor module, wherein the packet processor module forwards the packet according to the routing information.
- 15. The system of claim 14, said lookup engine further comprising:
memory including executable code for applications the lookup engine is configured to perform; and a processor for executing said applications.
- 16. The system of claim 13, wherein said comparand includes an Internet protocol (IP) address and said data associated with said best match includes routing information.
- 17. The system of claim 13, wherein the associated data database includes a static random access memory (SRAM).
- 18. A computer program product for managing lookup rules in a ternary content addressable memory (CAM), wherein rule matches are made by comparing a comparand to comparand keys, said computer program product comprising computer code for:
turning off an atomic bit of a comparand; switching off ternary atomic bits of respective comparand keys for a subset of old rules; adding new rules with ternary atomic bits of respective comparand keys of the new rules set to on, wherein the atomic bit of the comparand does not match the ternary atomic bits of the respective comparand keys of the new rules when the new rules are added; and turning on the atomic bit of the comparand, thereby atomically transitioning from an old rule configuration to a new rule configuration that includes the new rules and the old rules excluding the subset.
- 19. The computer program product of claim 18, further comprising computer code for:
deleting each comparand key of the subset of old rules; setting the ternary atomic bit of each comparand key of the new rules to wildcard; and turning off the atomic bit of the comparand, wherein said turning off of the atomic bit of the comparand has no effect on matching the comparand to each comparand key of the new rules because the ternary atomic bit of each comparand key of the new rules has a wildcard value.
- 20. The computer program product of claim 19, further comprising computer code for:
deleting rules data that is exclusively associated with the comparand keys of the subset of old rules.
CROSS REFERENCE TO RELATED APPLICATION
[0001] This application is entitled to the benefit of provisional Patent Application Serial No. 60/385,918, filed Jun. 04, 2002.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60385918 |
Jun 2002 |
US |