Patent ID: 7583588

Claim:
A network device for processing packets, the network device comprising: an ingress module for performing lookups for layer 2 switching and for performing operations for maintaining a layer 2 table and a modification buffer, wherein when the ingress module updates the layer 2 table, the ingress module records the operation performed on the layer 2 table in the modification buffer, the ingress module adds entries to the modification buffer when the layer 2 table is modified and in the order in which the layer 2 table was modified, thereby enabling reconstruction of the layer 2 table by performing the operations in the modification buffer, wherein the ingress module comprises a first buffer and when the ingress module performs a learn operation, the ingress module schedules a learn instruction by marking a packet for possible learn and stores the packet in a first buffer, and wherein the first buffer includes one entry per port on the network device and each entry includes a first bit for indicating a status of the packet and a second bit for indicating if there is a source address in the entry, wherein if the status of the packet is known, the packet is received without errors and there is room in a second buffer, the learn instruction is copied from the first buffer to the second buffer.