Patent ID: 8199764

Claim:
A method of allocating queues in a network device, the method comprising: receiving a packet at an ingress port of a network device, wherein the ingress port has a plurality of virtual queues; making a classification for the packet according to a virtual queue from said plurality of virtual queues; determining, by searching a memory of allocated physical queues, whether a previously-allocated physical queue exists for the classification; allocating a physical queue for the classification corresponding to the virtual queue when no previously-allocated physical queue exists for the classification; associating the physical queue with the ingress port; storing information associated with the packet in the allocated physical queue, wherein the information comprises pointer information corresponding to a location of a payload of the packet, and wherein the payload for the packet is stored in a separate data structure from the physical queue; and scheduling the packet for transmission between the ingress port and one of a plurality of egress ports of the network device.