The present application is related to the following U.S. Patent Applications, each of which is hereby incorporated by reference herein in its entirety:
The present invention is concerned with data and storage communication systems and is more particularly concerned with a network processor that includes a scheduler component.
Data and storage communication networks are in widespread use. In many data and storage communication networks, data packet switching is employed to route data packets or frames from point to point between source and destination, and network processors are employed to handle transmission of data into and out of data switches.
The network processor 10 includes data flow chips 12 and 14. The first data flow chip 12 is connected to a data switch 15 (shown in phantom) via first switch ports 16, and is connected to a data network 17 (shown in phantom) via first network ports 18. The first data flow chip 12 is positioned on the ingress side of the switch 15 and handles data frames that are inbound to the switch 15.
The second data flow chip 14 is connected to the switch 15 via second switch ports 20 and is connected to the data network 17 via second network ports 22. The second data flow chip 14 is positioned on the egress side of the switch 15 and handles data frames that are outbound from the switch 15.
As shown in
The network processor 10 also includes a first processor chip 28 coupled to the first data flow chip 12. The first processor chip 28 supervises operation of the first data flow chip 12 and may include multiple processors. A second processor chip 30 is coupled to the second data flow chip 14, supervises operation of the second data flow chip 14 and may include multiple processors.
A control signal path 32 couples an output terminal of second data flow chip 14 to an input terminal of first data flow chip 12 (e.g., to allow transmission of data frames therebetween).
The network processor 10 further includes a first scheduler chip 34 coupled to the first data flow chip 12. The first scheduler chip 34 manages the sequence in which inbound data frames are transmitted to the switch 15 via first switch ports 16. A first memory 36 such as a fast SRAM is coupled to the first scheduler chip 34 and stores data frame pointers (in the form of flow queues) and flow control information (in the form of flow queue control blocks (“FQCBs”) 37). Flow queues are discussed further below. The first memory 36 may be, for example, a QDR (quad data rate) SRAM.
A second scheduler chip 38 is coupled to the second data flow chip 14. The second scheduler chip 38 manages the sequence in which data frames are output from the second network ports 22 of the second data flow chip 14. Coupled to the second scheduler chip 38 are at least one and possibly two memories (e.g., fast SRAMs 40) for storing data frame pointers and flow control information. The memories 40 may, like the first memory 36, be QDRs. The additional memory 40 on the egress side of the network processor 10 may be needed because of a larger number of flows output through the second network ports 22 than through the first switch ports 16.
Flows with which the incoming data frames are associated are enqueued in (“attached to”) a scheduling queue 42 maintained in the first scheduler chip 34. The scheduling queue 42 defines a sequence in which the flows attached thereto are to be serviced. The particular scheduling queue 42 of interest in connection with the present invention is a weighted fair queue which arbitrates among flows entitled to a “best effort” or “available bandwidth” Quality of Service (QoS).
As shown in
Although not indicated in
The memory 36 associated with the first scheduler chip 34 holds pointers (“frame pointers”) to locations in the first data buffer 24 corresponding to data frames associated with the flows enqueued in the scheduling queue 42. The frame pointers are listed in flow queues (not separately shown), each of which corresponds to a respective flow that is or may be attached to the scheduling queue 42. The flow queue indicates an order in which frames associated with the flow were received and are to be dispatched.
The memory 36 also stores flow control information, such as information indicative of the QoS to which flows are entitled. The flow control information is stored in flow queue control blocks (“FQCBs”), each of which corresponds to a respective one of the flow queues.
When the scheduling queue 42 indicates that a particular flow attached thereto is the next to be serviced, reference is made to the first frame pointer in the corresponding flow queue in the memory 36 and the corresponding frame data is transferred from the first data buffer 24 to an output queue 46 associated with the output port 44. At the same time, the flow is detached from the scheduling queue 42, and, assuming that at least one more frame pointer remains in the corresponding flow queue, is reattached to the scheduling queue in accordance with a procedure that is described below.
A more detailed representation of the scheduling queue 42 is shown in
More specifically, the queue slot in which a flow is placed upon reattachment is calculated according to the formula CP+((WF×FS)/SF), where CP is a pointer (“current pointer”) that indicates a current position (the slot currently being serviced) in the scheduling queue 42; WF is a weighting factor associated with the flow to be enqueued, the weighting factor having been determined on the basis of the QoS to which the flow is entitled; FS is the size of the frame currently being dispatched for the flow to be reattached; and SF is a scaling factor chosen to scale the product (WF×FS) so that the resulting quotient falls within the range defined by the scheduling queue 42. (In accordance with conventional practice, the scaling factor SF is conveniently defined as an integral power of 2—i.e., SF=2n, with n being a positive integer—so that scaling the product (WF×FS) is performed by right shifting.) With this known weighted fair queuing technique, the weighting factors assigned to the various flows in accordance with the QoS assigned to each flow govern how close to the current pointer of the queue each flow is enqueued. In addition, flows which exhibit larger frame sizes are reattached farther from the current pointer of the queue, to prevent such flows from appropriating an undue proportion of the available bandwidth of the queue. Upon reattachment, data that identifies a flow (the “Flow ID”) is stored in the appropriate queue slot 48.
In addition to the “reattachment” situation described above, there are two other cases in which flows are attached to the scheduling queue 42. The first of these two cases is concerned with attachment to the scheduling queue 42 upon arrival of the first frame for a new flow. The second of the two cases is concerned with attachment of a flow to the scheduling queue 42 upon arrival of the first frame after the flow queue for the flow in question has been emptied (i.e., after the last frame pointed to by the flow queue is dispatched). In both of these cases, there is no frame currently being dispatched, and accordingly, there is no size information available for such a currently dispatched frame. It has therefore been proposed in both cases to attach the flow to the scheduling queue 42 at a predetermined fixed distance from the current pointer CP for the scheduling queue 42. However, the present inventors have recognized that this proposed practice may undermine the desired weighted fair queuing in certain situations that may be encountered in the second case, namely attachment of the flow to the scheduling queue 42 after the corresponding flow queue has been emptied. In particular, if a given flow is made up of large but relatively infrequent frames, the predetermined fixed enqueuement distance may be too short to limit the flow in question to the Quality of Service to which it is entitled. Furthermore, where a flow is made up of relatively infrequent short frames, the predetermined fixed enqueuement distance may work to “short change” the flow, i.e., to prevent it from receiving the Quality of Service to which it is entitled.
It is an object of the present invention to assure that a contracted-for QoS is maintained for a flow upon attachment of the flow to a weighted fair queue in a case where a new frame is received for the flow after the corresponding flow queue has emptied.
According to a first aspect of the invention, a method of operating a network processor is provided. The method includes dispatching a last frame from a flow queue maintained in the network processor, thereby emptying the flow queue, and storing data indicative of a size of the dispatched last frame.
In at least one embodiment, the inventive method may further include receiving a new frame corresponding to the emptied flow queue, and attaching to a scheduling queue a flow corresponding to the emptied flow queue. The flow may be attached to the scheduling queue a distance D from a current pointer for the scheduling queue, where the distance D is determined based at least in part on the stored data indicative of the size of the dispatched last frame.
According to a second aspect of the invention, a network processor is provided, including a scheduler which includes a scheduling queue. The scheduling queue has flows attached thereto and defines a sequence in which the attached flows are to be serviced. The network processor according to this aspect of the invention further includes a storage device that is associated with the scheduler, and maintains a flow queue corresponding to each flow attached to the scheduling queue. Further in accordance with the first aspect of the invention, the storage device stores, for each flow queue that has been emptied, data indicative of a size of a last frame dispatched from the respective flow queue.
In at least one embodiment, when a new frame is received that corresponds to a flow queue that has been emptied, the flow corresponding to the new frame may be attached to the scheduling queue at a distance D from a current pointer for the scheduling queue. The distance D is determined based at least in part on the stored data indicative of the size of the last frame dispatched from the flow queue that has been emptied.
Numerous other aspects are provided, as are computer program products. Each inventive computer program product may be carried by a medium readable by a computer (e.g., a carrier wave signal, a floppy disk, a hard drive, a random access memory, etc.).
With the apparatus and method of the present invention, a flow may be attached to the scheduling queue, after emptying of the corresponding flow queue and receipt of a new frame for the flow, on the basis of the size of the last frame dispatched upon emptying of the flow queue. Consequently, flows that attempt to “misbehave” by sending very large but infrequent frames, are nevertheless accorded their appropriate Quality of Service. Furthermore, flows made up of relatively infrequent short frames will not be penalized due to the small size of the frames in the flow.
Other objects, features and advantages of the present invention will become more fully apparent from the followed detailed description of exemplary embodiments, the appended claims and the accompanying drawings.
Attachment of a flow to the scheduling queue 42 in accordance with the invention will now be described, with reference to
The process of
Following, or in conjunction with, block 52 is block 54. At block 54 data indicative of the size of the frame dispatched at block 52 is stored. For example, this data may be stored in the flow queue control block (FQCB) corresponding to the flow queue which was emptied at block 52.
Following block 54 is a decision block 56, at which it is determined whether the next frame has arrived for the flow corresponding to the emptied flow queue. Until the next frame arrives, the process of
Following block 58 is block 60. At block 60, the flow in question is attached to the scheduling queue 42 at the slot determined at block 58. The process then ends, at 62.
With the method and apparatus of the present invention, flows that “misbehave” by sending very large frames infrequently can be prevented from misappropriating a quantity of bandwidth to which such flows are not entitled. At the same time, the inventive method and apparatus prevent flows exhibiting infrequent, small frames from being “short changed”.
The process of
The foregoing description discloses only exemplary embodiments of the invention; modifications of the above disclosed apparatus and method which fall within the scope of the invention will be readily apparent to those of ordinary skill in the art. According to one alternative embodiment, a scheduling queue may have plural subqueues of different ranges and resolutions, according to an invention disclosed in above-referenced co-pending patent application Ser. No. 10/016,518, filed Nov. 1, 2001.
Moreover, in the above description, the invention has been implemented in connection with a separate scheduler chip associated with a network processor. However, it is also contemplated to implement the invention in a scheduler circuit that is implemented as part of a data flow chip or as part of a processor chip.
Accordingly, while the present invention has been disclosed in connection with exemplary embodiments thereof, it should be understood that other embodiments may fall within the spirit and scope of the invention, as defined by the following claims.
Number | Name | Date | Kind |
---|---|---|---|
4621359 | McMillen | Nov 1986 | A |
5249184 | Woeste et al. | Sep 1993 | A |
5490141 | Lai et al. | Feb 1996 | A |
5548590 | Grant et al. | Aug 1996 | A |
5629928 | Calvignac et al. | May 1997 | A |
5650993 | Lakshman et al. | Jul 1997 | A |
5742772 | Sreenan | Apr 1998 | A |
5790545 | Holt et al. | Aug 1998 | A |
5831971 | Bonomi et al. | Nov 1998 | A |
5835494 | Hughes et al. | Nov 1998 | A |
5844890 | Delp et al. | Dec 1998 | A |
5850399 | Ganmukhi et al. | Dec 1998 | A |
5905730 | Yang et al. | May 1999 | A |
5926459 | Lyles et al. | Jul 1999 | A |
5926481 | Wang et al. | Jul 1999 | A |
5946297 | Calvignac et al. | Aug 1999 | A |
5999963 | Bruno et al. | Dec 1999 | A |
6014367 | Joffe | Jan 2000 | A |
6018527 | Yin et al. | Jan 2000 | A |
6028842 | Chapman et al. | Feb 2000 | A |
6028843 | Delp et al. | Feb 2000 | A |
6031822 | Wallmeier | Feb 2000 | A |
6038217 | Lyles | Mar 2000 | A |
6041059 | Joffe et al. | Mar 2000 | A |
6052751 | Runaldue et al. | Apr 2000 | A |
6064650 | Kappler et al. | May 2000 | A |
6064677 | Kappler et al. | May 2000 | A |
6067301 | Aatresh | May 2000 | A |
6072772 | Charny et al. | Jun 2000 | A |
6072800 | Lee | Jun 2000 | A |
6078953 | Vaid et al. | Jun 2000 | A |
6081507 | Chao et al. | Jun 2000 | A |
6092115 | Choudhury et al. | Jul 2000 | A |
6094435 | Hoffman et al. | Jul 2000 | A |
6101193 | Ohba | Aug 2000 | A |
6104700 | Haddock et al. | Aug 2000 | A |
6108307 | McConnell et al. | Aug 2000 | A |
6122673 | Basak et al. | Sep 2000 | A |
6144669 | Williams et al. | Nov 2000 | A |
6157614 | Pasternak et al. | Dec 2000 | A |
6157649 | Peirce et al. | Dec 2000 | A |
6157654 | Davis | Dec 2000 | A |
6160812 | Bauman et al. | Dec 2000 | A |
6169740 | Morris et al. | Jan 2001 | B1 |
6188698 | Galand et al. | Feb 2001 | B1 |
6226267 | Spinney et al. | May 2001 | B1 |
6229812 | Parruck et al. | May 2001 | B1 |
6229813 | Buchko et al. | May 2001 | B1 |
6236647 | Amalfitano | May 2001 | B1 |
6246692 | Dai et al. | Jun 2001 | B1 |
6259699 | Opalka et al. | Jul 2001 | B1 |
6266702 | Darnell et al. | Jul 2001 | B1 |
6356546 | Beshai | Mar 2002 | B1 |
6389019 | Fan et al. | May 2002 | B1 |
6389031 | Chao et al. | May 2002 | B1 |
6404768 | Basak et al. | Jun 2002 | B1 |
6469982 | Henrion et al. | Oct 2002 | B1 |
6481251 | Meier et al. | Nov 2002 | B1 |
6563829 | Lyles et al. | May 2003 | B1 |
6608625 | Chin et al. | Aug 2003 | B1 |
6611522 | Zheng et al. | Aug 2003 | B1 |
6646986 | Beshai | Nov 2003 | B1 |
6721325 | Duckering et al. | Apr 2004 | B1 |
6775287 | Fukano et al. | Aug 2004 | B1 |
6804249 | Bass et al. | Oct 2004 | B1 |
6810012 | Yin et al. | Oct 2004 | B1 |
6810043 | Naven et al. | Oct 2004 | B1 |
6810426 | Mysore et al. | Oct 2004 | B2 |
6813274 | Suzuki et al. | Nov 2004 | B1 |
6832261 | Westbrook et al. | Dec 2004 | B1 |
6850490 | Woo et al. | Feb 2005 | B1 |
6885664 | Ofek et al. | Apr 2005 | B2 |
6888830 | Snyder, II et al. | May 2005 | B1 |
6891835 | Kalkunte et al. | May 2005 | B2 |
7020137 | Kadambi et al. | Mar 2006 | B2 |
20010004363 | Usukura | Jun 2001 | A1 |
20010012294 | Kadambi et al. | Aug 2001 | A1 |
20020003795 | Oskouy et al. | Jan 2002 | A1 |
20020023168 | Bass et al. | Feb 2002 | A1 |
20020136230 | Dell et al. | Sep 2002 | A1 |
20020163922 | Dooley et al. | Nov 2002 | A1 |
20020181455 | Norman et al. | Dec 2002 | A1 |
20030050954 | Tayyar et al. | Mar 2003 | A1 |
20030058879 | Rumph | Mar 2003 | A1 |
Number | Date | Country |
---|---|---|
0859492 | Aug 1998 | EP |
0957602 | Nov 1999 | EP |
0989770 | Mar 2000 | EP |
1049352 | Nov 2000 | EP |
1061763 | Dec 2000 | EP |
04-094240 | Mar 1992 | JP |
2000183886 | Jun 2000 | JP |
2000295247 | Oct 2000 | JP |
2001007822 | Dec 2000 | JP |
WO9935792 | Jul 1999 | WO |
WO9953647 | Oct 1999 | WO |
WO9953648 | Oct 1999 | WO |
WO0120876 | Mar 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20030179765 A1 | Sep 2003 | US |