Patent ID: 7392349

Claim:
A method of controlling a content addressable memory (CAM) device: generating a data structure that specifies (i) a prioritized set of rules and (ii) addresses within the CAM device for one or more match clauses of each of the rules; recording a new rule having a specified priority in the data structure; identifying candidate addresses within the CAM device for the one or more match clauses of each of the rules having a lower priority than the new rule; comparing the candidate addresses with the addresses specified by the data structure; storing, in the CAM device, each of the match clauses for which the candidate address does not match the address specified by the data structure; and wherein identifying candidate addresses for the match clauses of each of the rules having a lower priority than the new rule comprises allocating respective CAM addresses to the match clauses, including obtaining each of the CAM addresses from either (i) a list of CAM addresses that correspond to unoccupied storage locations within the CAM device or (ii) a record of CAM addresses that correspond to storage locations already occupied by the match clauses of the rules having a lower priority than the new rule.