Patent ID: 8848724

Claim:
A method comprising: selecting, for evaluation, a packet queue from a plurality of packet queues; determining a drop count associated with the selected packet queue; when the drop count is above a predetermined threshold for the selected packet queue and when the selected packet queue is a high priority queue: reallocating buffers to the selected packet queue by: (1) de-allocating unused buffers from at least two other packet queues from the plurality of packet queues to define a set of unused buffers, (2) allocating a first set of buffers from the set of unused buffers to the selected packet queue, (3) allocating a second set of buffers from the set of unused buffers not including the first set of buffers among lower priority queues from the plurality of packet queues, based at least on an occupancy of each lower priority queue from the plurality of packet queues; when the drop count for the selected packet queue is above the predetermined threshold and when the selected packet queue is not a high priority queue, re-allocating to the selected packet queue an amount of buffers, the amount of buffers being lesser of (1) a sum of the drop count and a current buffer allocation of the selected packet queue, and (2) a maximum allowable buffer allocation associated with a priority level of the selected packet queue; when the drop count for the selected packet queue is not above the predetermined threshold, de-allocating buffers from the selected packet queue in stages to achieve an allocation of buffers for the selected packet queue.