Patent ID: 7539143

Claim:
A method comprising: receiving data at a first port of a network switching device from a transmitting device; queuing the received data into a plurality of virtual output queues (VOQs) in an ingress memory system of the network switching device, including dynamically allocating memory to each of the plurality of VOQs on an as-needed basis; using a buffer-to-buffer credit scheme to regulate ingress of data into the network switching device at the first port, based on an amount of memory used by each of the VOQs and an amount of memory assigned to a free queue of the ingress memory system, and further based on a set of quality of service (QoS) related parameters and policies, wherein using the buffer-to-buffer credit scheme includes dynamically tracking and updating a number of queue credits associated with the first port, the number of queue credits being indicative of one or more of the VOQs using more than a maximum threshold number of buffers, dynamically tracking and updating a number of port credits associated with the first port, the number of port credits being indicative of a free queue having fewer than a minimum threshold number of buffers, and using the number of queue credits and the number of port credits to regulate incoming data traffic to the first port; outputting data from specific ones of the VOQs, based on the set of QoS related parameters and policies and the amount of memory used by the VOQs; associating the data output from the VOQs with QoS related metadata; transmitting the data output from the VOQs and the associated metadata into a switching fabric within the network switching device, for transmission to a second port within the network switching device; and transmitting the data from the second port to a device which is external to the network switching device.