Switching ethernet controller providing packet routing

A switched Ethernet controller (SEC) device and associated method that provides processor based intervention in the packet routing decision process is provided. The method of routing a multicast packet between a source port on a source device and a plurality of destination ports on a plurality of destination devices, utilizes a processor. The method includes the steps of the source device receiving the multicast packet via the source port, the source device sending the multicast packet to the processor, the processor examining the multicast packet, the processor determining the plurality of destination devices and corresponding the plurality of destination ports based on the results obtained during the step of examining, the processor transferring the multicast packet to the plurality of destination devices, and the plurality of destination devices sending the multicast packet to the plurality of destination ports.

FIELD OF THE INVENTION

The present invention relates to switched Ethernet controller devices and more specifically to switched Ethernet controller devices for providing processor based intervention in the packet routing decision process.

BACKGROUND OF THE INVENTION

Traditional Ethernet switching hub equipment operates by examining Ethernet header information to perform local switching functions. If it is determined that a frame is destined for a local port, the hub transfers the frame between the inbound port and the outbound port. Typically this transfer occurs between multiple switching Ethernet controller devices in hardware using a direct memory access transfer scheme, common in many computer designs. The disadvantage of using direct memory transfer to transfer Ethernet frames is that it precludes the provision of any upper OSI level processing such as Level 3 processing or routing. The OSI stack defines seven levels or layers that operate independently of one another. Each level or layer has a distinct task or function to perform. In the OSI model Level 1 is defined as the physical layer, Level 2 as the link layer, and Level 3 as the network level. Traditional Ethernet switching is performed at the Level 2 layer. However, in many situations it is desirable to be able to perform some Level 3 processing also (i.e. by a processing device other than the switching Ethernet controller device), using suitable hardware or software techniques. Using direct memory transfer techniques to transfer the frame from one port to another makes this possible.

SUMMARY OF THE INVENTION

Accordingly, it is an object of the present invention to provide a switched Ethernet controller device able to intervene in the packet routing decision mechanism.

It is another object of the present invention to provide a switched Ethernet controller device able to intervene in the packet routing decision mechanism for both multicast and unicast packets.

A switched Ethernet controller (SEC) device and associated method that provides processor based intervention in the packet routing decision process is disclosed. A suitably programmed processor in combination with the switched Ethernet controller device enables a user or network designer to exert control over the packet routing decision process. Thus, routing capabilities can be incorporated in a switching hub constructed using SEC devices of the present invention. Processes are disclosed for handling both multicast and unicast packets. For multicast packets, rather than perform conventional lookup operations to determine the destination device and corresponding port number, a method is disclosed whereby the multicast packet, received from a source device, is first sent to the processor. The processor, in turn, examines the Level 3 or network layer routing information in the payload of the Ethernet frame and determines the destination device and corresponding port to transfer the packet to. For unicast packets, a buffer request is first sent to the processor rather than being immediately sent to all ports. The processor, based on an examination of the Level 3 data contained in the payload of the Ethernet frame, either discards the packet, causes the packet to be transferred from the source device to the destination device or requests to receive the packet directly.

Thus, there is provided in accordance with a preferred embodiment of the present invention, a method of routing a multicast packet between a source port on a source device and a plurality of destination ports on a plurality of destination devices, utilizing a processor, the method including the steps of the source device receiving the multicast packet via the source port, the source device sending the multicast packet to the processor, the processor examining the multicast packet, the processor determining the plurality of destination devices and corresponding the plurality of destination ports based on the results obtained during the step of examining, the processor transferring the multicast packet to the plurality of destination devices, and the plurality of destination devices sending the multicast packet to the plurality of destination ports.

In accordance with a preferred embodiment of the present invention, the step of causing the source device to send the unicast packet to the destination device, includes the steps of the processor sending a second buffer request to the destination device, transferring the unicast packet from the source device to the destination device, and the destination device sending the unicast packet to the destination port. In addition, said step of transferring includes transferring the unicast packet utilizing direct memory transfer.

The step of receiving the unicast packet from the source device includes the steps of the processor sending a second buffer request message to the source device, and the source device sending the unicast packet to the processor.

DETAILED DESCRIPTION OF THE INVENTION

A high level block diagram of an example switching hub built using switched Ethernet controller devices constructed in accordance with a preferred embodiment of the present invention is illustrated in FIG.1. The switching hub, generally referenced10, comprises a processor12coupled to memory14. Processor12can be any suitable processor, such as a microprocessor or equivalent. Memory14can be any suitable memory device or devices, such as random access memory (RAM), either of the dynamic or static type. In the example illustrated inFIG. 1, processor12is coupled to a PCI bus, which is a computer bus well known in the art and commonly used in personal computer (PC) architectures. Switching hub10also comprises one or more switching Ethernet controller (SEC) devices. Switching hub10can be constructed to include up to any number of SEC devices, thus implementing a switching hub having any number of Ethernet ports. Illustrated inFIG. 1are two such SEC devices, SEC16and SEC2C. SEC devices16,20function to provide Ethernet switching capabilities between a plurality of Ethernet ports. In the example illustrated inFIG. 1, for the sake of clarity, only one Ethernet port30is shown coupled to SEC16and only one Ethernet port32is shown coupled to SEC20.

The present invention provides the network with the ability to both transfer data directly between SEC devices and to enable the processor12to intervene in the switching operations. Such an intervention is typically software controlled such that the criteria regarding the decisions to be made can be changed overtime.

