Patent ID: 8547878

Claim:
A method of scheduling packets for transmission by a network processor having a plurality of processing modules and at least one shared memory, 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; receiving, by the traffic manager, a task provided by one of the plurality of processing modules of the network processor, the task corresponding to each of a plurality of received packets associated with one or more data flows; queuing, by a finite state machine (FSM) of the traffic manager, the received task in an associated queue of the scheduling hierarchy, wherein the queue is associated with the data flow corresponding to the received task, and wherein the queue has a corresponding scheduler level M, the queue having a corresponding parent scheduler at each of M−1 levels in the scheduling hierarchy, wherein M is a positive integer less than or equal to N; maintaining, by each node in the scheduling hierarchy, one or more statistics corresponding to the node and one or more control indicators corresponding to the node; sending messages, by nodes at each of the N scheduling levels, only with one node at a relative next higher level and with one or more nodes at a relative next lower level; updating, by each node in the scheduling hierarchy, the corresponding one or more statistics and one or more control indicators based on messages received from the node at the next higher level and the one or more nodes at the next lower level.