Patent ID: 8869151

Claim:
A method of controlling a state of each node 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; enqueuing, by the traffic manager, a task provided by one of the plurality of processing modules of the network processor to an associated queue of the scheduling hierarchy, wherein the queue is associated with a data flow corresponding to the received task; maintaining one or more scheduling data structures for each node in the scheduling hierarchy, wherein the one or more scheduling data structures comprise a backpressure indicator and a timer indicator; if the backpressure indicator is set: setting the node as unavailable for scheduling; removing the node from the scheduling hierarchy; if the timer indicator is set: setting the node as unavailable for scheduling; otherwise, if neither the backpressure indicator nor the timer indicator is set: setting the node as available for scheduling.