Patent ID: 8869150

Claim:
A method of queuing tasks in a scheduling hierarchy of a network processor having a plurality of processing modules and at least one shared memory with packet data, the method comprising: generating, by a traffic manager of the network processor, a scheduling hierarchy comprising a tree structure of a root scheduler and N scheduler levels, wherein a scheduler is a branch node and a queue is a leaf node of the scheduling hierarchy, wherein N is a positive integer; generating, by the network processor, one or more tasks corresponding to each of a plurality of received packets associated with one or more data flows of the network processor; receiving, by the traffic manager, a task provided by one of the plurality of processing modules of the network processor; performing, by the traffic manager, a task enqueue operation for the task received by the traffic manager, wherein the task enqueue operation comprises: adding the received task to an associated queue of the scheduling hierarchy, wherein the queue is associated with a data flow corresponding to the received task, and wherein the queue has a corresponding scheduler level M, wherein M is a positive integer less than or equal to N; starting at the queue and iteratively repeating at each scheduling level until reaching the root scheduler of the scheduling hierarchy: maintaining, by each node in the scheduling hierarchy, an actual task count of tasks corresponding to the node; communicating, by each node in the scheduling hierarchy, a capped task count to a corresponding parent scheduler at a relative next scheduler level, wherein the capped task count corresponds to the actual task count capped to a maximum value, whereby task counters at each parent scheduler are bounded to known maximum sizes; acknowledging, by each parent scheduler, the capped task count; and updating, by each parent scheduler, an actual task count of tasks in child nodes of the parent scheduler.