Patent ID: 8160085

Claim:
A method, comprising: determining a drop count for a packet queue from a plurality of packet queues; comparing the drop count to a predetermined drop count threshold for the packet queue; if the drop count is below the predetermined threshold for the packet queue, de-allocating buffers from the packet queue by (1) determining an allocation of buffers and (2) de-allocating buffers in stages to achieve that allocation; and if the drop count is above the predetermined threshold for the packet queue, determining whether the packet queue is a high priority queue: if the packet queue is a high priority queue, rapidly re-allocating buffers to the packet queue by (1) determining buffers used by the high priority queue to lower the drop count, (2) determining leftover buffers not required by the high priority queue, (3) allocating the leftover buffers among lower priority queues from the plurality of packet queues according to free space and occupancy of each remaining packet queue from the plurality of packet queues, and (4) allocating buffers used by the high priority queue to lower the drop count to the high priority queue; and if the packet queue is not the high priority queue, allocating buffers to the packet queue.