METHOD AND APPARATUS FOR DISCARDING FRAMES IN A COMMUNICATIONS DEVICE

Abstract: The invention comprises a method and apparatus for discarding frames in a communications device. In accordance with the method of the invention, a plurality of cells are received (24) representing a plurality of frames wherein each cell comprises a data portion and a header portion including a cell loss priority indicator. At least some of the cells are stored in a buffer. It is determined if the number of cells in the buffer exceeds a first threshold (32) when a first cell including an end of file marker is received (30). A series of cells received between the first cell and a second cell are discarded (42) if the first threshold was exceeded in the determining step and if the cell loss priority indicator for a cell in the series of cells is set to a first state. The second cell comprises a cell including an end of frame file marker.

Description: METHOD AND APPARATUS FOR DISCARDING FRAMES IN A COMMUNICATIONS DEVICE RELATED APPLICATIONS This application claims the benefit of U.S. provisional application Serial No. 60/001,498, filed July 19, 1995. TECHNICAL FIELD OF THE INVENTION This invention relates generally to telecommunications and more specifically to a method and apparatus for discarding frames in a communications device. BACKGROUND OF THE INVENTION Communication networks employing asynchronous transfer mode (ATM) cells for communication often are interfaced to devices employing various communications protocols. Because a number of existing communications networks employ communications protocols other than ATM, ATM communications networks are often interfaced to existing communications networks. Examples of communications networks include the telephone network, ISDN networks, frame relay networks, ethernet networks, and/or token ring networks. Some existing communication networks that are interfaced to ATM communication networks use frames of information to communicate. When frames are transported through an ATM communications network, the frames are typically broken up into a series of ATM cells wherein the end of a frame is indicated by information in the header of the ATM cell. To relieve congestion in an ATM communications network, it is sometimes desirable to discard ATM cells at a switching node in the network due to congestion in either that switching node or in the communications network in general. Discarding cells that are pieces of frames traveling through the ATM communications network, however, can cause bandwidth to be used inefficiently. If a single ATM cell that is a piece of a frame comprised of a larger number of ATM cells is discarded, then the entire frame of ATM cells will need to be resent through the communications network. If other ATM cells in this frame are allowed to pass through the network after a cell of the frame has been discarded, then the bandwidth used to transmit the non- discarded cells through the ATM communications network will essentially be wasted. Discarding frames in a congested switching node or network may also be problematic as certain frames may be more important than other frames. SUMMARY OF THE INVENTION The invention comprises a method and apparatus for discarding frames in a communications network using a series of cells for communication. The invention allows frames to be assigned different priorities such that frames having different priorities may be discarded at different levels of congestion. One aspect of the invention is a method for discarding frames in a communications device. A plurality of cells are received representing a plurality of frames wherein each cell comprises a data portion and a header portion including a cell loss priority indicator. At least some of the cells are stored in a buffer. When a first cell including an end of frame marker is received, it is determined if the number of cells in the buffer exceeds a first threshold. If the first threshold was exceeded, then a series of cells received between the first cell and a second cell is discarded if the cell loss priority indicator for a cell in that series of cells is set to a first state. The second cell comprises a cell including an end of frame marker. The invention has several important technical advantages. The invention allows more efficient use of bandwidth in an ATM communications network as an entire frame comprising a series of cells is discarded when congestion occurs, rather than only discarding a portion of the frame. In addition, even if the network becomes congested during the transmission of a frame, the cells in that frame will remain undiscarded unless an overrun condition is detected or the buffer pool limit is exceeded. The invention allows cells of a frame to be marked with multiple priority levels using header information of the ATM cells. This feature of the invention allows frames to be discarded at varying levels of congestion depending upon their priority. A lower priority frame will be discarded at a lower level of congestion. The invention may therefore increase the throughput of high priority frames. With prioritized frame discard, frames may be marked as high priority when they use bandwidth below the committed information rate of the frame based communications network and as low priority when they use bandwidth above the committed information rate of the frame based communications network. An ATM communications network employing the present invention may then first discard frames that were sent above the committed information rate, providing a fairer distribution of bandwidth among users of the frame based communications network. Also, prioritized frame discarding may be used as an input filter in a communications network where the end stations are not flow controlled. BRIEF DESCRIPTION OF THE DRAWINGS For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings in which: FIGURE 1 illustrates a block diagram of a communications device constructed in accordance with the teachings of the invention; and FIGURE 2 illustrates a flow chart describing the steps of discarding frames in accordance with the invention. DETAILED DESCRIPTION OF THE INVENTION The preferred embodiment of the present invention and its advantages are best understood by referring to FIGURES 1 through 2 of the drawings, like numerals being used for like and corresponding parts of the various drawings. FIGURE 1 illustrates a communications device 10 constructed in accordance with the teachings of the invention. In this embodiment, communications device 10 comprises a switching node in an ATM communications network. Communications device 10 could be any type of communications device in a communications network employing a series of cells to pass frames of information through the communications network. Communications device 10 comprises a series of input processors 12 coupled to a switch fabric 14. Each input processor 12 is connected to one or more sources of input data. Input processor 12 processes the input data, discards cells as necessary, and passes non-discarded cells to switch fabric 14. Input processor 12 may also convert varying types of data into a series of ATM cells. Input processor 12 further comprises processor 16, queue pointers 18, and buffer memory 20. Input processor 12 comprises an application specific integrated circuit (ASIC) but could also be any type of electronic circuitry operable to perform the functions described below. Processor 16 controls the discarding of cells in communications device 10. Cells received by input processor 12 that are not discarded by processor 16 are stored in queues in buffer memory 20. In this example, each virtual connection is associated with its own queue in buffer memory 20. Pointers stored in queue pointer memory 18 are used to keep track of the front and back of each queue in buffer memory 20. Each queue associated with a virtual connection may also be referred to as a buffer. Input processor 16 determines a maximum size for a queue associated with a specific virtual connection and stored in buffer memory 20. In addition, processor 16 may assign a buffer associated with a virtual connection to a pool of buffers associated with other virtual connections. Thus, processor 16 may also place a limit on the maximum number of cells that may be contained in a buffer pool besides limiting the number of cells that may be contained in an individual buffer. Processor 16 also maintains counters reflecting the number of cells in a particular buffer associated with a virtual connection. If multiple buffers are associated with a virtual connection, then processor 16 may maintain a counter for each of the multiple buffers. Processor 16 uses the buffer counters to monitor congestion and discard frames if congestion exceeds certain thresholds. In this embodiment, processor 16 maintains two levels of priority for frames and two congestion thresholds corresponding to those levels of priority. Processor 16 could maintain a greater or a lesser number of priority levels without departing from the scope of the invention. In this example, lower priority frames are discarded after a lower threshold of congestion is encountered while higher priority frames are discarded after a higher level of congestion is encountered. This embodiment uses the cell loss priority bit in the header of ATM cells making up a frame to determine the priority of a frame. When the cell loss priority bit has a value of zero, then the frame is considered to be a high priority frame. When the cell loss priority bit is set to one, then the frame is considered to be a low priority frame. This embodiment uses the cell loss priority bit of the first cell of the frame to make a determination of whether a frame should be discarded. Ordinarily, the cell loss priority bit of each cell in a frame will have the same value. Other header information could be used to indicate priority without departing from the scope of the invention. To make efficient use of bandwidth, processor 16 checks for congestion at frame boundaries. If a cell has an end of frame indicator, then processor 16 checks to determine whether either the low congestion threshold or high congestion threshold has been exceeded. If the low congestion threshold has been exceeded, then a state variable is set to indicate that any subsequent frames having low priority (cell loss priority bit equals one) are to be discarded. If the high congestion threshold has been exceeded, then a state variable is set to indicate that any subsequent frame should be discarded. In either case, the end of frame cell is not discarded. If neither congestion threshold was exceeded at a frame boundary, then the state variables are set to a non-discard state so that the subsequent frame will not be discarded. In this embodiment, only user data cells, which are not end of frame cells, are discarded. Due to their importance to system operation, other cells, such as OAM cells, are not discarded unless the pool space has been exceeded or an overrun condition is present as described below. Processor 16 determines whether or not a cell contains user data or other data using the payload type indicator for the cell. The payload type indicator appears in the header of the ATM cell. If the check at the end of a frame reveals that the high congestion threshold has been exceeded, then all of the cells in the subsequent frame are discarded, with the exception of the end of frame cell, and processor 16 again determines the state of congestion at the end of the discarded frame. If it was determined at the end of a frame that the low congestion threshold has been exceeded and the cell loss priority bit of the first cell of the next frame is set to one, then all of the cells in that frame are discarded and processor 16 will again check the level of congestion at the end of the discarded frame. Processor 16 may also discard portions of frames when congestion has become so critical that either a buffer overrun has occurred or the number of cells in a buffer pool has reached the pool limit associated with that buffer pool. Processor 16 causes cells in discarded frames to be discarded before they are placed in buffer memory 20. This aspect of the invention allows easier manipulation of the queue pointers stored in queue pointer memory 18 as rearranging of the queues is unnecessary. More detailed operation of the invention can best be understood by referring to FIGURE 2. FIGURE 2 illustrates a flow chart describing the method by which input processor 12 of FIGURE 1 discards frames. The method illustrated in FIGURE 2 employs two state variables to determine whether or not to discard frames. The first state variable, discard frame state, is set when the level of congestion has reached a point at which all frames should be discarded and cleared otherwise. The second state variable, discard CLP1 frame state, is set when the level of congestion is high enough to discard frames having a cell loss priority equal to one (low priority) . This variable is cleared otherwise. The method begins in step 22 with initialization. Initially, the state variables are cleared in step 22. In step 24, a cell is received. Then, in step 26 it is determined if the cell is user data or an end of frame cell, if the cell loss priority is equal to one, and if the discard CLP1 frame state is set. A cell is considered to be user data when its payload type indicator equals 0 or 2. A cell is considered to be an end of frame cell when its payload type indicator is equal to 1 or 3. The payload type indicator appears in the header of the ATM cell. If all of the conditions are met in step 26, then the current frame is to be discarded as it has a cell loss priority equal to 1, the level of congestion is sufficiently high to discard frames of that type, and the frame contains user data. Thus, the discard frame state variable is set in step 28. Following step 28 or if all the conditions were not met in step 26, the procedure continues in step 30. Note that step 26 depends upon the state of the discard CLP1 frame state variable which is only altered when processing an end of frame cell at the frame boundary. In step 30, it is determined whether the cell has an end of frame marker. If not, then the process continues in step 44. If so, then a frame boundary has been reached and the congestion in the network should be examined. Accordingly, the process continues in step 32 where it is determined whether the buffer has reached the high congestion threshold. If so, then the discard frame state variable is set in step 42 and the procedure continues in step 44. If not, then the discard frame state variable is cleared in step 34 in case the variable was set for the previous frame. Then, in step 36, it is determined whether the buffer has reached the low congestion threshold. If not, then the discard CLPl frame state variable is cleared in step 38 in case it had been set for the previous frame. If the low congestion threshold has been reached, then the discard CLPl frame state variable is set in step 40. Next, in step 44, it is determined whether the pool limit has been exceeded or a buffer overrun condition has occurred. In this embodiment, several virtual connections may share a buffer pool. If the limit of this buffer pool is exceeded, then the current cell should be discarded immediately in step 46 as there is no place to put the cell. Similarly, if a buffer overrun has occurred, the cell should also be discarded in step 46 even though such a discard may occur in the middle of a frame. After step 46, the process continues in step 48 where it is determined if the cell is user data or an end of frame cell. If not, then the procedure returns to step 24 to receive the next cell. If so, then the discard frame state is set in step 50. Setting the discard frame state in step 50 will cause the rest of the frame from which the cell was discarded in step 46 to also be discarded. Because one cell of the frame was already discarded, the rest should also be discarded to avoid wasting bandwidth. As above, the end of frame cell will still be sent if the buffer overrun condition or pool limit overrun condition is no longer present when the end of frame cell is received. Returning to step 44 if neither condition was met, then the procedure continues in step 52. In step 52 it is determined whether the discard frame state variable is set and whether the current cell contains user data. If not, then the procedure returns to step 24 to process the next cell. If so, then the current cell is discarded in step 54 and the procedure then loops back to step 24. The process in FIGURE 2 thus checks for congestion at frame boundaries as each end of frame cell is received. If the level of congestion exceeds the predetermined threshold appropriate for the following frame, then the cells of the following frame with the exception of the end of frame cell are discarded. This process thus utilizes network bandwidth more efficiently and allows prioritized discarding of frames. Although the present invention has been described in detail, it should be understood that various changes, substitutions, and alterations can be made hereto without departing from the spirit and scope of the invention as defined by the appended claims.

