STORE TO FORWARD CORRECTLY
The present invention relates to a manner of handling fragmented, packetized data in an analyzer configured to receive the data packets and perform an action on the basis thereof.
Large pieces of data, such as jumbo frames or large files, may be too large to pass a packetized network and often are fragmented - divided into smaller portions which individually are introduced into packets having separate address headers and the like. Often, each packet of such a group of packets comprises information from which it may be determined that the packet is a part of a group of packets, and even the position of the packet in the group (the number of the packet in a sequence corresponding to the packets and the position of the corresponding portion of the fragmented large piece of data). Thus, when all packets of a group of packets are received, the portions of the fragmented large piece of data or file may be retrieved and the large piece of fragmented data or file may be re-assembled when the packets are ordered correctly.
The data fragments may be incorporated in the packets in a variety of manners, such as in a payload thereof. The data packets of a group are then provided with address data ensuring that the data packets find their way to the intended receiver.
The receiver then is to receive the data packets, where after the fragments may be retrieved and the large piece of data re-assembled for e.g further processing. This further processing may be an analysis of the large piece of data.
However, the actual receiver or purpose of the large piece of data may be identified by address data or routing data of the large piece of data. The large piece of data may have therein address fields as defined e.g. by the Ethernet standard or the like. Then, when fragmenting the large piece of data, this address/routing data will be provided in one or a few of the data packets of the group.
The data packets of the group have individual address headers and therefore eventually will be received by a receiver. However, as data packets in a packetized network may take different routes, some data packets may overtake others in the process.
In or at the intended receiver, a further analysis or action may be taken, usually on the basis of the address or routing data of the large piece of data.
However, even if the data packet(s) comprising the routing/address data of the large piece of data is/are output first in the hope of it/them arriving first in order to allow the intended receiver to base its analysis/action on the routing/address data, such packets do not necessarily arrive first. Thus, prior art receivers or analyzers have had to make the decisions or analysis on other parts of the large piece of data. Such decisions may be the forwarding of the data packets of the group to one of a number of processors. However, when the data packet(s) having the address/routing data finally arrive, it may be seen that the decision was wrong, whereby it is required to take a correcting action and have one processor forward the erroneously forwarded packets to the correct processor. This drains resources from the processors.
The present invention relates to a manner of preventing such problems.
In one aspect, the invention relates to a method of handling a plurality of data packets comprising portions of a fragmented large piece of information, where one or more predetermined data packets comprise routing information of the fragmented information, the method comprising: receiving a first data packet, identifying that the first data packet is one of the plurality of data packets but not one of the predetermined packets, storing the first data packet, receiving a second data packet, identifying that the second data packet is one of the predetermined data packets, from the second data packet, identifying, on the basis of at least a portion of the routing data, an action, and performing the action on the first and second data packets.
Naturally, the data packets may conform to any standard or protocol, such as Ethernet standards.
The fragmentation of the large piece of information may be performed in any manner. Usually, a consecutive number of bits from one end is added to one packet, and so on, but any division or fragmentation may be performed. Preferably, the address or routing data of the large piece of information is provided in one or a few data packets, so that routing decisions or other actions determined from this information may be made or identified from a lower number of packets than the total number of packets holding fragments.
The identification that a packet holds a fragment may be made in any usual manner. This may be seen from a standard IPv4 or IPv6 header.
Naturally, the routing data may be any type of data which the analysis may use to determine the action from. Often, the routing data is address data identifying a transmitter and/or a receiver of the large piece of data, but the routing data may also be a flow identifier, path identifier or the like not defining or not only defining a receiver or transmitter but also having information relating to a particular flow or a particular path.
The storage of the packet may be a local storage or a remote storage. The first data packet is stored as no decision can be made from it (it is not one of the predetermined packets with routing information).
When the second packet is received, a decision may be made, and both packets may be handled in accordance with the decision.
Naturally, a number of other packets may be received not being one of the plurality of packets. These may be handled individually and in accordance with their type and routing information. Naturally, multiple large pieces of information may be fragmented so that multiple groups of packets each relating to one large piece of information may be received -in any order. In that situation, the packets from each individual group may be handled according to the invention.
Naturally, if no decision can be made from the second data packet alone, such as if it does not comprise all the routing data or sufficient routing data from the large piece of information, the second packet may be stored until a third (or even more) packet(s) is/are received having the required information.
When the second (or further) packet is received, the correct action may be decided on and taken.
In one embodiment, the action identified is a forwarding of the first and second data packets to a processor identified on the basis of the second data packet, and wherein the action taken is the forwarding of the first and second data packets to the identified processor.
Thus, a plurality of processors may be chosen between. In one embodiment, the processors have different capabilities and/or are suited for analyzing data of different types. Alternatively, different processors may be set up for analyzing data from particular transmitters or to particular receivers, such as particular flows of data. Thus, in each case, it is decided to forward the data packets received to the correct processor. This decision is made from the routing information of the fragmented information.
Further advantages are obtained when the first and second data packets are output or otherwise handled in their order in the group of packets, as often a receiving process or entity would prefer to analyze the fragmented piece of information either in its entirety or sequentially from a beginning thereof.
Thus, if the second data packet has the start fragment of the fragmented information, it may be desired to output that first and then the first data packet, if that holds the next fragment. Otherwise, perhaps only the second data packet is output, and the first data packet may be stored until the data packets with the intermediate fragments have been received and forwarded in the correct order.
In fact, it may be desired to store all data packets of the group and forward these only when all data packets have been received, where the outputting then is in the correct order.
This is especially advantageous when the data packets are forwarded to an analysis or analyzing processor configured to analyze the fragments or the large piece of information. Then, the processor needs not analyze only a portion of the fragmented information and then go on to analyze other data packets when awaiting the remainder of the data packets from the fragmented information.
In another aspect of the invention, the invention relates to a method of forwarding data packets to a processor, the method comprising: receiving a first data packet, identifying that the first data packet comprises a part of a large data packet fragmented and introduced into a plurality of data packets including the first data packet and a second data packet, the second data packet comprising address data of the large data packet, storing the first data packet, receiving the second data packet, from the second data packet, identifying, on the basis of at least a portion of the address data, a processor, and outputting the first and second data packets to the identified processor.
Another aspect relates to an apparatus for handling a plurality of data packets comprising portions of a fragmented large piece of information, where one or more predetermined data packets comprise routing information of the fragmented information, the apparatus comprising: a data packet input, a data packet analyzer configured to: receive a first data packet, identify that the first data packet is one of the plurality of data packets but not one of the predetermined packets, store the first data packet, receive a second data packet, identify that the second data packet is one of the predetermined data packets, from the second data packet, identify, on the basis of at least a portion of the routing data, an action, and perform the action on the first and second data packets.
Naturally, the data packet input may be any type of input for receiving data packets from any type of medium, wireless or wired, data cable, trunk, network or the like. Usual data inputs have MAC/PHY/antenna/connector etc etc. Any protocol may be used.
The analyzer may be formed by any type of element, processor, chip, DSP, ASIC, hardwired or programmable, as a single element or split up into multiple elements communicating with each other.
Data packet analysis is common.
The storage may be internal or external, in the vicinity or remote. Any type of storage may be used.
The action taken and decided on may be handled by the analyzer, or the analyzer may output an instruction or information identifying or describing the action to a separate element handling the action. Usually, the action will be taken on the first and second data packets, such as a processing thereof.
In one embodiment, the apparatus further comprises a plurality of data packet outputs each configured to be connected to a separate processor, wherein the data packet analyzer is configured to identify, as an action, a processor, wherein the action taken is the forwarding of the first and second data packets to the identified processor.
As the inputs, the outputs may be of any type, such as facilitating communication with the processors on any protocol, wirelessly or wired.
The processors may be a single processor multitasking or multiple separate processors, such as separate servers. Communication with the processors may take place via any type of network, cable or protocol. The processors may be local or remote.
Another aspect of the invention relates to an apparatus for distributing data packets to a plurality of processors, the apparatus comprising: a data packet input, a plurality of data packet outputs each configured to be connected to a separate processor, a data packet analyzer configured to: receive a first data packet from the input. identify that the first data packet comprises a part of a large data packet fragmented and introduced into a plurality of data packets including the first data packet and a second data packet, the second data packet comprising address data of the large data packet, store the first data packet, receiving the second data packet from the input, from the second data packet, identify, on the basis of at least a portion of the address data, a processor or an output, output the first and second data packets to the identified processor or from the identified output.
Again, the method may be as that described above, and the advantages obtained may be the same. A preferred embodiment is described below with reference to figure 1.
In figure 1, an analyzer (rectangle) is configured to receive a number of data packets (arrow from below).
In a series of data packets, some data packets may relate to fragmented data. Thus, a group of packets having data packets 1, 2 and 3, for example, may relate to the same overall piece of data (such as a large Ethernet jumbo frame or other type of IP datagram) which has been split up into parts (fragmented) which are individually encapsulated and now are formed individual data packets. Individual data packets may take different routes from source/transmitter to receiver/recipient. One data packet may thus be delayed relative to another data packet even when stemming from the same transmitter and being forwarded to the same receiver.
That a data packet is a part of a group (as well as the order of the packets in the group) may be determined from the individual data packets.
However, when fragmenting a large piece of data, packet 1 (or packets 1 and 2) now has/have the routing data (e.g. packet header) of the fragmented piece of data, which provides a problem when e.g. packets 2 and 3 are received before packet 1.
In systems where an adapter or analyzer receives these data packets and determines to which of a plurality of processors the packet is to be forwarded, or what action to take on the basis of primarily the routing data of the large piece of data, this is a problem in that the correct action or processor ID can only be determined from packet 1 which is sometimes received subsequent to other packets in the group. These earlier packets of the group may today be forwarded to the wrong processor, or the wrong action may be taken. If the packets are forwarded to the wrong processor, communication is required between the processors to have these packets forwarded to the correct processor (as determined from the routing information in packet 1) for further handling. This "exception handling" requires resources from the processors.
In the present system, data packets of a group (and which are not data packet 1) will be stored in the adapter and only forwarded, when packet 1 has been received. Thus, all packets of a group are forwarded to the correct processor (based on information from packet 1). Then, no "exception handling" is required between the processors.
In addition, it may be desired to forward all data packets of a group in the correct order. In one situation, all received data packets may be forwarded when the sequence is complete. Thus, if packets 2 and 3 are already received, packets 1, 2 and 3 may be forwarded, when packet 1 is received. If also packet 5 was received, it could then await the receipt of packet 4, where after also packets 4 and 5 could be output. In this manner, the processor need not re-arrange the packets. They will be forwarded in the correct order - but over time.
It may, therefore, be desired to not forward data packets of a group of data packets to the determined processor, until all data packets of the group are received, whereby the processor needs no housekeeping (aging, deletion or the like) relating to whether or when all packets of a group are received. A processor may require all data packets in order to analyze the group of data packets or the large piece of data. Even more preferable is it when these data packets of a group of data packets are forwarded "back to back" to the processor, so that the processor needs no storage space for holding the packets until all are received.