In a preferred embodiment, each SEC device is coupled to its own memory array. SEC16is coupled to RAM18and SEC20is coupled to RAM22. External Ethernet devices are coupled to the Ethernet ports on the SEC devices. Ethernet port30is coupled to the external Ethernet device34and Ethernet port32is coupled to external Ethernet device36. Both external Ethernet devices are coupled to their respective Ethernet ports through a wire connecting the two.

The manner of performing Ethernet switching between switches (i.e. non-intervention mode) will now be described, with reference to the high level flow diagram illustrated in FIG.2. First, a packet is received over the wire from an external Ethernet device, in this example, Ethernet device34. The packet is received by SEC device16, designated as the source SEC device, for purposes of this example (step40). Source SEC16stores the packet in RAM18(step42). Source SEC16determines the destination SEC device and the appropriate port number within the SEC device to send the packet to (step44). For the purposes of this example, SEC20is designated the destination SEC. Each SEC device maintains an address table within its associated memory with includes, among other things, the 48 bit media access control (MAC) address, device number and port number. Source SEC16looks up the destination address included in the received packet. If the destination address is found, source SEC16reads the corresponding device and port numbers from the table. As described in more detail in Applicant's co-pending application Ser. No. 08/790,151 entitled “A Bus Protocol” and filed on the same day herewith, the SECs transfer data therebetween in accordance with a “write-only” data transfer protocol. Other data transfer protocols are also incorporated in to the present invention.

In accordance with the write-only data transfer protocol, once source SEC16has determined where to send the data, it first writes a buffer request to destination SEC20(i.e. the SEC device found during step44), requesting that the destination device prepare for a packet transfer (step46). Destination SEC20then allocates a buffer for the packet to be received and writes a start of packet message to source SEC16with an indication of the location of the allocated buffer. A direct memory access (DMA) transfer then occurs directly between RAM18and RAM22, thus transferring the packet to the allocated buffer in destination SEC20(step48). Once the DMA transfer is complete, destination SEC20outputs the packet to the proper port (step50). In this example, the packet is transferred between Ethernet port32and external Ethernet device36over the wire.

As discussed previously, it would be beneficial to network hardware and software application designers if it were possible to control the routing mechanism within a switching hub. Thus, a preferred embodiment of the present invention teaches a hardware/software intervention mechanism. The intervention mechanism allows a user or network designer to exert finer control over the packet routing decision process than is possible with just switch to switch transfers. To achieve an intervention function, processor12examines the Level 3 or network layer header information in the payload of the Ethernet frame. The intervention process is different for multicast packets and for unicast packets. The intervention process for multicast packets will be described first.

For multicast packets, a high level flow diagram of the process of intervening in the packet routing decision mechanism is illustrated in FIG.3. Referring also toFIG. 1, source SEC device16first receives a packet over the wire from external Ethernet device34via Ethernet port30(step60). Source SEC device16then forwards the packet to processor12via the PCI bus (step62), typically via the write only protocol described hereinabove. Processor12subsequently decides to what devices and corresponding ports the packet needs to be sent (step64). The SEC device of the present invention only requires one packet to be sent to it, regardless of the number of destination ports within the SEC the multicast packet is directed to. The SEC device will automatically forward the packet to all the destination ports which processor12tagged for that particular multicast packet. Once the destination devices and associated ports are determined, processor12forwards the packet to the appropriate destination devices (step66). The destination SEC devices then forward the packet to the destination ports within their respective device (step68).

For unicast packets, a high level flow diagram of the process of intervening in the packet routing decision mechanism is illustrated in FIG.4. Referring also toFIG. 1, source SEC devices16first receives a packet over the wire from external Ethernet device34via Ethernet port30(step80). Rather than send the packet to the destination device, source device16sends a buffer request to processor12(step82). Included in the buffer request is data that processor12needs to make a decision as to how to direct the received packet, such as the source port, the destination device and port and the byte count. Based on the information received in the buffer request, processor makes a decision as to how to handle the packet (step84). In a preferred embodiment, processor12chooses one of the following three actions: discard the packet (step86); send the packet to a destination device (steps90to94); or request to receive the entire packet itself (steps100to102).

To discard a packet (step86), processor12sends a start of packet message to the source SEC device16with the byte count field set to zero. If processor12decides to forward the packet to a destination device, it first sends a buffer request to destination SEC20device (step90). In response to the buffer request, destination SEC device20allocates buffer space and sends a start of packet message to source SEC device16. Source SEC device16performs a DMA transfer of the packet to destination SEC20(step92). When the DMA transfer is complete, source SEC16sends an end of packet message to destination SEC20. Subsequently, destination SEC20transfers the packet to the appropriate port (step94).

If processor12decides to request the packet, it first sends abuffer requeststart of packetmessage to source SEC16with the target device, within thebuffer requeststart of packetmessage, set to correspond to the processor itself (step100). Source SEC16then sends the packet to processor12followed by an end of packet message (step102).

Thus, for both multicast and unicast packets, the SEC provides a mechanism, for a device other than itself (i.e. processor12), to intervene in and play a role in the packet routing process. Processor12can be suitably programmed by the user to tailor the decision process to a set of particular user defined requirements.

While the invention has been described with respect to limited number of embodiments, it will be appreciated that many variations, modifications and other applications of the invention may be made.