Claims: WHAT IS CLAIMED IS: 1. A method for discarding frames in a communications device, comprising: receiving a plurality of cells representing a plurality of frames, each cell comprising a data portion and a header portion including a cell loss priority indicator; storing at least some of the cells in a buffer; determining if the number of cells in the buffer exceeds a first threshold when a first cell including an end of file marker is received; and discarding a series of cells received between the first cell and a second cell if the first threshold was exceeded in the determining step and if the cell loss priority indicator for a cell in the series of cells is set to a first state, wherein the second cell comprises a cell including an end of file marker. 2. The method of Claim 1, wherein the series of cells comprises each cell in the next frame received after the frame that includes the first cell with the exception of the second cell. 3. The method of Claim 1, further comprises: determining if the number of cells in the buffer exceeds a second threshold when the first cell is received; discarding a series of cells received between the first cell and the second cell if the second threshold was exceeded in the second determining step. 4. The method of Claim 3, further comprises: discarding a cell if the number of cells in the buffer exceeds an overrun threshold. 5. The method of Claim 4, wherein the buffer is a member of a buffer pool, the method further comprising: discarding a cell if the number of cells in the buffer pool exceeds a buffer pool limit. 6. The method of Claim 5, wherein the series of cells comprises each cell in the next frame received after the frame that includes the first cell with the exception of the second cell. 7. The method of Claim 1, further comprising: discarding a cell if the number of cells in the buffer exceeds an overrun threshold. 8. The method of Claim 1, wherein the buffer is a member of a buffer pool, the method further comprising: discarding a cell if the number of cells in the buffer pool exceeds a buffer pool limit. 9. The method of Claim 1, wherein the cells comprise asynchronous transfer mode cells. 10. A communications device, comprising: a switch fabric; and an input processor circuit coupled to the switch fabric and operable to receive a plurality of cells representing a plurality of frames, each cell comprising a data portion and a header portion including a cell loss priority indicator, store at least some of the cells in a buffer, generate a first discard signal if the number of cells in the buffer exceeds a first threshold when a first cell including an end of file marker is received, and discard a series of cells received between the first cell and a second cell if the first discard signal was generated and if the cell loss priority indicator for a cell in the series of cells is set to a first state, wherein the second cell comprises a cell including an end of file marker. 11. The communications device of Claim 10, wherein the input processor circuit comprises an application specific integrated circuit. 12. The communications device of Claim 10, wherein the cells comprise asynchronous transfer mode cells. 13. The communications device of Claim 10, wherein the series of cells comprises each cell in the next frame received after the frame that includes the first cell with the exception of the second cell. 14. The communications device of Claim 10, wherein the input processor circuit is further operable to: generate a second discard signal if the number of cells in the buffer exceeds a second threshold when the first cell is received; discard a series of cells received between the first cell and the second cell if the second discard signal was generated. 15. The communications device of Claim 14, wherein the input processor circuit is further operable to: discard a cell if the number of cells in the buffer exceeds an overrun threshold. 16. The communications device of Claim 15, wherein the buffer is a member of a buffer pool, the input processor circuit further operable to: discard a cell if the number of cells in the buffer pool exceeds a buffer pool limit. 17. The communications device of Claim 16, wherein the series of cells comprises each cell in the next frame received after the frame that includes the first cell with the exception of the second cell. 18. The communications device of Claim 10, wherein the input processor circuit is further operable to: discard a cell if the number of cells in the buffer exceeds an overrun threshold. 19. The communications device of Claim 10, wherein the buffer is a member of a buffer pool, the input processor circuit further operable to: discard a cell if the number of cells in the buffer pool exceeds a buffer pool limit.

Inventors: CALDARA STEPHEN A, HAUSER STEPHEN A, MANNING THOMAS A, PECK DAVID N, CALDARA, STEPHEN, A., HAUSER, STEPHEN, A., MANNING, THOMAS, A., PECK, DAVID, N.
Applicants: ASCOM NEXION INC, ASCOM NEXION INC.
Application year: 1996
Main classification: H04L12
IPC codes: G06F9, G06F12, G06F15, H04J3, H04L1, H04L7, H04L12, H04L13, H04L29, H04M3, H04Q3, H04Q11