Patent ID: 7028098

Claim:
A method for classifying a plurality of data flows in a router comprising the steps of: partitioning a ternary content addressable memory (TCAM) into at least a first partition and a second partition; said first partition includes indices having highest priority ranging from a lowest index to a partition index and said second partition includes indices having lowest priority ranging from a highest index to said partition index; loading one or more first flow TCAM entries of a first of said plurality of data flows into said first partition in a predetermined order; loading one or more second flow TCAM entries of a second of said plurality of data flows into said second partition in a predetermined order; setting bit values of a corresponding mask for each of said first TCAM entries and said second TCAM entries such that bits of said respective first TCAM entries and said second TCAM entries are individually masked by said masks; and comparing a prefix comprising predetermined packet header information of an incoming packet to said loaded one or more first TCAM entries and one or more second TCAM entries such that a matching said one or more first TCAM entries subsumes any matching said one or more second TCAM entries.