Patent ID: 7787463

Claim:
A network device for routing packets, the network device comprising: a processor comprising a plurality of slices configured to classify packets and generate at least one action based on a classification of a packet, wherein each of the plurality of slices applies specific fields from the packet to an associated memory device that compares input to the memory device with entries in the memory device and outputs an address for a matched entry, wherein the memory device comprises a mask for each memory entry to enable selection of bits that are required to match exactly with bits from the input to the memory device, and wherein the specific fields include a plurality of fields some of which include multiple field values and definitions, an input bit map field of one of the plurality of fields being used to provide an additional global mask that is ANDed to associated masks in selected entries in the memory device thereby enabling the memory device to output an OR of the data in the selected entries and thereby allowing multiple ports to share a rule within a memory device entry.