System and method for dynamic ordering in a network processor
First Claim
1. A method for maintaining order among a plurality of threads disposed at one or more processors, each thread executing an instruction sequence, the method comprising the steps of:
- assigning, in a particular order, a set of threads to an order group;
treating the first assigned thread as being, at least initially, at a head-of-line (HOL) for the order group;
assigning a separate sequence number to each thread of the set, each sequence number indicating the order in which the respective thread was assigned to the order group;
providing a modifiable current HOL sequence value that specifies which sequence number is currently at the HOL of the order group; and
suspending a given thread of the set from performing at least some of the given thread'"'"'s instruction sequence until the given thread reaches the HOL of the order group as indicated by the modifiable HOL sequence value.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method maintains order among a plurality of threads in a multi-threaded processing system. The processing system, which may be disposed at an intermediate network device, has a plurality of processors each supporting a plurality of threads. The ordering system includes a dispatcher that assigns work, such as the processing of received packets to free threads, an order manager that keeps track of the relative order of the threads, and a thread client associated with each thread for enforcing the determined order. Packets to be processed by the processing system are assigned to an initial order group by the order manager based on a selected attribute, and those packets sharing the same attribute value are assigned to the same order group. During processing, a thread may request reassignment to other order groups in response to other attributes of the packets. The order manager preferably manages the switching of threads among order groups and ensures that the threads within each order group process their packets in order.
47 Citations
24 Claims
-
1. A method for maintaining order among a plurality of threads disposed at one or more processors, each thread executing an instruction sequence, the method comprising the steps of:
-
assigning, in a particular order, a set of threads to an order group;
treating the first assigned thread as being, at least initially, at a head-of-line (HOL) for the order group;
assigning a separate sequence number to each thread of the set, each sequence number indicating the order in which the respective thread was assigned to the order group;
providing a modifiable current HOL sequence value that specifies which sequence number is currently at the HOL of the order group; and
suspending a given thread of the set from performing at least some of the given thread'"'"'s instruction sequence until the given thread reaches the HOL of the order group as indicated by the modifiable HOL sequence value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. In an intermediate network node having a plurality of interfaces for sending and receiving network messages within a computer network, a forwarding engine configured to process network messages received at the intermediate network node, the forwarding engine comprising:
-
a plurality of threads for processing the received network messages;
a dispatcher for assigning at least a portion of the network messages to selected ones of the plurality of threads, wherein the dispatcher associates each network message with an order group;
an order manager in communicating relationship with the plurality of threads for tracking the relative order among threads associated with the same order group; and
a thread client associated with each thread, the thread clients configured to ensure that the threads process their respective network messages according to the threads'"'"' relative order within the order group. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification