OPTIMIZING THE TRANSFER OF DATA PACKETS BETWEEN LANS

Abstract: A switch apparatus (10) for optimizing the transfer of data packets between a plurality of local area networks (LANs (12, 14, 16)). Apparatus of the present invention are comprised of multiple controllers (23), e.g., a receive controller (24), and a transmit controller (25), which share common resources including a first memory (a packet memory (20)) which stores the data packets, a second memory (a descriptor memory (22)) which stores pointers to the stored data packets, and buffered data paths (preferably using FIFO buffers (178, 108)). The independent controllers (25, 24) operate essentially concurrently for most tasks while interleaving their use of the shared resources (20, 22). Consequently, embodiments of the present invention can simultaneously receive and transmit data across multiple LAN data ports (18a, 18b, 18N) (e.g., 28 Ethernet ports comprised of 10/100 and/or 10 Mbps ports).

Description: TITLE : OPTIMIZING THE TRANSFER OF DATA PACKETS BETWEEN LANS BACKGROUND OF THE INVENTION The present invention relates generally to a method and apparatus for transferring data packets between a plurality of local area networks (LANs) and more particularly to a switch architecture capable of high speed packet transfer between multiple data ports (e.g., 28 Ethernet ports comprised of 10/100 and/or 10 Mbps ports) . U.S. Patents directed to apparatus for switching or bridging LANs include 4,627,052; 4,715,030; 4,737,953; 4,922,503; 5,136,580, and 5,633,865. // // // // // // // // // // // // // SUMMARY OF THE INVENTION The present invention relates to a method and apparatus for optimizing the transfer of data packets between a plurality of local area networks (LANs) . Apparatus of the present invention are comprised of multiple independent controllers, e.g., a receive controller and a transmit controller, which share common resources including a first memory (a packet memory) which stores the data packets, a second memory (a descriptor memory) which stores pointers to the stored data packets, and buffered data paths (preferably using FIFO buffers) . The independent controllers operate essentially concurrently for most tasks while interleaving their use of the shared resources. Consequently, embodiments of the present invention can simultaneously receive and transmit data across multiple LAN data ports (e.g., 28 Ethernet ports comprised of 10/100 and/or 10 Mbps ports) . In accordance with a preferred embodiment, a system for selectively transferring data packets between a plurality of local area networks (LANs) , wherein the data packets identify destination and source addresses comprises: (1) a plurality of media access controllers (MACs) each configured for receiving and transmitting data packets to and/or from a different LAN, the MACS including at least a first MAC associated with a first LAN for receiving data packets from the first LAN and a second MAC associated with a second LAN for transmitting data packets to the second LAN, (2) a MAC receive buffer for periodically receiving at least a portion of data packets from the MACs, (3) a MAC transmit buffer capable of operating concurrently with said MAC receive buffer for periodically transmitting at least a portion of data packets directed to the MACs, (4) a shared packet memory for storing a plurality of data packets, (5) a packet memory input buffer for periodically receiving and buffering at least a portion of data packets from the packet memory, (6) a packet memory output buffer capable of operating concurrently with said packet memory input buffer for periodically buffering and transmitting at least a portion of data packets to the packet memory, (7) a shared descriptor memory for storing descriptors pointing to the data packets stored within the packet memory, (8) an address table for correlating the destination address of each data packet with one of the MACs, (9) a receive controller for causing a data packet from the first MAC to be stored in the packet memory via the MAC receive buffer and the packet memory output buffer and for generating descriptors corresponding to the locations of the data packet within the packet memory, wherein the receive controller stores the descriptors in the descriptor memory in response to the address table and the destination address of the data packet, and (10) a transmit controller capable of operating concurrently with said receive controller for causing a data packet from the packet memory to be transmitted to the second MAC via the packet memory input buffer and the MAC transmit buffer according to descriptors stored within the descriptor memory. In accordance with a further aspect of a preferred embodiment, the system additionally includes: (1) receive session registers for storing descriptors generated by the receive controller before the descriptors are stored in the descriptor memory and (2) transmit session registers for storing descriptors retrieved from the descriptor memory, wherein the transmit controller is responsive to the retrieved descriptors within the transmit registers for selecting data packets from the packet memory for transmission to the MACs. In accordance with a still further aspect of a preferred embodiment, the aforementioned buffers are organized as first in first out buffers (FIFOs) capable of inputting data at a first rate and outputting data at a second rate. In accordance with still another aspect of a preferred embodiment, the aforementioned buffers and the receive and transmit controllers are all implemented within a single integrated circuit package. The novel features of the invention are set forth with particularity in the appended claims. The invention will be best understood from the following description when read in conjunction with the accompanying drawings. // // // // // // // // // // // ' BRIEF DESCRIPTION OF THE DRAWINGS !; FIG . 1 comprises a top level functional block diagram DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention relates to a method and apparatus for optimizing the transfer of data packets between a plurality of local area networks (LANs) . FIG. 1 shows a functional block diagram of a preferred system 10, commonly known as a switch, for optimizing the transfer of data packets between a plurality of local area networks (LANs) e.g., 12, 14, and 16, according to data contained within each data packet (described further below in reference to FIG. 3) . The system 10 is primarily comprised of (1) a plurality of media access controllers (MACs) 18 each corresponding to a different LAN 12, 14, 16 for bidirectionally transferring data packets, (2) a shared packet data memory 20 (preferably RAM and referred to as packet memory) for storing data packets prior to transferring to another LAN, (3) a shared packet descriptor memory 22 (preferably RAM and referred to as descriptor memory) for storing pointers identifying the location of the data packets in the packet memory 20, and (4) a switch controller 23 defining a receive data path 24 and a transmit data path 25 for concurrently transferring data in both directions between the MACs 18 and the packet memory 20. To accomplish this concurrent data transfer on the receive 24 and transmit 25 data paths, the switch controller 23 periodically shares resources including the packet memory 20 and the descriptor memory 22. As used herein, the term periodic is intended to refer to events occurring at regular or irregular intervals. The independent controllers within the switch controller 23 operate essentially concurrently for most tasks while interleaving their use of the shared resources. Consequently, embodiments of the present invention can simultaneously receive and transmit data across multiple LAN data pores, e.g., LAN, 12, LAN- 14, LAN N 16, etc., via a plurality of media access controllers 18. For example, Table I shows a simplified example of multiple receive tasks, i.e., a first data packet R being received from a first LAN-, (column 2) and a second data packet RX 2 being received from a second LAN, (column 3), being processed concurrently with a third data packet TX 3 being transmitted on a third LAN 3 (column 4) in a time distributed manner during each time slot T x . Preferably, the time slots T x can have variable durations for each task, e.g., as needed for a particular subtask. For example, the transmit task of column 4 may overlap different portions of the receive tasks and may have unequal time slot durations. Additionally, the media access controllers 18 preferably interface to the LANs via a PHY, i.e., a physical interface layer, (not shown) . In an exemplary implementation, 28 Ethernet ports comprised of 10/100 and/or 10 Mbps ports are simultaneously supported. To RX ; to MACi from LAN, , RX 2 to MAC, from TX 3 from Packet LAN, Memory to MAC> on Transmit Data Path RX ; from MACi to TX 3 to LAN 3 from Packet Memory on MACj Receive Data Path T RX 2 from MAC 2 to Packet Memory on Receive Data Path Table I FIG. 2 shows the switch controller 23 of FIG. 1 primarily comprised of (1) a MAC receive (RCV) buffer 30 for periodically receiving and buffering at least a portion of data packets from the MACs 18 via a bidirectional MAC interface bus 31, (2) a MAC transmit (XMIT) buffer 32 capable of operating concurrently with the MAC receive buffer 30 for periodically buffering and transmitting at least a portion of data packets directed to the MACs 18 via the MAC interface bus 31, (3) a packet memory input buffer 34 for periodically receiving and buffering at least a portion of data packets from the packet memory 20 via a bidirectional packet memory interface bus 35, (4) a packet memory output buffer 36 capable of operating concurrently with the packet memory input buffer 34 for periodically buffering and transmitting at least a portion of data packets to the packet memory 20 via the packet memory interface bus 35, (5) an address table 38 for correlating the destination address of each data packet with one of the MACs 18 and its corresponding LAN, (6) a receive (RCV) controller 40 for causing a data packet from a first MAC, e.g., 18a, to be stored in the packet memory via the MAC receive buffer 30 and the packet memory output buffer 36 and for generating descriptors corresponding to the locations of each data packet within the packet memory 20, wherein the receive controller 40 stores descriptors in the descriptor memory 22 in response to the contents of the address table 38 and the destination address within the data packet, and (7) a transmit (XMIT) controller 42 for causing a data packet from the packet memory 20 to be transmitted to a second MAC, e.g., 18b, via the packet memory preferred implementation of the receive 24 and transmit 25 data paths shown in FIG. 2. RX ; to MAC, from LAN- . RX 2 to MAC 2 from TX, Descriptors LAN, from Descriptor Memory T, RX ; to MAC Receive TX 3 from Packet Buffer Memory to Packet Memory Input Buffer RX-. from MAC Receive TX 3 from Packet Buffer to Packet Memory Input Memory Output Buffer Buffer to MAC Transmit Buffer RX, from Packet RX 2 to MAC Memory Output Buffer Receive Buffer to Packet Memory T 4 RXi Descriptors to RX 2 from MAC TX 3 to MAC 3 from Descriptor Memory Receive Buffer MAC Transmit to Packet Buffer Memory Output Buffer RX 2 from Packet TX 3 from MAC 3 to Memory Output LAN 3 Buffer to Packet Memory RX 2 Descriptors to Descriptor Memory Table II FIG. 3 shows the basic structure of an exemplary received data packet 54 (e.g., for an Ethernet data transfer protocol) comprised of (1) a preamble 56 for designating the beginning of the data packet 58 (BOP) , (2) a destination address (DA) 60 for identifying a destination device present on a destination LAN, e.g., LAN 2 14, (3) a source address 62 (SA) for identifying an originating device present on a source LAN, e.g., 1 LAN-. 12, (4) a data field 64 containing the information content 2 of the data packet 54, and (5) a CRC field 66 at the end of the 3 data packet (EOP 68) for performing an integrity check on the 4 contents of the data packet 54. The overall length of the data 5 packet 54 (absent the preamble 56) is variable between a minimum 6 length of 64 bytes and a maximum length of 1518 bytes. 7 Received data packets 54 are stored in one or more 8 buffers 70 within the packet memory 20 (see FIG. 4) . Preferably 9 the size of the buffers 70 is selected such that the smallest 10 size data packet, i.e., 64 bytes, can fit within a single buffer 11 70 while the largest size data packet, i.e., 1518 bytes, will 12 require a plurality of buffers 70. This buffer size selection, 13 e.g., 256 bytes per buffer in a preferred embodiment, 14 alternatively allows the size of the packet memory 20 to be 15 reduced or the number of packets for a given packet memory size 16 to be increased. For an exemplary implementation, a minimum of 17 219 buffers, each 256 bytes, are available for each port, i.e., 18 each MAC 18 and its associated LAN interface. Accordingly for a 19 32 port system, the packet memory size would be 1,794,048 20 (219 * 256 * 32), preferably implemented in a 2 Mb block of 21 memory. Since the data packet communication rate will typically 22 be different on each port, the buffers 70 can be allocated on the 23 fly between ports with low data packet communication rates to 24 those with higher demands. As each buffer 70 is allocated, data 25 is set in a packet buffer allocation table 72 stored within the 26 descriptor memory 22, e.g., setting one of the N bytes in the 27||packet buffer allocation table 72 corresponding to each packet 1 memory buffer 70. Similarly, this data is reset when ά butrer-TO 2 is deallocated, freeing the buffer 70 for future data packets. 3 During the receive process, pointers, referred to as 4 descriptors 74, are saved in receive session registers 76 which 5 individually point to the buffers 70 that have been allocated for 6 an incoming data packet. As described further below, once a 7 complete data packet 54 has been successfully received, these 8 descriptors 74 are copied from the receive session registers 76 9 to one of M output queues 78 (one for each MAC port connected to 10 the switch controller 23) that are saved in the descriptor memory 11 22. Additionally, a destination vector pointer 80, associated 12 with a set of (1-6) descriptors 74, is stored in the output queue 13 78. The destination vector pointer 80 points to a destination 14 vector 82 also contained within the descriptor memory 22. Each 15 destination vector 82 contains a bit corresponding to each 16 potential destination port, e.g., a 32 bit destination vector can 17 be used to allocate up to 32 destination ports. The destination 18 port vectors 82 are allocated using a destination port allocation 19 table 84 in a similar manner to the packet buffer allocation 20 table 72. 21 Even in cases which require flooding, i.e., 22 transmitting a received data packet 54 to multiple ports either 23 because the destination port is not known or when the data packet 24 is purposely broadcast to all ports, only a single destination 25 port vector 82 is used for each received data packet 54. In 26 operation, when flooding is required in a single VLAN case (i.e., 27 when all of the physical ports of the switch are dedicated to 28 single virtual LAN) , descriptors 74 pointing to the buffers 70 which contain the received data packet 54 and the destination vector pointer 80 are stored in each of the output queues 78 (with the exception of the port associated with the LAN where the data packet originated) . Similar operations occur in the case of a multicast data packet, in that descriptors 74 and a destination vector are stored in each of prescribed output queues 78. As the received data packet 54 is transmitted on each queued output port, i.e., a LAN via its associated MAC 18, the corresponding bit is cleared in the single destination port vector 82 associated with the received data packet 54. However, it is not until all of the bits in the destination port vector 82 are cleared that the commonly used buffers 70 for the stored data packet can be deallocated in the packet buffer allocation table 72. At that time, the destination port vector 82 is deallocated in the destination port allocation table 80. More commonly, a data packet 54 is directed, i.e., unicast, to a single destination address 60 on a known port, i.e., LAN. In this case, only a single bit corresponding to the one destination port is set in the destination port vector 82 and after transmission to this single port, both the buffers 70 and the destination port vector 82 are both deallocated. Preferably, write 86 and read 88 pointers are contained within the switch controller 23 for each of the output queues 78. Preferably, the queues 78 are organized as circular (ring) buffers, i.e., so that data entries following the physical end of each queue 78 are located at the physical beginning of the queue 78. The write pointer 86 points to the last entry stored in the queue 78 and the read pointer 88 points to the last entry read from the queue 78. Whenever the read pointer 88 does not equal the write pointer 86, it signifies that there is new data (pointing to a received data packet) within the queue 78. However, if the write pointer 86 were permitted to loop around the read pointer 88, the queue 78 would lose data. Accordingly, in a preferred embodiment, (1) the write pointer is not permitted to loop the read pointer and instead the most recently received data packet is dropped and (2) the queue size is made large enough, 256 entries long in an exemplary embodiment, to reduce the probability that a data packet would be dropped. Since the number of queue entries required for a particular data packet varies from a minimum of 2 (1 descriptor 74 plus a destination vector pointer 80) to a maximum of 7 (6 descriptors 74 plus a destination vector pointer 80) , the amount of data packets 54 that can be referenced from the queue 78 also varies from 128 for a minimum size packet to 36 for a maximum size packet in an exemplary embodiment having a 256 entry queue. FIG. 5 shows an exemplary block diagram of the portion of the switch controller 23 dedicated to processing received data packets. This portion, i.e., the receive controller 40 (preferably a state machine) , is preferably comprised of multiple state machines, each of which concurrently processes portions of a receive task 90. Preferably, by forming operational portions of the receive task 90 as state machines, different portions of the various tasks used for receiving data from multiple MACS 18 can be performed concurrently. The primary state machines are (1) a main receive state machine 92 for exercising supervisory control over the other state machines, controlling the flow of data between the operational blocks, and controlling requests for packet memory buffers 70 and 64 byte subpackets according to the descriptors 74 stored in the session registers 76 (2) a receive ring state machine 94 for controlling the storage of descriptors 74 and destination vector pointers 80 into one or port queues 78, (3) a receive session state machine 96 for controlling access to the descriptors 74 stored in the session registers 76, (4) a buffer allocator 98 for allocating (and deallocating, e.g., in the case of a data packet received with a CRC error) buffers 70 in the packet memory 20, and (5) an address table state machine 100 for determining the destination port or ports according to the destination address 60 of the received data packet 54. Additionally, an arbiter 102 is used to control the submission of tasks to the state machines of the receive controller 40 on a per port basis, preferably in a round robin fashion based upon status data returned from each MAC 18 and/or a data available signal 103 from the MAC receive buffer 30. Alternatively, the arbiter 102 can submit tasks based on other criterion, e.g., the transmission speed of the port (10 Mbps, 100 Mbps, 1000 Mbps) , the probability of an additional packet being received inversely based on when the last packet was received, etc. As shown in FIG. 6, the exemplary receive task 90 (shown for a single port as selected by the arbiter 102 once data is first detected in the selected MAC 18) begins in block 104 where the task waits by periodically polling the MAC 18 for the selected port to determine if data is available. In block 106, a burst of data (64 bytes in this exemplary embodiment) is fetched from the selected MAC 18. Preferably, each MAC 18 has a 1 receive buffer 108, e.g., a first in first out buffer (FIFO), 2 that provides the oldest buffered data across the bidirectional 3 MAC interface bus 31 (see FIG. 2), common to all of the MACs 18, 4 to the MAC receive buffer 30. Preferably, the MAC receive buffer 5 30 is comprised of a receive first in first out buffer (FIFO) 110 6 under control of a receive FIFO controller 112 operating in 7 coordination with a high speed shared data bus interface 114 to 8 control the transfer data across the MAC interface bus 31. In a 9 preferred embodiment, the FIFO controller 112 independently 0 controls this data transfer once it receives a command from the 11 receive controller 40. In this exemplary embodiment, the MAC 12 interface bus 31 and the data bus interface 114 are 64 bits wide. 13 Accordingly, the data bus interface 114 is used to fetch and load 14 the 64 byte MAC receive buffer 30 in eight 64 bit bursts. Since 15 the MAC receive buffer 30 is preferably organized as a FIFO, it 16 can receive data at a first rate from the MACs 18 via the MAC 17 interface bus 31 and send this received data or portion of this 18 data toward the packet memory 20 at a second rate, i.e., the data 19 transfers can overlap. 20 Once the first 64 bytes have been received into the 21 MAC receive buffer 108 in block 116, a search begins in block 22 118a to determine the destination port according to the data 23 contained within the first 6 bytes of the incoming data packet, 24 i.e., the destination address 60, using the address table state 25 machine 100 which processes the contents of the address table 38. 26 The address table state machine 100 proceeds independently and 27 since this task begins early in the receive task 90, sufficient 28 time is allocated for it to complete (in block 118b where the 1 results are stored in the receive session registers 76) before 2 the end 68 of the data packet 54 is reached. 3 It is then determined in block 120 whether the packet 4 memory output buffer 36 is available. In the exemplary receive 5 task 90 of FIG. 6, it is shown that the buffer allocator 98 6 begins in response to receipt of the first 64 byte portion, a 7 subpacket or subportion of a data packet, of buffer 70. Once 8 buffer 70 is allocated by the buffer allocator 98, the associated 9 descriptor 74 in the receive session registers 76 is updated and 0 maintained by the concurrently operating receive session state 1 machine 96. There are up to four 64 byte subpackets per 256 byte 2 buffer 70 and this is tracked within a subpacket field of each 3 descriptor 74 in the receive session registers 76. Buffer 70 is 4 allocated (in block 122) from the packet memory 20 whenever it is 5 determined (e.g., in block 124) that the next subpacket will 16 require a new 256 byte buffer, i.e., four of four 64 byte 17 subpackets have been used. Again, the buffer allocator 98 is 18 preferably a separate state machine that operates concurrently 19 with the other tasks. The simplified buffer allocator 98 of 20 FIG. 6 shows buffer allocation beginning when each new buffer 70 21 is needed. However, in an alternative preferred embodiment, this 22 allocation task actually begins by always having the next free 23 buffer 70 allocated in advance so that a new buffer is always 24 available when needed. This alternative embodiment is possible 25 as a consequence of the use of independent state machines. 26 Each 64 byte subpacket is stored (see blocks 126 and 27 128) in the allocated buffer portion of the packet memory 20 28 described by the current session register 76 and maintained by l! the receive session state machine 96. Actually, this process 2 occurs in two stages. First, the 64 byte subpacket is stored in 3 the packet memory output buffer 36. Next, the contents of the 4 output buffer 36 are sent to packet memory 20 via a packet memory 5 interface 130 and the bidirectional packet memory interface bus 6 35 (see FIG. 2), preferably using circuitry similar to that 7 described in reference to the MAC receive buffer 30, e.g., a 8 controller 132 that independently controls the transfer of data 9 into a FIFO 134 once it receives a command from the receive 0 controller 40. In an exemplary embodiment, the bidirectional 11 packet memory interface bus 35 is 16 bits wide. Accordingly, the 12 transfer of the 64 byte subpacket requires a burst transfer of 13 thirty-two 16 bit quantities. The packet memory output buffer 36 14 is preferably implemented as a FIFO (similar to the MAC receive 15 buffer 30) , permitting data to be written into the packet memory 16 20 at a different rate than it is written into the packet memory 17 output buffer 36. This structure is advantageous to accommodate 18 the different bus widths (16 bit external vs 64 bit internal) and 19 different external and internal clock rates. 20 Once the process of sending each subpacket to the 21 packet memory commences (in blocks 126 and 128) , the descriptors 22 74 are updated by the receive session state machine 92 in block 23 136. If an end of packet (EOP) 64 has been detected in block 24 138, the results of the address table search of block 118 are 25 retrieved from the address table state machine 100 in block 140 26 (e.g., from data stored in the receive session registers 76) and 27 submitted to the concurrently operating ring state machine 94. 28 In the case of a unicast message where the destination address 60 is known to the address table 38, the received data packet 54 is forwarded to the port which contains a device corresponding to the destination address 60. Otherwise, the address table state machine 100 updates the address table 38 according to the contents of the source address 62 and forwards the received data packet 54 to all ports with the exception of the port which received the data packet, i.e., floods the data ports with the received data packet. This task is done in block 142 by storing the descriptors 74 and the destination port vector 82 for the received data packet 54 in one or more output queues 78 in the descriptor memory 22. The write pointer 86 for each of the updated output queues 78 is accordingly updated in block 144. Following updating the write pointer 86, there will be a difference between the write pointer 86 and the read pointer 88 and it is this difference that is detected by the transmit controller 42 in determining whether there are data packets to be output on each port. Each of the aforementioned blocks perform portions of the receive task 90. The arbiter 102 preferably allows only a portion, e.g., one task block, of the receive task 90 to complete before moving on, e.g., in a round robin manner, to complete a portion of the receive task 90 for a next port. As a consequence of the aforementioned structure, different portions of each receive task 90 can occur concurrently for each port using shared resources while maintaining data in buffers 70 within a common packet memory 20. For example, a first port could be beginning receipt of a data packet 54a into its MAC 18a, a second port could have received a first 64 bytes into its MAC 18b and could be transferring 64 bytes into the MAC receive buffer 30, and a third MAC 18c could have received a second portion of a data packet into its internal FIFO 108 and could be awaiting its transfer to the MAC receive buffer 30 which is currently busy. Similar overlapping uses of the structure of the receive controller 40 occur throughout. FIG. 7 shows an exemplary block diagram of the portion of the switch controller 23 dedicated to transmitting data packets. This portion, i.e., the transmit controller 42 (preferably a state machine) , is preferably comprised of multiple state machines, each of which concurrently processes portions of a transmit task 150. Preferably, by forming operational portions of the transmit task 150 as state machines, different portions of the various tasks used for transmitting data to multiple MACS 18 can be performed concurrently. The primary state machines are (1) a main transmit state machine 152 for exercising supervisory control over the other state machines, controlling the flow of data between the operational blocks, and controlling access to 64 byte subpackets within the buffer 70 pointed to by the current session register 76, (2) a transmit ring state machine 154 for controlling the retrieval of descriptors 74 and the destination vector pointer 80 from port queues 78 into internal transmit session registers 156, (3) a transmit session state machine 158 for controlling access to the transmit session registers 156, and (4) a buffer deallocator 160 for deallocating buffers 70 in the packet memory 20. Additionally, an arbiter 162 is used to control the submission of tasks to the state machines of the transmit controller 42 on a per port basis, preferably in a round 1 robin fashion. Alternatively, the arbiter 162 can submit tasks 2 based on other criterion, e.g., the transmission speed of the 3 port (10 Mbps, 100 Mbps, 1000 Mbps) , the probability of an 4 additional packet being received inversely based on when the last 5 packet was transmitted, etc. 6 As shown in FIG. 8, the exemplary transmit task 150 7 (shown for a single port as selected by the arbiter 162 once data 8 is first detected in the selected port queue 78) begins in block 9 164 where the task periodically (1) compares the write 86 and 0 read 88 pointers for the selected port to determine if the 1 selected port queue 78 has data, i.e., a data packet is available 2 for transmission, and (2) if the MAC transmit FIFO 178 is 3 available to receive data, e.g., by polling a space available 14 line 165. If a data packet and the MAC transmit FIFO 178 are 15 available, the task continues in block 166 where descriptors 74 16 are fetched from the port queue 78 in the descriptor memory 22 17 and stored in the transmit session registers 156. Next, in block 18 168, a 64 byte subpacket is retrieved into the packet memory 19 input buffer 34 from the buffer 70 in the packet memory 20 20 pointed to by the transmit session registers 156. Preferably the 21 packet memory input buffer 34 is configured as a FIFO operating 22 in a similar manner to that described in reference to the MAC 23 receive buffer 30, e.g., a controller 169 independently controls 24 the transfer of data into a FIFO 170 once it receives a command 25 from the transmit controller 42. In block 171, it is determined 26 if the MAC transmit buffer 32 is available and, if so, a 64 byte 27 subpacket is transferred to the MAC transmit buffer 32. The MAC 28 transmit buffer 32 is preferably comprised of a transmit FIFO 174 1 and a transmit FIFO controller 176 which independently controls 2 the transfer of the subpacket to a transmit FIFO 178 within the 3 designated MAC 78 via the high speed shared data bus interface 4 114 and the MAC interface bus 31 once it receives a command from 5 the transmit controller 42. In block 180, it is determined if 6 the current subpacket contains the EOP 68. If not, the transmit 7 session state machine 158 is updated in block 182 to point to the 8 next subpacket in the packet memory 20 and, in block 183, it is 9 determined if the MAC transmit FIFO 178 is available to accept 10 more data. If so, the process continues with block 168 fetching 11 the next 64 byte subpacket. If the EOP 68 has been detected, the 12 buffer deallocator 160 (in block 184) clears the bit 13 corresponding to the selected port in the destination port vector 14 82 and the ring state machine 154 concurrently updates the read 15 pointer 88 to deallocate the descriptors 74 in the selected port 16 queue 78 in block 186. Providing that all bits the destination 17 port vector 82 are now cleared, the buffer deallocator 160 (in 18 block 188) deallocates the buffers 70 used to store the data 19 packet. However, if bits are still set in the destination port 20 vector 82, it signifies that other port queues 78 will still be 21 transmitting the stored data packet and, thus, the buffers 70 are 22 retained. 23 Each of the aforementioned blocks perform portions of 24 the transmit task 150. The arbiter 162 preferably allows only a 25 portion, e.g., one task block, of the transmit task 150 to 26 complete before moving on, e.g., in a round robin manner based 27 upon status from each MAC 18 and/or status data on the space 28 available line 165 from the MAC transmit buffer 32, to complete a portion of the transmit task 150 for a next port. As a consequence of the aforementioned structure, different portions of each transmit task 150 can occur concurrently using shared resources while operating on data packets in buffers 70 within the common packet memory 20. For example, a first MAC 18a could begin transmitting a portion of a data packet 54a from within its MAC transmit FIFO 178, a first 64 bytes of data packet 54b could have been transferred into the MAC transmit buffer 32 and could now be transferring its contents to the MAC transmit FIFO 178 in MAC 18b, and the transmit controller 42 could be awaiting the availability of the MAC transmit FIFO 178 in MAC 18c before transferring a 64 byte subpacket of the data packet 54c from the packet memory 20 to the MAC transmit buffer 32 which is currently busy. Similar overlapping uses of the structure of the transmit controller 42 occur throughout. Since the receive 40 and transmit 42 controllers operate essentially independently, they can concurrently perform portions of their tasks for each of a plurality of LAN ports. Additionally, as previously described, the receive 40 and transmit 42 controllers are preferably comprised of a plurality of controllers, e.g., state machines, that each operate concurrently to perform portions of the receive and transmit tasks. For example, FIG. 9 shows exemplary receive 90 and transmit 150 tasks overlapping in the present invention (for simplicity, this is shown in the case where the data packet size is 64 bytes, i.e., a subpacket is the same as a packet) . A first receive task RX1 (on a first port) is shown placing a 64 byte packet on the MAC interface bus 31. Next, the packet is stored into the MAC receive buffer 30. A buffer 70 is then allocated and pointed to by the receive session registers 76 to control the transfer of data from the packet memory 20 to the packet memory output buffer 36. This sequence of operations is shown concurrently overlapping a different portion of the receive task 90 on a second port. This is possible since the receive task 90 has been subdivided to permit different portions of the task to be performed on different portions of the shared resources. Additionally, due to the buffering on the interfaces to the shared resources, each port can withstand at least a packet (64 byte) transmission delay time without any data loss. Similarly, multiple transmit tasks 150, e.g., TXl, TX2, etc., can overlap each other as well as the receive tasks which can overlap each other as well as concurrent transmit tasks, e.g., TXl data on the MAC interface bus 31 is shown overlapping TX2 data coming from the packet memory 20 and RX3 descriptor data being entered into the descriptor memory 22. Again, this is possible since each task is accessing different portions of the shared resources while maintaining intermediate data within the buffered data interfaces. The described architecture of the switch controller (see FIG. 2) is conducive to being implemented within a single integrated circuit package, e.g., an application specific integrated circuit (ASIC) , with the packet 20 and descriptor 22 memories and the MACs 18 being external to the single integrated circuit package. In a preferred embodiment, these external memories are commercially produced off-the-shelf RAM (or any other read/write memory) and the MACs are also readily available off the shelf devices. For example, currently used MACS are commercially available devices that support eight ports, i.e., octal MACs. Using such a device, allows the component count to be further minimized. However, it should be noted that for descriptive purposes each described aforementioned MAC 18 would then refer to one of the eight ports within such a device. Although the present invention has been described in detail with reference only to the presently-preferred embodiments, those of ordinary skill in the art will appreciate that various modif cations can be made without departing from the invention. For example, while Ethernet type LANs have been described, one of ordinary skill in the art will appreciate that the present invention is applicable to other data transfer protocols as well. Accordingly, the invention is defined by the following claims. // // // // // // // // // // // // // // //

Claims: CLAIMS We claim: 1. A system for selectively transferring data packets between a plurality of local area networks (LANs) , wherein said data packets identify destination and source addresses, said system comprising: a plurality of media access controllers (MACs) each configured for receiving and transmitting data packets to and/or from a different LAN; said MACS including at least a first MAC associated with a first LAN for receiving data packets from said first LAN and a second MAC associated with a second LAN for transmitting data packets to said second LAN; a shared packet memory for storing a plurality of data packets; a receive data path for buffering and transferring data from said MACs to said packet memory; a transmit data path for buffering and transferring data from said packet memory to said MACs; and multiple controllers for causing said receive data path and said transmit data path to concurrently transfer data. // // // // // // NOT FURNISHED UPON FILING 5. The system of claim 1 wherein said transmit data path is comprised of: a packet memory input buffer for periodically receiving and buffering at least a portion of data packets from said packet memory; and a MAC transmit buffer coupled to said packet memory input buffer for periodically buffering and transmitting at least a portion of data packets directed to said MACs. 6. The system of claim 1 wherein said receive data path, said transmit data path, and said multiple controllers are implemented within a single integrated circuit package. // // // // // // // // // // // // // // // // 7. A system for selectively transferring data packets between a plurality of local area networks (LANs) , wherein said data packets identify destination and source addresses, said system comprising: a plurality of media access controllers (MACs) each configured for receiving and transmitting data packets to and/or from a different LAN; said MACS including at least a first MAC associated with a first LAN for receiving data packets from said first LAN and a second MAC associated with a second LAN for transmitting data packets to said second LAN; a MAC receive buffer for periodically receiving and buffering at least a portion of data packets from said MACs,- a MAC transmit buffer capable of operating concurrently with said MAC receive buffer for periodically buffering and transmitting at least a portion of data packets directed to said MACs; a shared packet memory for storing a plurality of data packets; a packet memory input buffer for periodically receiving and buffering at least a portion of data packets from said packet memory; a packet memory output buffer capable of operating concurrently with said packet memory input buffer for periodically buffering and transmitting at least a portion of data packets to said packet memory,- a shared descriptor memory for storing descriptors pointing to said data packets stored within said packet memory,- an address table for correlating the destination address of each data packet with one of said MACs,- a receive controller for causing a data packet from said first MAC to be stored in said packet memory via said MAC receive buffer and said packet memory output buffer and for generating descriptors corresponding to the locations of said data packet within said packet memory,- wherein said receive controller stores said descriptors in said descriptor memory in response to said address table and the destination address of said data packet ; and a transmit controller capable of operating concurrently with said receive controller for causing a data packet from said packet memory to be transmitted to said second MAC via said packet memory input buffer and said MAC transmit buffer according to descriptors stored within said descriptor memory. 8. The system of claim 7 additionally comprising a bidirectional interface bus for transferring data between said MACs and said MAC receive and transmit buffers. 9. The system of claim 7 wherein each of said receive and transmit controllers are state machines. // // // // // II 10. The system of claim 7 wherein said MAC receive buffer, said MAC transmit buffer, said packet memory input buffer, said packet memory output buffer, said receive controller, and 13. The system of claim 7 wherein said MAC receive buffer, said MAC transmit buffer, said packet memory input buffer, said packet memory output buffer are each organized as first in first out buffers (FIFOs) capable of inputting data at a first rate and outputting data at a second rate. // // // // // // // // // // // // // // // // // // // // // // // 14. In a system comprised of (1) a plurality of r.edia access controllers (MACs) each configured for receiving and transmitting data packets to and/or from a different local area networks (LAN) , said MACS including at least a first MAC associated with a first LAN for receiving and buffering data packets from said first LAN and a second MAC associated with a second LAN for transmitting data packets to said second LAN, (2) a shared packet memory for storing a plurality of data packets, and (3) a shared descriptor memory for storing descriptors pointing to said data packets stored within said packet memory, wherein said data packets identify destination and source addresses, a switch controller for selectively transferring data packets between a plurality of LANs via said MACS, said switch controller comprising: a MAC receive buffer for periodically receiving and buffering at least a portion of data packets from said MACs,- a MAC transmit buffer capable of operating concurrently with said MAC receive buffer for periodically buffering and transmitting at least a portion of data packets directed to said MACs; a packet memory input buffer for periodically receiving and buffering at least a portion of data packets from said packet memory; a packet memory output buffer capable of operating concurrently with said packet memory input buffer for periodically buffering and transmitting at least a portion cf data packets to said packet memory,- // an address table for correlating the destination address of each data packet with one of said MACs,- a receive controller for causing a data packet from said first MAC to be stored in said packet memory via said MAC receive buffer and said packet memory output buffer and for generating descriptors corresponding to the locations of said data packet within said packet memory; wherein said receive controller stores said descriptors in said descriptor memory in response to said address table and the destination address of said data packet ,- and a transmit controller capable of operating concurrently with said receive controller for causing a data packet from said packet memory to be transmitted to said second MAC via said packet memory input buffer and said MAC transmit buffer according to descriptors stored within said descriptor memory. 15. The switch controller of claim 14 additionally comprising a bidirectional interface bus for transferring data between said MACs and said MAC receive and transmit buffers. 16. The switch controller of claim 14 wherein each of said receive and transmit controllers are state machines. // // // // // 17. The switch controller of claim 14 wherein said MAC receive buffer, said MAC transmit buffer, said packet memory input buffer, said packet memory output buffer, said receive controller, and said transmit controller are implemented within a single integrated circuit package. 18. The switch controller of claim 14 additionally comprising: receive session registers for storing descriptors generated by said receive controller before said descriptors are stored in said descriptor memory,- transmit session registers for storing descriptors retrieved from said descriptor memory,- and wherein said transmit controller is responsive to said retrieved descriptors within said transmit session registers for selecting data packets from said packet memory for transmission to said MACs. 19. The switch controller of claim 18 wherein said MAC receive buffer, said MAC transmit buffer, said packet memory input buffer, said packet memory output buffer, said receive controller, said transmit controller, said receive session registers, and said transmit session registers are implemented within a single integrated circuit package. // // // // 20. The switch controller of claim 14 wherein said MAC receive buffer, said MAC transmit buffer, said packet memory input buffer, said packet memory output buffer are each organized as first in first out buffers (FIFOs) capable of inputting data at a first rate and outputting data at a second rate. // // // // // // // // // // // // // // // // // // // // // // // I 21. A method for selectively transferring data packets between a plurality of local area networks (LANs) via a plurality of media access controllers (MACs) each configured for receiving, transmitting and buffering data packets to and/or from a different LAN, said MACS including at least a first MAC associated with a first LAN for receiving and buffering data packets from said first LAN and a second MAC associated with a second LAN for buffering and transmitting data packets to said second LAN, said method comprising the steps of: (1) receiving a portion of a data packet into a receive buffer in said first MAC; (2) periodically transferring a subportion of said received data packet portion from said receive buffer into a MAC input buffer; (3) periodically transferring said subportion of said data packet from said MAC input buffer into a packet memory output buffer,- (4) periodically transferring said subportion of said data packet from said packet memory output buffer to a packet memory,- (5) repeating said steps 1-4 until all subportions which comprise said data packet are transferred to said packet memory; (6) storing a descriptor in a descriptor memory wherein said descriptor points to said data packet in said packet memory; and (7) designating that said descriptor has been stored. 22. The method of claim 21 further including the steps of : (1) periodically checking whether said descriptor has been stored; (2) periodically retrieving said descriptor from said descriptor memory,- (3) periodically transferring a portion of said data packet from said packet memory to a packet memory input buffer, wherein said data packet is pointed to by said descriptor,- (4) periodically transferring said data packet portion from said packet memory input buffer to a MAC output buffer; (5) periodically transferring said data packet portion from said MAC output buffer to a transmit buffer in a second MAC; (6) repeating steps 3-5 until all portions which comprise said data packet has been transferred to said MAC transmit buffer,- and (7) resetting the designation that said descriptor is stored. // // // // // // // //

Inventors: BAUMERT ROBERT J, SEAMAN ANTHONY W, STAVES SHERRE M, BAUMERT, ROBERT, J., SEAMAN, ANTHONY, W., STAVES, SHERRE, M.
Applicants: NETVANTAGE
Application year: 1999
Main classification: H04L12
IPC codes: H04L12