The present invention relates to the field of a packet switching network, and more particularly to implementing a real-time queue for storing real-time data and a non-real-time queue for storing non-real-time data thereby reducing the complexity of a scheduler.
A packet switching or routing network (referred to as a switching network henceforth) has switches used for transmission of data among senders and receivers connected to the network. The switching performed by these switches is in fact the action of passing on packets of data received by a switch to a further switch in the network. Such switching actions are the means by which communication data is moved through the packet switching network.
Each switch may include what is commonly referred to as a switch fabric configured to process packets between input and output packet processor. Each switch may further comprise one or more packet processors coupled to the switch fabric. The packet processors may further be configured to direct the incoming packets of data across the switch fabric to particular packet processors. Each packet processor may be configured to provide traffic to the switch fabric and accept traffic from the switch fabric. Each packet processor may further be configured to accept/transmit data from/to hosts, respectively. Thus, any host connected with one of the packet processors may communicate with another host connected to another packet processor.
Due to bottlenecks in processing in packet processors or in transferring traffic across the switch, data packets may be required to wait prior to being processed by a packet processor and transmitted to another packet processor or switch in the packet switching network. As a result, queues configured to temporarily store data packets may be implemented in the packet processor. Coupled to the queues may be mechanisms to enqueue the data packets into the queues. That is, the enqueuing mechanisms may be configured to insert the packets in the corresponding queues. It is noted that a portion or all of the queues may be part of the same physical memory resource.
Typically, packets are assigned a priority where the priority may be determined based on a value of particular bits in the packet header. The packets with a higher priority may be processed prior to the packets with a lower priority. After each particular interval of time, a scheduler in the packet processor may be configured to search through all the queues storing packets and identify the packet with the highest priority to be transmitted. However, in order for the scheduler to search through all the queues storing packets and identify the packet with the highest priority to be transmitted, the scheduler may be complex to implement such as by having multiple sub-queues and logic for identifying multiple priorities.
It would therefore be desirable to implement a simpler scheduler without the complexity in design of having multiple sub-queues and logic for identifying multiple priorities in order to identify the packet to be transmitted.
The problems outlined above may at least in part be solved in some embodiments by prioritizing packets based on the urgency of processing them. Packets that are classified as being urgent to be processed may be referred to as real-time packets. Packets that are classified as not being urgent to be processed may be referred to as non-real-time packets. Real-time packets have a higher priority than non-real-time packets and hence may be processed prior to non-real-time packets. One queue (“real-time queue”) may be designated to store real-time packets and another queue (“non-real-time queue”) may be designated to store non-real-time packets. A scheduler coupled to both queues may then be configured to determine if there are any real-time packets in the real-time queue designated to real-time packets. If there are any real-time packets in the real-time queue, then the scheduler may be configured to select the next real-time packet in the real-time queue to be enqueued in anther queue for transmission. If there are no real-time packets in the real-time queue, then the scheduler may be configured to select the next non-real-time in the non-real-time queue to be enqueued in another queue for transmission. By storing the higher priority real-time packets in a separate queue than the lower priority non-real-time packets, the scheduler does not have to search through multiple sub-queues in the system to identify the packet with the highest priority as in prior art. Hence, the scheduler may be simpler in design than the scheduler in prior art.
In one embodiment of the present invention, a method for transmitting packets in a packet switching network may comprise the step of receiving a packet of data. The packet may be received by a packet processor in a switch in the packet switching network where the packet processor may be configured to process packets of data. The packet processor may comprise a flow control unit configured to receive the packet of data.
A determination may then be made by the flow control unit as to the time priority of the received packet. That is, a determination may be made by the flow control unit as to whether the received packet is a real-time packet or a non-real-time packet. Real-time packets may refer to packets that are classified as being “urgent” to be processed, e.g., packets containing data for voice, radio. Non-real-time packets may refer to packets that are classified as being “not urgent” to be processed, e.g., packets containing data for electronic mail, x-rays, backup data storage. Real-time packets have a higher priority than non-real-time packets and hence may be processed prior to non-real-time packets.
The flow control unit may further be configured to determine the value priority of the received packet. The value priority may refer to the rank or priority assigned to the class of packets that includes the received packet. Packets assigned a higher priority value with a particular time priority, e.g., real-time, non-real-time, may be processed by the packet processor preferentially to packets assigned a lower priority value with the same time priority.
The flow control unit may further be configured to direct the received packet to an appropriate flow controller in the packet processor. A flow controller may be configured to determine whether to discard or transmit the received packet as discussed below. Each flow controller in the packet processor may be associated with a particular class of packets assigned with a particular value priority and time priority, e.g., real-time, non-real-time. For example, one flow controller may be associated with a class of packets, e.g., packets containing voice data, with a value priority of 0 (the highest possible) and a time priority for real-time packets. Another flow controller may be associated with a class of packets, e.g., packets containing radio data, with a value priority of 1 (the second highest possible after value priority of 0) and a time priority for real-time packets. Another flow controller may be associated with a class of packets, e.g., packets containing x-ray data, with a value priority of 0 and a time priority for non-real-time packets. Another flow controller may be associated with a class of packets, e.g., packets containing electronic mail data, with a value priority of 1 and a time priority for non-real-time packets.
A determination may then be made by the appropriate flow controller as to whether to transmit or discard the received packet. If the appropriate flow controller determines to discard the received packet, then the received packet is discarded. If the appropriate flow controller determines to transmit the received packet, then the received packet is inserted in one of two particular queues, e.g., First-In-First-Out (FIFO) queues, in the packet processor. If the received packet is a real-time packet, then if the appropriate flow controller determines to transmit the received packet, the received packet is inserted in a queue referred to as a real-time queue. A real-time queue may refer to a queue configured to store real-time packets. If the received packet is a non-real-time packet, then if the appropriate flow controller determines to transmit the received packet, the received packet is inserted in a queue referred to as a non-real-time queue. A non-real-time queue may refer to a queue configured to store non-real-time packets.
A scheduler, coupled to the real-time queue and non-real-time queue, may select the next real-time packet to be transmitted if there are any real-time packets in the real-time queue. However, if there are no real-time packets in the real-time queue, then the scheduler may select the next non-real-time packet in the non-real-time queue to be transmitted if there are any non-real-time packets in the non-real-time queue. If there are no real-time packets in the real-time queue and no non-real-time packets in the non-real-time queue, then the scheduler may wait for the next real-time or non-real-time packet to be inserted in their respective queue. By storing the higher time priority real-time packets in a separate queue than the lower time priority non-real-time packets, a simpler scheduler may be designed that does not have to search through multiple sub-queues to identify the packet with the highest priority as in prior art. Instead, the scheduler may simply select the next packet to be serviced from either the real-time queue or the non-real-time queue.
The packet selected may then be enqueued in another queue for transmission to another switch, to the switch fabric or to another packet processor to be processed.
The foregoing has outlined rather broadly the features and technical advantages of one or more embodiments of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention.
A better understanding of the present invention can be obtained when the following detailed description is considered in conjunction with the following drawings, in which:
Referring to
Flow control unit 201 may further be configured to direct the received packet to an appropriate flow controller 202A-D (denoted by circles with X's) in
As stated above, flow controller 202 may be configured to determine whether to discard or transmit the received packet of data. Each flow controller 202 may be configured to generate a particular transmit probability. The transmit probability may refer to the probability of transmitting packets or bits. As the packet is received by flow controller 202, flow controller 202 may be configured to fetch a random number from a table (not shown) which may then be compared with the generated transmit probability. If the transmit probability is greater than or equal to the random number, then the packet may be inserted in a queue 203A, 203B. If the transmit probability is less than the random number, then the packet is discarded. Flow controller 202 may be configured to discard a real-time packet or insert a real-time packet in queue 203A based upon its value priority, the minimum and maximum rates for that value priority and the current queue 203A congestion conditions. Furthermore, flow controller 202 may be configured to discard a non-real-time packet or insert a non-real-time packet in queue 203B based upon its value priority, the minimum and maximum rates for that value priority and the current queue 203B congestion conditions. Additional details regarding flow controllers 202 are disclosed in U.S. application Ser. No. 09/448,197 filed on Nov. 23, 1999, entitled “Method and System for Providing Differentiated Services in Computer Networks,” Attorney Docket No. RAL9-99-0138.
The rate flow controller 202 transmits packets to a queue 203A, 203B, commonly referred to as a “flow rate”, may be periodically updated. That is, the number of packets transmitted by flow controller 202 within a particular period of time to a queue 203A, 203B may be periodically updated. The transmit probability may be increased linearly if the flow rate or a smoothed measure of the flow rate is less than or equal to a minimum rate of transmission. The minimum rate of transmission may refer to a minimum number of packets or bits per unit of time of a particular class with the same time and value priority to be transmitted by an associated flow controller 202 to a queue 203A, 203B. However, the transmit probability may be decreased exponentially if the flow rate or a smoothed measure of the flow rate is greater than a maximum rate of transmission. The maximum rate of transmission may refer to a maximum number of packets or bits per unit of time of a particular class to be transmitted by an associated flow controller 202 to a queue 203A, 203B. If the flow rate or a smoothed measure of the flow rate is between a minimum and maximum rate of transmission and there is available space in the queue 203A, 203B receiving the transmitted packets, the transmit probability is linearly increased. However, if the flow rate is between a minimum and maximum rate of transmission and there is not available space in the queue 203A, 203B receiving the transmitted packets, the transmit probability is exponentially decreased. By linearly increasing the transmit probability as described above at different rates for each flow controller 202, packets with a higher value priority may be able to acquire bandwidth faster when it becomes available than packets with a lower value priority. Furthermore, by exponentially decreasing the transmit probability as described above at different rates for each flow controller 202, packets with a higher value priority may be able to release bandwidth slower when it becomes scarce than packets with a lower value priority. Additional details regarding updating the flow rate are disclosed in U.S. application Ser. No. 09/448,197 filed on Nov. 23, 1999, entitled “Method and System for Providing Differentiated Services in Computer Networks,” Attorney Docket No. RAL9-99-0138.
As stated above, if the transmit probability is greater than or equal to the random number, then flow controller 202 may insert the received packet to a queue 203A, 203B. Flow controllers 202, e.g., flow controllers 202A-B, associated with a class of packets with a time priority for real-time packets, transmit the received packets to real-time queue 203A. Flow controllers 202, e.g., flow controllers 202C-D, associated with a class of packets with a time priority for non-real-time packets, transmit the received packets to non-real-time queue 203B. By having queue 203A designated to store real-time packets and queue 203B designated to store non-real-time packets, a simpler scheduler, such as scheduler 204 illustrated in
As stated in the Background Information section, packets are typically assigned a priority where the priority may be determined based on particular bits in the packet header. The packets with a higher priority may be processed prior to the packets with a lower priority. After each particular interval of time, a scheduler may be configured to search through all the queues storing packets and identify the packet with the highest priority to be transmitted. However, in order for the scheduler to search through all the queues storing packets and identify the packet with the highest priority to be transmitted, the scheduler may be complex to implement such as by having multiple sub-queues and logic for identifying multiple priorities. It would therefore be desirable to implement a simpler scheduler without the complexity in design of having multiple sub-queues and logic for identifying multiple priorities in order to identify the packet to be transmitted. By separately storing real-time packets and non-real-time packets in separate queues 203 while assigning a higher priority to real-time packets than non-real-time packets, a simpler scheduler may be implemented.
As stated above, real-time packets are assigned a higher time priority than non-real-time packets thereby requiring real-time packets to be processed prior to non-real-time packets. Scheduler 204 may be configured to first determine if there are any real-time packets in real-time queue 203A. If there are any real-time packets in real-time queue 203A, then scheduler 204 may be configured to select the next real-time packet, e.g., the next real-time packet in the real-time FIFO queue 203A, to be enqueued in queue 204 for transmission to port 104 (
Upon enquing the selected packet in queue 205, the selected packet may be transmitted to either port 104 for further transmission to another switch 100 (
By separating packets that may be classified as real-time and non-real-time into separate queues 203 and assigning real-time packets a higher priority than non-real-time packets as discussed above, the latency for processing real-time packets by packet processor 103 may be calculated. The latency for processing real-time packets may be calculated since the latency for real-time packets depends only on real-time traffic; whereas, the latency for non-real-time packets depends on both real-time and non-real-time traffic. The latency for real-time packets depends only on real-time traffic since real-time packets are assigned a higher priority than non-real-time packets. For example, suppose each packet received by packet processor 103 is 1,000 bits long. If the processing rate of packet processor 103 is 1 gigabit/second, then packet processor 103 may be able to process a packet in 1 microsecond. If there are four flow controllers 202 associated with four different value priorities for real-time packets, then a maximum latency for processing real-time packets may occur when four real-time packets with corresponding four different value priorities arrive concurrently at packet processor 103. The maximum latency may then be 3 microseconds corresponding to the time to process three packets prior to processing the fourth received real-time packet. Similarly, an upper limit on jitter for real-time packets may be calculated.
In regards to practicing the principles of the present invention as described, a few principles emerge as discussed below. The sum of a maximum rate of packets or bits for each class associated with real-time packets to be transmitted by an appropriate flow controller 202 to queue 203A must be less than the processing capacity of packet processor 103. Furthermore, the sum of a maximum rate of packets or bits for each class associated with real-time packets to be transmitted by an appropriate flow controller 202 to queue 203A plus the sum of a minimum rate of packets or bits for each class associated with non-real-time packets to be transmitted by an appropriate flow controller 202 to queue 203B must be less than the processing capacity of packet processor 103 as illustrated in Table 1 as shown below. It is noted that “packets” may be a constant or variable size.
As shown above, Table 1 has a column entitled “class” representing the class of received packets, e.g., real-time packets, non-real-time packets. Table 1 further has a column entitled “priority value” referring to the priority value assigned to the class of packets where priority value 0 has a higher priority than priority value 1. The column entitled “minimum” may represent the minimum rate of packets or bits with that time and value priority that must be transmitted by the appropriate flow controller 202 to the appropriate queue 203. The column entitled “maximum” may represent the maximum rate of packets or bits with that time and value priority that may be transmitted by the appropriate flow controller 202 to the appropriate queue 203. The column entitled “offered” may refer to the rate of packets or bits associated with a particular priority value and class that were received by the appropriate flow controller 202. The column entitled “transmitted” may refer to the ideal rate of packets associated with a particular time and value priority that are to be transmitted by the appropriate flow controller 202 to the appropriate queue 203 using the principles of the present invention as described above.
As illustrated in Table 1, assuming that the processing capacity of processor 103 is to process packets at the rate of 100 units of data per time unit, the maximum rate of transmission for real-time traffic with a value priority 0 (maximum value) was enabled and transmitted to queue 203A. Furthermore, the offered rate for real-time traffic with a value priority of 1 (less than its maximum) was enabled and transmitted to queue 203A. Furthermore, Table 1 shows that the offered rate for non-real-time time traffic with a value priority of 0 was enabled and transmitted to queue 203B. Finally, the rate for non-real-time traffic with a value priority of 1 was the remaining bandwidth, e.g., 25 units of data. In all flows, at least the minimum rate was transmitted. By assigning a higher scheduler service priority to real-time packets than non-real-time packets, the number of real-time packets or bits received up to the maximum rate of real-time packets or bits for each priority value may be processed by packet processor 103. Furthermore, by assigning a higher priority to real-time packets than non-real-time packets, at least the minimum rate of non-real-time packets or bits received for each priority value may be processed by packet processor 103.
Another principle that emerges from practicing the principles of the present invention is the following. As stated above, the flow rate of flow controller 202 (designated as fi(t)) may refer to the rate that packets or bits are transmitted by flow controller 202 to queue 203 within a particular period of time (designated as Dt). The flow rate fi(t) may depend upon the transmit probability (designated as Ti(t)) where the transmit probability may refer to the probability of transmitting packets or bits. Hence, future flow rates fi(t) may vary depending upon the transmit probability Ti(t). If the flow rate or a smoothed measure of the flow rate fi(t) is less than the minimum rate of packets or bits to be transmitted by an associated flow controller 202, e.g., flow controller 202A, to the appropriate queue 203, e.g., queue 203A, then the transmit probability may be linearly increased such as up to a maximum value of 1. For example, the transmit probability may be linearly increased by 1/16 up to a maximum value of 1 as shown in the following equation:
Ti(t+Dt)=minimum {1, Ti(t)+ 1/16} (EQ1)
If the flow rate or a smoothed measure of the flow rate fi(t) is greater than the maximum rate of packets or bits to be transmitted by an associated flow controller 202, e.g., flow controller 202A, to the appropriate queue 203, e.g., queue 203A, then the transmit probability may be exponentially decreased. For example, the transmit probability may be exponentially decreased as shown in the following equation:
Ti(t+Dt)=Ti(t)*31/32 (EQ 2)
If the flow rate or a smoothed measure of the flow rate fi(t) is between the minimum and maximum rate of packets or bits to be transmitted by an associated flow controller 202, e.g., flow controller 202A, to the appropriate queue 203, e.g., queue 203A, then the transmit probability may be linearly increased such as up to a maximum value of 1 if there is excess bandwidth. For real-time traffic, excess bandwidth may refer to available space in real-time queue 203A to store real-time packets. For non-real-time traffic, excess bandwidth may refer to available space in both real-time queue 203A and non-real-time queue 203B to store real-time packets and non-real-time packets, respectively. As stated above, the transmit probability may be linearly increased such as up to a maximum value of 1 if there is excess bandwidth. For example, the transmit probability may be linearly increased by Ci up to a maximum value of 1 as shown in the following equation:
Ti(t+Dt)=minimum {1, Ti(t)+Ci} (EQ3)
where Ci is a particular constant dependent upon the value priority associated with the flow controller 202.
If the flow rate or a smoothed measure of the flow rate fi(t) is between the minimum and maximum rate of packets or bits to be transmitted by an associated flow controller 202, e.g., flow controller 202A, to the appropriate queue 203, e.g., queue 203A, then the transmit probability may be exponentially decreased if there is nonexistent excess bandwidth. For real-time traffic, nonexistent excess bandwidth may refer to not having available space in real-time queue 203A to store real-time packets. For non-real-time traffic, nonexistent excess bandwidth may refer to not having available space in both real-time queue 203A and non-real-time queue 203B to store real-time packets and non-real-time packets, respectively. As stated above, the transmit probability may be exponentially decreased if there is nonexistent excess bandwidth. For example, the transmit probability may be exponentially decreased as shown in the following equation:
Ti(t+Dt)=maximum {0, Ti(t)−Di*fi(t)/S} (EQ 4)
where S is the maximum possible transmission rate or arrival rate for packet processor 103; where Di is a particular constant dependent upon the value priority associated with flow controller 202.
Referring to
Referring to
In step 303, the value priority of the received packet may be determined by flow control unit 201. As stated above, the value priority may refer to the rank or priority assigned to a class of packets. Packets assigned a higher priority value with a particular time priority, e.g., real-time, non-real-time, may be processed by packet processor 103 prior to packets assigned a lower priority value with the same time priority. In one embodiment, flow control unit 201 may determine the value priority of the received packet based on the value of particular bits in the packet header of the received packet.
In step 304, flow control unit 201 may direct the received packet to an appropriate flow controller 202. Each flow controller 202 may be associated with a particular class of packets assigned with a particular value priority and time priority, e.g., real-time, non-real-time. For example, referring to
In step 305, a determination may be made by the appropriate flow controller 202 as to whether to transmit or discard the received packet. As stated above, each flow controller 202 may be configured to generate a particular transmit probability. As the packet is received by flow controller 202, flow controller 202 may be configured to fetch a random number (value from 0 to 1) from a table (not shown) which may then be compared with the generated transmit probability. In this manner, a determination may be made by flow controller 202 as to whether to transmit or discard the received real-time packet. If the transmit probability is less than the random number, then the received real-time packet is discarded in step 306. If the transmit probability is greater than or equal to the random number, then the received packet is inserted in the appropriate queue 203 in step 307. If the received packet is a real-time packet, then if the transmit probability is greater than or equal to the random number the received packet is inserted in real-time queue 203A in step 307. If the received packet is a non-real-time packet, then if the transmit probability is greater than or equal to the random number, the received packet is inserted in non-real-time queue 203B in step 307.
In step 308, a background process may be implemented by flow control unit 201 to adjust the probability of the transmission rate at particular intervals of time as discussed above. It is noted that the background process in step 308 may occur during any step of method 300 and that presenting the implementation of the background process in step 308 is illustrative.
In step 309, scheduler 204 may select the next real-time packet in real-time queue 203A to be transmitted if there are any real-time packets in real-time queue 203A. However, if there are no real-time packets in real-time queue 203A, then scheduler 204 may select the next non-real-time packet in non-real-time queue 203B to be transmitted if there are any non-real-time packets in non-real-time queue 203B. If there are no real-time packets in real-time queue 203A and no non-real-time packets in non-real-time queue 203B, then scheduler 204 may wait for the next real-time or non-real-time packet to be inserted in their respective queue 203. By storing the higher priority real-time packets in a separate queue 203 than the lower priority non-real-time packets, scheduler 204 does not have to search through all the queues to identify the packet with the highest priority as in prior art. Hence, scheduler 204 may be simpler in design than the scheduler in prior art.
In step 310, the packet selected in step 309 may then be enqueued in queue 205 for transmission to either port 104 for further transmission to another switch 100 (
It is noted that steps 301-304 and 308 may be implemented by a program residing in memory in flow control unit 201. It is further noted that steps 301-304 and 308 may be implemented in hardware in flow control unit 201. It is further noted that steps 305-307 may be implemented in software or hardware by flow controller 202. It is further noted that steps 309-310 may be implemented in software or hardware by scheduler 204. It is further noted that method 300 may be executed in a different order presented and that the order presented in the discussion of
Although the system and method are described in connection with several embodiments, it is not intended to be limited to the specific forms set forth herein, but on the contrary, it is intended to cover such alternatives, modifications and equivalents, as can be reasonably included within the spirit and scope of the invention as defined by the appended claims. It is noted that the headings are used only for organizational purposes and not meant to limit the scope of the description or claims.
The present invention is related to the following U.S. Patent Application which is incorporated herein by reference: Ser. No. 09/448,197 (Attorney Docket No. RAL9-99-0138) entitled “Method and System for Providing Differentiated Services in Computer Networks” filed Nov. 23, 1999.
Number | Date | Country | |
---|---|---|---|
Parent | 10118493 | Apr 2002 | US |
Child | 11608295 | Dec 2006 | US |