Patent ID: 9330760
Filing Date: 2016-05-03
CPC Classification: G11C,H04L

Claim Text:
1. A method for setting a ternary content-addressable memory (TCAM) entry, comprising: acquiring a number set formed by values of a same field in at least two packets, wherein the packets undergo a same action, and the number set comprises at least two numbers; acquiring a longest continuous mask of the number set, wherein the longest continuous mask is a continuous mask with a largest quantity of Don't Care bits in all continuous masks in all masks of the number set, each of the continuous masks is a mask of continuous Don't Care bit or a mask of the continuous Don't Care bit after the mask undergoes a bitwise rotation operation, each of the masks of the number set is an element in a first mask set of the number set, the first mask set of the number set is a group of masks that can match all elements in the number set and do not match any number except the elements in the number set; obtaining an acquisition result according to the longest continuous mask of the number set; and storing the acquisition result in the TCAM entry corresponding to the same action; wherein acquiring the longest continuous mask comprises: