The present invention relates in general to buffer management in networking systems, and more particularly to a two-dimensional link list data structure for queuing and de-queuing packets.
The need for faster communication among computers and other systems requires ever faster and more efficient networks. Today, networks typically use an amalgam of various software and hardware to implement a variety of network functions and standards. Network devices such as client computer systems, servers, hubs, routers, switches, network backbones, etc., are each complex devices that require digital processing in hardware and software to facilitate network communication. Some tasks performed in a network device include translation between different network standards such as Ethernet and Asynchronous Transfer Mode (ATM), reformatting of data, traffic scheduling, routing of data cells, packets messages, etc. Depending on the particular protocol being implemented, some tasks may be performed at different points in the network. Also, because of the need for compatibility, flexibility and making changes to network functionality, much of today's network processing is implemented in software which is relatively slow compared to the bandwidth demanded by the network and applications running on the network. For example, the Layer 3 and Layer 4 functions of the OSI 7-Layer Model are typically implemented in software running on one or more devices on the network.
Network system performance is greatly affected by device architectures and CPU bandwidth. In conventional networking devices, for example, the main CPU performance, especially where there is a high volume of data traffic, as the CPU is required to oversee and implement processor intensive data buffering and transfer functions. This also results in increased memory access times, which degrades data transfer speed and network efficiency. Furthermore, in conventional networking systems, only one packet is processed at a time, which can lead to slow throughput due to inefficient memory allocation and access techniques. In network systems where a variety of data packet types and sizes are processed, memory access and allocation can be a serious problem.
Some network systems use a link-list data structure for queuing and de-queuing packets. However, these systems typically require a two-stage lookup in an off-chip memory to determine which packets are to be de-queued. This results in slow throughput and increased processor use, thereby resulting in less than optimal performance.
The present invention provides novel systems and methods for queuing and de-queuing packets in a two-dimensional link list data structure. A network processor receives data for transmission for a plurality of Virtual Connections (VCs). The processor reassembles data cells and frames into data packets and creates a two-dimensional link list data structure for each VC. The data field of each data packet is stored in one or more buffer memories. Each buffer memory has an associated buffer descriptor that includes a pointer to the location of the buffer memory, and a pointer pointing to the memory location of the next buffer descriptor associated with a buffer memory storing data for the same packet. Each data packet also has an associated packet descriptor including a pointer pointing to the memory location of the first buffer descriptor associated with that packet, and a pointer pointing to the memory location of the packet descriptor associated with the next data packet queued for transmission. A VC descriptor for each VC keeps track of the memory locations of the next packet descriptor and the next buffer descriptor to be de-queued, and the memory locations for storing the next packet descriptors and the next buffer descriptors to be queued. The two-dimensional link list data structure of the present invention allows for a one-stage look-up in an internal memory.
According to an aspect of the invention, a method is provided for queuing one or more data packets for transmission for a virtual connection (VC) in a networking system device having an internal memory, wherein each of the data packets has a data field. The method typically comprises the step of creating a VC queue descriptor associated with a first VC. The VC queue descriptor typically includes first, second, third and fourth pointers pointing to first, second, third and fourth memory spaces, respectively, wherein each of the first, second, third and fourth pointers has a value indicating the location of the associated memory space. The method also typically includes the steps of storing a first packet descriptor associated with a first one of the packets to the first memory space such that the first pointer points to the first packet descriptor, the first packet descriptor including a next packet descriptor pointer pointing to the third memory space, and a buffer descriptor pointer pointing to the second memory space; and storing a first buffer descriptor to the second memory space such that the second pointer points to the first buffer descriptor, the first buffer descriptor including a next buffer descriptor pointer pointing to the fourth memory space, and a buffer pointer pointing to a first buffer memory space, wherein at least a first portion of the data field of the first packet is stored in the first buffer memory space.
According to another aspect of the invention, a method is provided for de-queuing one or more data packets queued for transmission in a data structure for a virtual connection (VC) in a networking system device, wherein each data packet has a data field. The data structure typically includes a packet descriptor associated with each of the packets, and one or more buffer descriptors associated with each of the packets, wherein each buffer descriptor includes a buffer pointer pointing to a buffer memory. The method typically comprises the steps of reading a next packet descriptor pointer in a VC queue descriptor associated with a first VC to determine the memory location of a first packet descriptor associated with a first packet to be de-queued, wherein the next packet descriptor pointer has a value indicating the memory location of the first packet descriptor; reading the first packet descriptor, wherein the first packet descriptor includes a first buffer descriptor pointer having a value indicating the memory location of a first buffer descriptor associated with the first packet; reading the first buffer descriptor to determine the memory location of a first buffer memory to be de-queued, wherein the first buffer descriptor includes a first buffer pointer having a value indicating the location of the first buffer memory; and de-queuing the data stored in the first buffer memory.
According to yet another aspect of the present invention, a network processor in a networking accelerator system is provided, wherein the network processor is communicably coupled to one or more networks. The network processor typically comprises an internal memory, and processing logic for implementing a two-dimensional queuing and de-queuing method for queuing and de-queuing packets for transmission in a two-dimensional link list data structure for one or more Virtual Connections (VCs). The network processor is preferably integrated on a single chip, but may be integrated on many chips.
According to a further aspect of the invention, a method is provided for implementing a two-dimensional link list data structure for use in queuing and de-queuing packets for transmission for one or more Virtual Connections (VCs) in a network processor communicably coupled to one or more networks, wherein the network processor has an internal memory. The network processor is preferably integrated on a single chip, but may be integrated on many chips. The method typically comprises the steps of: building the two-dimensional link list data structure for the one or more VCs, wherein the data structure includes a first list linking one or more buffer descriptors on a per-packet basis, and a second list linking one or more packet descriptors on a per-VC basis; and storing at least a portion of the data structure to the internal memory.
According to yet a further aspect of the invention, a method is provided in a networking system device for queuing one or more data packets for transmission for a virtual connection (VC), wherein each of the data packets has a data field. The method typically comprises the steps of creating a VC queue descriptor associated with a first VC, wherein the VC queue descriptor typically includes a first pointer pointing to a first memory space; a second pointer pointing to a second memory space; a third pointer pointing to a third memory space; and a fourth pointer pointing to a fourth memory space. Each of the first, second, third and fourth pointers has a value indicating the location of an associated memory space. The method also typically includes the step of storing a first packet descriptor associated with a first one of the packets to the first memory space such that the first pointer points to the first packet descriptor, wherein the first packet descriptor includes a next packet descriptor pointer pointing to the third memory space, and a buffer pointer pointing to a first buffer memory space, wherein the entire data field of the first packet is stored in the first buffer memory space.
According to an additional aspect of the invention, a method is provided in a network device for de-queuing one or more data packets queued for transmission in a data structure for a virtual connection (VC). Each data packet has a data field, and the data structure includes a packet descriptor associated with each of the packets, and one or more buffer memories associated with each of the packets. Each of the packets has one or more associated buffer descriptors only if more than one buffer memory is associated with the packet, and each buffer descriptor includes a buffer pointer pointing to one of the buffer memories. The method typically comprises the step of reading a next packet descriptor pointer in a VC queue descriptor associated with a first VC to determine the memory location of a first packet descriptor associated with a first packet to be dequeued, wherein the next packet descriptor pointer has a value indicating the memory location of the first packet descriptor. The method also typically includes the steps of reading the first packet descriptor, wherein the first packet descriptor includes a flag indicating that only one buffer memory is associated with the first packet, and a first buffer pointer having a value indicating the location of a first one of the buffer memories; and de-queuing the data stored in the first buffer memory.
Reference to the remaining portions of the specification, including the drawings and claims, will realize other features and advantages of the present invention. Further features and advantages of the present invention, as well as the structure and operation of various embodiments of the present invention, are described in detail below with respect to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements.
Processing engine 10 includes a local memory interface block 15, UTOPIA interface 20, Direct Memory Access Controller (DMAC) 25, PCI interface 30, first internal bus 40, second internal bus 45, third internal bus 50, and cell bus 55. Processing engine 10 also includes a receiver block 60 and a transmitter block 70 for processing incoming and outgoing data transmissions, respectively, and an internal memory 80. Local memory interface block 15 provides a connection to a local (off-chip) memory, such as DRAM, SRAM, SDRAM, SSRAM or any combination thereof. DMAC 25 provides control of data transfers between external memories (PCI), internal memory 80 and the local memory.
PCI interface 30 provides a connection to external intelligence, such as a host computer system, and external packet memories. First and second internal buses 40 and 45 in one embodiment are non-multiplexed 32 bit address and 64 bit data buses. Depending on the desired line rate, PCI interface 30 can be configured to run at frequencies up to 33 MHz over a 32 bit PCI bus, or at frequencies up to 66 MHz over a 64 bit PCI bus. For example, to achieve a 622 Mbps line rate, a 64 bit interface is used with frequencies up to 66 MHz. UTOPIA interface 20 supports connections to a broad range of layer 1 physical interfaces. To support a 622 Mbps line rate, the UTOPIA data bus is 16 bits, whereas for a 155 Mbps line rate the UTOPIA bus is 8 bits. Third internal data bus 50 is an 8 or 16 bit UTOPIA compatible interface. Cell bus 55 is a 64 bit data path and is used to transfer cells or frames between internal cell/frame buffers of receiver block 60 and transmitter block 70 and the PCI memory space through DMAC 25. Cell bus 55 allows several transactions to occur in parallel. For example, data payload transfers and descriptor data movement may occur simultaneously. Additionally, for a 622 Mbps line rate, cell bus 55 is capable of off-loading up to 160 MBps of bandwidth from local memory.
Generally, receiver block 60 reassembles incoming calls or frames into packets. In asynchronous Transfer Mode (ATM) networking systems, data traffic is handled by a Virtual Connection (VC). There are typically many VCs in each system and each VC has its own characteristics, such as packet types, sizes and protocols. Therefore, each VC requires its own descriptor that identifies the VC and its characteristics and requirements. For each VC, receiver block 60 creates a VC descriptor address and fetches the VC descriptor. VC look-up module 85 includes a look-up table that is used to translate the descriptor pointer addresses for VCs that have been registered in the internal cache memory 80. Transmitter block 70 is responsible for creating a data structure for each VC and queuing the data structures within the internal RAM for DMA transfer. In preferred embodiments, a two-dimensional link list is created and implemented for optimal queuing and de-queuing of packets reassembled by the receiver block as will be described in more detail below. Generally, one list links buffer descriptors on a per-packet basis and the other list links packet descriptors, ready for transmission, on a per-VC basis. Implementation of the two-dimensional link list data structure as described herein dramatically improves memory utilization and overall system performance as only one look-up is needed for each VC. Transmitter block 70 is also responsible for dequeueing the data structures for each VC as well as scheduling and shaping the data traffic. Furthermore, transmitter block 70 is capable of accepting data packets and transmitting the data using PPP or Frame Relay encapsulation into the SONET interface.
A VC typically requires up to 64 bytes of descriptor, pointer, bit map and other relevant information. The number of bytes required depends on the service category and whether it is a transmit or receive channel. To support 1024 VCs, approximately 64 Kbytes of local memory is required for the associated VC descriptors. Processing engine 10 supports up to 64,000 (64K) VC's in one embodiment. In this embodiment, internal memory 80 registers up to 128 VC's. For applications requiring more than 128 VCs, local memory is required to store additional VC descriptors. Thus, for applications requiring small numbers of VCs, the use of local memory to store VC descriptors is not needed and can be eliminated if desired.
Receiver block 60 reassembles incoming cells or frames into packets. In one embodiment, receiver block 60 operates in an ATM termination mode wherein cells are reassembled into packets. In another embodiment, receiver block 60 operates in a Router Interface mode where frames are reassembled into packets. In the ATM termination mode of operation, for example, upon cell arrival receiver block 60 extracts the cell header and passes the cell payload to either an internal cell buffer or local memory. Receiver block 60 forms the VC descriptor address from the VCI/VPI field within the cell header. After the VC descriptor address has been formed, the VC descriptor is fetched by receiver block 60. In one embodiment, the VC descriptor is stored in an internal memory cache, such as internal memory 80. This embodiment is useful for delay sensitive and high bandwidth applications. In an alternate embodiment, the VC descriptor is stored in local memory. In either case, when a transmission from the CPU or the PCI space is to take place, transmitter block 70 fetches the VC descriptor and creates a data structure which is queued for DMA transfer. In preferred aspects, the data structure is a two-dimensional link list as will be described below. Also, the data structure is preferably queued in internal memory 80. Transmitter block 70 de-queues the data structure and transmits the payload to the desired destination as provided in the addressing information provided in the header.
Implementation of the two-dimensional link list according to the present invention will now be described. Each VC is represented by a VC descriptor (VC Queue descriptor) that includes pointers to packet descriptors and buffer descriptors. Packet descriptors include information about a packet, a pointer to another packet descriptor address, and a pointer to a buffer descriptor address. Buffer descriptors include buffer information such as an address in memory where data for a particular packet is stored, and a pointer to another buffer descriptor address. In the present invention, data for a particular packet does not need to be stored in a single buffer. Thus, for data payloads that are larger than an individual buffer, the payload is stored in multiple buffers. In this multiple buffer case, each buffer descriptor includes a pointer to the next buffer descriptor associated with the next buffer that stores data for that particular packet. When a packet is stored in multiple buffers, the buffers need not be contiguous. For example, in one embodiment, the buffers for a particular data packet are non-contiguous memory locations in the same memory (e.g., internal memory 80, or the local memory). In another embodiment, the buffers for a particular packet reside in different memories, such as a combination of the local memory and internal memory 80.
In an alternate embodiment, when data for a particular packet can be stored in a single buffer, the packet descriptor does not include a pointer to a buffer descriptor address. Rather, in this embodiment, the packet descriptor includes a flag indicating that the packet is a single buffer packet, and an address indicating where in memory the data for the (single buffer) packet is stored. When the flag is read, the data in the memory location identified by the address will be accessed. In this embodiment, a buffer descriptor is not needed for the (single buffer) packet because the packet descriptor is of sufficient size to include the buffer address and other necessary information about the buffer, such as buffer size.
In general, five pointers are used to create each two-dimensional link list for the first packet in a VC when a VC is newly opened. That is, five pointers are typically needed to represent each VC descriptor link structure according to the present invention. When the first packet is to be queued, a link builder state machine in Transmitter block 70 fetches pointers from a free link pointer pool. In
As shown in
VCFP 540 of
Generally, a packet is ready to be de-queued for transmission when both VCFP≠VCNP and CP≠VCNP. Also, a packet is available for transmission when both CP=VCNP and a packet ready bit (pkt_rdy) in VC 500 is set.
VCFP 540 of
The process of de-queuing will first be discussed. Initially, VCNP 520 points to packet descriptor 660 indicating that packet descriptor 660 is the next packet to be de-queued. Also, CP 510 points to packet descriptor 740 and VCFP 540 points to a new, unused memory space. Therefore, CP 510≠VCNP 520 and VCNP 520 ≠VCFP 540, indicating that a packet is available for de-queuing. When packet descriptor 660 was processed, NP 662 was copied into VCNP 520, so that, as shown, VCNP 520 points to the next packet in the queue to be de-queued, namely packet descriptor 690. When packet descriptor 690 is processed, NP 692 will be copied to VCNP 520 so that VCNP 520 will point to packet descriptor 710. Initially, VCNB 530 pointed to buffer descriptor 670 indicating that buffer descriptor 670 was the next buffer to be de-queued. However, as buffer descriptor 670 was processed, NB 672 was copied to VCNB 530. Now, as shown, buffer descriptor 680 is the next buffer descriptor to be processed. When buffer descriptor 680 is processed, the system will read the EOP bit. When the process of the buffer descriptor is done and the EOP bit is not set, the system will read VCNB 530 to determine the next buffer descriptor. When the process of the buffer descriptor is done and the EOP bit is set, as is the case here, the system will read VCNP 520 to determine the next packet descriptor in the queue to be processed, namely packet descriptor 690. When packet descriptor 690 is processed, NB 694 will he copied into VCNB 530 so that buffer descriptor 700 will be the next buffer descriptor to be processed.
As shown in
While the invention has been described by way of example and in terms of the specific embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. For example, although only two implementations of processing engine 10 are shown in
This application is a continuation application (and claims the benefit of priority under 35 U.S.C. §120) of U.S. patent application Ser. No. 09/271,061, entitled, “Two-Dimensional Queuing/De-queuing Methods and Systems for Implementing the Same,” filed on Mar. 16, 1999 now U.S. Pat. No. 6,724,767. U.S. patent application Ser. No. 09/271,061 claims the benefit of priority under 35 U.S.C. §119(e) to U.S. patent application Ser. No. 60/090,939, entitled, “Network Accelerator Subsystem Based on Single-Chip Network Processor and Interface Protocol,” filed on Jun. 27, 1998.
Number | Name | Date | Kind |
---|---|---|---|
4024507 | Berking et al. | May 1977 | A |
4586134 | Norstedt | Apr 1986 | A |
4700294 | Haynes | Oct 1987 | A |
5218687 | Ducuosso et al. | Jun 1993 | A |
5287537 | Newmark et al. | Feb 1994 | A |
5295135 | Kammerl | Mar 1994 | A |
5379297 | Glover et al. | Jan 1995 | A |
5394402 | Ross | Feb 1995 | A |
5414707 | Johnston et al. | May 1995 | A |
5481536 | Reisch et al. | Jan 1996 | A |
5515370 | Rau | May 1996 | A |
5517488 | Miyazaki et al. | May 1996 | A |
5524007 | White et al. | Jun 1996 | A |
5535201 | Zheng | Jul 1996 | A |
5539729 | Bodnar | Jul 1996 | A |
5555256 | Calamvokis | Sep 1996 | A |
5555265 | Kakuma et al. | Sep 1996 | A |
5564051 | Halliwell et al. | Oct 1996 | A |
5574875 | Stransfield et al. | Nov 1996 | A |
5590128 | Maloney et al. | Dec 1996 | A |
5619650 | Bach et al. | Apr 1997 | A |
5638371 | Raychaudhuri et al. | Jun 1997 | A |
5640399 | Rostoker et al. | Jun 1997 | A |
5652872 | Richter et al. | Jul 1997 | A |
5659794 | Caldarale et al. | Aug 1997 | A |
5664116 | Gaytan et al. | Sep 1997 | A |
5684797 | Anzar et al. | Nov 1997 | A |
5684954 | Kaiserwerth et al. | Nov 1997 | A |
5696930 | Garetz et al. | Dec 1997 | A |
5701300 | Jeon et al. | Dec 1997 | A |
5726985 | Daniel et al. | Mar 1998 | A |
5740171 | Mazzola et al. | Apr 1998 | A |
5742772 | Sreenan | Apr 1998 | A |
5745477 | Zheng | Apr 1998 | A |
5745790 | Oskouy | Apr 1998 | A |
5748630 | Bergantino et al. | May 1998 | A |
5751709 | Rathnavelu | May 1998 | A |
5751951 | Osborne et al. | May 1998 | A |
5751955 | Sonnier et al. | May 1998 | A |
5754530 | Awdeh et al. | May 1998 | A |
5764895 | Chung | Jun 1998 | A |
5771231 | Watanabe | Jun 1998 | A |
5796715 | Patterson et al. | Aug 1998 | A |
5796978 | Yoshioka et al. | Aug 1998 | A |
5805805 | Civanlar et al. | Sep 1998 | A |
5812550 | Sohn et al. | Sep 1998 | A |
5825765 | Menzilcioglu et al. | Oct 1998 | A |
5835928 | Auslander et al. | Nov 1998 | A |
5841772 | Daniel et al. | Nov 1998 | A |
5848068 | Daniel et al. | Dec 1998 | A |
5857075 | Chung | Jan 1999 | A |
5867712 | Shaw et al. | Feb 1999 | A |
5870561 | Jarvis et al. | Feb 1999 | A |
5875173 | Ohgane et al. | Feb 1999 | A |
5878232 | Marimuthu | Mar 1999 | A |
5905874 | Johnson | May 1999 | A |
5909441 | Alexander et al. | Jun 1999 | A |
5910955 | Nishimura et al. | Jun 1999 | A |
5912892 | Barnhart et al. | Jun 1999 | A |
5935249 | Stern et al. | Aug 1999 | A |
5943693 | Barth | Aug 1999 | A |
5956336 | Loschke et al. | Sep 1999 | A |
5974457 | Waclawsky et al. | Oct 1999 | A |
5974462 | Aman et al. | Oct 1999 | A |
5978951 | Lawler et al. | Nov 1999 | A |
5983332 | Watkins | Nov 1999 | A |
5991854 | Watkins | Nov 1999 | A |
6003027 | Prager | Dec 1999 | A |
6005943 | Cohen et al. | Dec 1999 | A |
6021263 | Kujoory et al. | Feb 2000 | A |
6041059 | Joffe et al. | Mar 2000 | A |
6052383 | Stoner et al. | Apr 2000 | A |
6058434 | Wilt et al. | May 2000 | A |
6073175 | Tavs et al. | Jun 2000 | A |
6085252 | Zhu et al. | Jul 2000 | A |
6104700 | Haddock et al. | Aug 2000 | A |
6119170 | Schoffelman et al. | Sep 2000 | A |
6144996 | Starnes et al. | Nov 2000 | A |
6154776 | Martin | Nov 2000 | A |
6163541 | Casey et al. | Dec 2000 | A |
6167049 | Pei et al. | Dec 2000 | A |
6172991 | Mori | Jan 2001 | B1 |
6198751 | Dorsey et al. | Mar 2001 | B1 |
6201971 | Purnadi et al. | Mar 2001 | B1 |
6223292 | Dean et al. | Apr 2001 | B1 |
6269396 | Shah et al. | Jul 2001 | B1 |
6272544 | Mullen | Aug 2001 | B1 |
6285674 | Soni et al. | Sep 2001 | B1 |
6285684 | Suzuki et al. | Sep 2001 | B1 |
6311212 | Chong et al. | Oct 2001 | B1 |
6311238 | Hebert | Oct 2001 | B1 |
6337863 | Nair et al. | Jan 2002 | B1 |
6343078 | Bronstein et al. | Jan 2002 | B1 |
6351474 | Robinett et al. | Feb 2002 | B1 |
6411625 | Furuhashi et al. | Jun 2002 | B1 |
6425067 | Chong et al. | Jul 2002 | B1 |
6452923 | Gerszberg et al. | Sep 2002 | B1 |
6522188 | Poole | Feb 2003 | B1 |
6724767 | Chong et al. | Apr 2004 | B1 |
6754206 | Nattkemper et al. | Jun 2004 | B1 |
7009981 | Lincoln et al. | Mar 2006 | B1 |
20040100952 | Boucher et al. | May 2004 | A1 |
Number | Date | Country | |
---|---|---|---|
20040028067 A1 | Feb 2004 | US |
Number | Date | Country | |
---|---|---|---|
60090939 | Jun 1998 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09271061 | Mar 1999 | US |
Child | 10637723 | US |