1. Technical Field
The present invention relates to network communications in general, and, in particular, to a method and apparatus for translating data packets. Still more particularly, the present invention relates to a method and apparatus for translating data packets from one network protocol to another.
2. Description of the Related Art
In a mixed protocol network environment, a significant amount of processing power of a network router is spent on translating data packet information from one protocol to another. Packet translation is a relatively time-consuming process. For a network storage environment, it is important to perform packet translation in an efficient manner in order to maintain an overall high system performance.
Conventionally, there are hardware solutions and software solutions for facilitating the packet translation process. One hardware solution is to construct packet headers with a state machine, but the problem with such solution is that there is no flexibility if network protocols change or migrate. Another hardware solution is to construct packet headers with a general purpose processor (GPP), but the problem with such solution is that long sequences of GPP instructions are required to execute protocol translations.
As for software solutions, information from the header or context block of a packet can be used to construct headers or frames. But the problem with such solution is that there are performance constraints from recalculations needed to be made for each translation.
Consequently, it is desirable to provide an improved method and apparatus for translating data packets between different network protocols.
In accordance with a preferred embodiment of the present invention, a set of translation templates is constructed. The translation templates are then loaded into a translation template cache. In response to a data packet from a first network arriving at a translation router, an appropriate translation template is selected from the set of translation templates within the translation template cache according to the translation context of the data packet. Next, a new header for transmission into a second network is constructed by reading header fields of the data packet from the first network along with the appropriate translation template in the translation template cache. The data payload of the data packet from the first network is subsequently removed from the header of the data packet and then appended to the constructed header of the second network. Finally, the newly constructed data packet is transmitted to the second network.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.
The invention itself, as well as a preferred mode of use, further objects, and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
a-3b are block diagrams of a translation template cache, in accordance with a preferred embodiment of the present invention;
Referring now to the drawings and in particular to
For example, if translation router 15 has three ports, port 1 of translation router 15 can be associated with Fiber Channel, port 2 of translation router 15 can be associated with Transmission Control Protocol/Internet Protocol (TCP/IP), and port 3 of translation router 15 can be associated with an InfiniBand. Thus, translation router 15 is aware of the type of network protocol to which a network packet belongs based on the incoming port number from which the network packet comes. Similarly, translation router 15 is aware of the type of network protocol to which a network packet should be translated based on the outgoing port number to which the network packet is to be transmitted.
Within a network environment, such as network environment 10, the processing overhead can be relatively high because of the large number of data packets that needed to be dealt with. However, within the network environment, there are also a couple of features that can be used to alleviate the above-mentioned problem. First, although there are numerous network protocols that are being in-use, the total number of different network protocols are relatively small and the specifics of each network protocol are well defined by various governing standards. Second, most network protocols use a header structure ahead of the payload in a packet containing packet description information such as network source and destination addresses, type of packet, etc. The present invention leverages the above-mentioned two attributes in order to pre-build the necessary set of translation template caches as well as constructing the algorithms necessary to fill a particular destination translation template caches from any of the possible input network protocols.
With reference now to
Translation engine 22 may be implemented as software, firmware, hardware, or combinations thereof, and is capable of executing operations necessary to manipulate information in packet headers for protocol translations. Translation template cache 21 may be implemented in a dedicated on-chip memory, whether as one or more locked cache lines or a private memory accessible to translation engine 22.
Referring now to
A translation template is required for each protocol translation. For example, consider a network A and a network B having a protocol A and a protocol B, respectively. One translation template is required for generating data packets suitable for transmission in network B from data packets received from network A. Another translation template is required to generate data packets suitable for transmission in network A from packets received from network B. If there is a third network C having a network protocol C needed to be supported, four more translation templates must be constructed and loaded into the translation template cache. Basically, two translation templates are required for protocol translations between network A and network C, and two translation templates are required for translations between network B and network C.
Five different translation templates associated with their respective network protocols are shown in
The details of a translation template can be illustrated with an example. The control and information bits of a typical Fibre Channel frame header include:
Referring now to
Next, exchange attributes are identified by a translation router, such as translation router 15 from
As each data packet arriving into the translation router, an appropriate translation template is selected from the translation template cache according to the translation context of the data packet by an translation engine, as shown in block 33.
Appropriate header fields from the data packets from a first network are read and used by the translation engine along with the appropriate translation template in the translation template cache to generate new headers for transmission into a second network, as depicted in block 34.
The data payload of the data packet from the first network is removed from the header of the data packet, and is then appended to the recently constructed header for the second network, as shown in block 35. The resultant data packet intended for the second network is then placed into a local memory of the network router.
The data packet intended for the second network is subsequently pulled out of the local memory within the network router. This is usually performed by using a direct memory access (DMA) or by the general-purpose processor, as depicted in block 36. The data packet intended for the second network is sent to the second network.
As has been described, the present invention provides an improved method and apparatus for translating data packets between different network protocols. Control blocks are constructed in a system memory to facilitate translation from one protocol domain to another. They must be repeatedly accessed as part of the translation process. With the present invention, the control blocks are stored on-chip in a manner that facilitates repeated use over a number of data packets. Further, the on-chip storage is not bound to one protocol format or another. In this way, packets may be translated across such protocols as Fibre Channel, Ethernet and InfiniBand.
It is also important to note that although the present invention has been described in the context of a fully functional translation router, those skilled in the art will appreciate that the mechanisms of the present invention are capable of being distributed as a program product in a variety of forms, and that the present invention applies equally regardless of the particular type of signal bearing media utilized to actually carry out the distribution. Examples of signal bearing media include, without limitation, recordable type media such as floppy disks or CD ROMs and transmission type media such as analog or digital communications links.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.
The present application is a continuation of U.S. patent application Ser. No. 10/605,621, filed on Oct. 14, 2003, and entitled “Method and Apparatus for Translating Data Packets from One Network Protocol to Another,” assigned to the assignee of the present invention and incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 10605621 | Oct 2003 | US |
Child | 11840478 | Aug 2007 | US |