Patent ID: 8837501

Claim:
A method of sharing data between nodes 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 levels of schedulers, wherein the root scheduler and each level scheduler is a branch node and each queue in the scheduling hierarchy 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, wherein each task includes a shared parameter ID value; receiving, by the traffic manager, a particular task of the one or more tasks provided by a corresponding one of the plurality of processing modules of the network processor as a received task; determining, by the traffic manager, the shared parameter ID value of the received task; queuing, by the traffic manager, the received task in an associated queue of the scheduling hierarchy, wherein the associated queue is associated with a data flow corresponding to the received task, and wherein the associated queue has a corresponding scheduler level M, the associated queue having a corresponding parent scheduler at each M−1 level in the scheduling hierarchy, wherein M is a positive integer less than or equal to N; determining, by the traffic manager, a shared parameter ID value of the associated queue; loading, from a shared parameter data structure in the at least one shared memory to a corresponding level one (L1) cache of the traffic manager, one or more shared parameter values corresponding to at least one of the determined shared parameter ID value of the received task and the determined shared parameter ID value of the associated queue; controlling, by the traffic manager based on the one or more shared parameter values, one or more scheduling parameters of the received task, and if the shared parameter ID value of the received task is a predetermined value: loading, from the shared parameter data structure in the at least one shared memory to the corresponding L1 cache, one or more shared parameter values corresponding to the determined shared parameter ID value of the associated queue, thereby sharing one or more control values between tasks associated with a given queue; otherwise, loading, from the shared parameter data structure in the at least one shared memory to the corresponding L1 cache of the traffic manager, one or more shared parameter values corresponding to the determined shared parameter ID value of the received task, thereby sharing one or more control values between tasks associated with one or more data flows.