Patent ID: 7177311

Claim:
A method comprising: establishing a packet flow cache having a plurality of entries each identifying one of a plurality of virtual router (VR) flows through a VR-based network device and corresponding forwarding state information; receiving a packet at a processing engine of a plurality of processing engines of the VR-based network device; determining one or more appropriate packet transformations for application to the packet by an ingress unit of a packet forwarding engine associated with the processing engine by performing flow-based packet classification on the packet; using a result of the flow-based packet classification to retrieve an entry of a plurality of entries of the packet flow cache; on a packet flow cache hit, determining, based on the corresponding forwarding state information of the retrieved packet flow cache entry, whether to software forward the packet via a processor of the VR-based network device or hardware forward the packet without intervention by the processor via a network interface of the VR-based network device; on a packet flow cache miss, identifying the existence of a new VR flow and upon successful allocation of a new entry of the packet flow cache for the new VR flow, forwarding the packet to software on the processor for flow learning.