A device and method for handling Multiprotocol Label Switching (MPLS)
label stacks. An incoming label mapping (ILM) table is stored in a first
memory. A received packet's label stack is accessed, and an entry
corresponding to a top label of the stack is read from the ILM table. A
number of other entries are also read from the ILM table, and these other
entries are cached in a second memory.