A method for routing packets in a router includes establishing a flow data
structure identifying a packet flow through a virtual router in the
router. Next, a system executing the method receives a packet, said
packet having at least one packet header. The method then compares a
subset of the at least one packet header to a subset of the flow data
structure. If the subset of the at least one packet header matches the
subset of the flow data structure, then the packet can be hardware
accelerated to a network interface. Otherwise, the packet can be either
dropped, or forwarded to a general purpose processor for processing.