The present invention relates generally to packet processing, and in particular, to packet segmentation and reassembly in switching fabric networks.
A network switching system comprises one or more switch fabric modules, such as Application Specific Integrated Circuits (ASICs), and a plurality of network switching modules. A network switching module redirects incoming data on one network node, out to another network node via the switch fabric module(s).
A network switching module performs segmentation and reassembly of network packets such as Ethernet packets. Segmentation fragments a packet, such as variable length packet, into fixed length cells to be transported across a switched fabric. Thereafter, the cells are reassembled to reconstitute the original packet.
A packet is segmented into fragments where each fragment is a fixed sized cell (e.g., 128 bytes or 256 bytes). All the fragments of specific packets are called member cells of that packet. Each cell gets a fixed or variable sized header. The header is formed from packet pre-classification information added by the ingress packet processor. A packet context is a buffer (i.e., packet buffer context) where member cells which completely match the criteria of membership of a packet are put together. The context is a function of 10 to 100 various parameters of packets and cells. An example minimum algorithm complexity for reassembling packets is in the order of O(mn) where m is the time it takes to search for a packet buffer context and n is the number of parameters used to find the packet buffer context. As such, logic to perform segmentation and reassembly is time consuming and adds significant latency in packet forwarding in the network.
One embodiment comprises segmentation and reassembly of network packets into cells for sending them over to cell switched fabric networks to achieve fixed/constant latency. One embodiment comprises segmentation of a packet into member cells and reassembly of the member cells for a given packet buffer context, in a cell-based distributed system.
According to embodiments of the invention, a process for reassembly of member cells into a packet comprises receiving an incoming member cell of a packet from a switching fabric wherein each member cell comprises a segment of the packet and a header, generating a reassembly key using selected information from the incoming member cell header wherein the selected information is the same for all member cells of the packet, checking a reassembly table in a content addressable memory to find an entry that includes a logic key matching the reassembly key, and using a content index in the found entry and a sequence number of the incoming member cell within the packet, to determine a location offset in a reassembly buffer area for storing the incoming member cell at said location offset in the reassembly buffer area for the packet for reassembly.
The reassembly process further includes maintaining a reassembly table in a content addressable memory, wherein the reassembly table includes one or more entries corresponding to one or more packets, and wherein each entry comprises a logic key for a corresponding packet and a content index into a reassembly buffer area for storing incoming member cells of that packet.
Maintaining the reassembly table includes, in response to an incoming member cell of a packet, if the incoming member cell is a Start of Packet (SOP) cell of a packet or if the incoming cell lookup key is not found in the reassembly table, generating a new logic key using selected information from the incoming cell header wherein the selected information is the same for all member cells of the packet, allocating an area of the reassembly buffer for storing member cells of the packet, and placing a new entry into the reassembly table. The new entry includes said new logic key and a new content index into the reassembly buffer area for storing incoming member cells of that packet.
The packet is reassembled using the stored member cells in the reassembly buffer area for the packet using cell offset number or sequence number from cell header. The cell offset number with respect to the packet is unique for each member cell. The cell offset number or sequence number is not included in the reassembly key formation. The switching fabric comprises a switched fabric in a distributed information technology environment.
These and other aspects, features and advantages of the invention will be understood with reference to the drawing figures, and detailed description herein, and will be realized by means of the various elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following brief description of the drawings and detailed description of the invention are exemplary and explanatory of preferred embodiments of the invention, and are not restrictive of the invention, as claimed.
The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which:
The detailed description explains the preferred embodiments of the invention, together with advantages and features, by way of example with reference to the drawings.
The present invention may be understood more readily by reference to the following detailed description of the invention taken in connection with the accompanying drawing figures, which form a part of this disclosure. It is to be understood that this invention is not limited to the specific devices, methods, conditions or parameters described and/or shown herein, and that the terminology used herein is for the purpose of describing particular embodiments by way of example only and is not intended to be limiting of the claimed invention. One or more exemplary embodiments of the invention are described below in detail. The disclosed embodiments are intended to be illustrative only since numerous modifications and variations therein will be apparent to those of ordinary skill in the art.
Embodiments of the invention relate to packet processing including processing of network packets in switched fabric networks information technology environments. One embodiment comprises low overhead segmentation and reassembly of network packets for reducing data communication latency in switched fabric networks. One embodiment comprises segmentation of an Ethernet packet into member cells and reassembly of the member cells for a given packet buffer context, in a cell-based distributed system.
According to an embodiment of the invention, process for reassembly of member cells into a packet comprises obtaining a SOP cell or any first out of sequence cell of a new packet, constructing an associated packet buffer context, receiving member cells of that packet, copying the member cells without headers and placing them in sequence in the packet buffer context, and after all the member cells are in the buffer, providing content of the packet buffer context as the reassembled packet for further processing.
Exemplary embodiments of a packet processing system according to the present invention are described herein below.
As shown in
A networking switch 94 accepts network packets from various port interfaces. For each packet it performs look up operation which is part of packet processing. Based on packet processing operations, it appends a pre-classification header on each packet. The pre-classification header allows packet processing by other logic in the network switch. Before the whole packet with pre-classification information is sent to the switch fabric 110 via fabric interface 96, Segmentation and Reassembly (SAR) Logic 100 fragments the packet into one or more fixed sized cells. The cells follow a format which is understood by the switch fabric logic.
Each segmentation system 100S and each reassembly system 100R communicate with a switching fabric 110. In one embodiment of the invention, the architecture 120 may be implemented across a distributed system. In one embodiment of the invention, the architecture 120 may be implemented within a communication switch, such as detailed in relation to
The segmentation system 100S includes a segmentation module 101, a context table 102 and a buffer 103. The segmentation module 101 includes segmentation logic. The segmentation system 100S receives packets, such as Ethernet packets, wherein the segmentation module 101 segments each packet into member cells for transport over the switching fabric 110, wherein the switching fabric 110 routes each cell to an appropriate reassembly system 100R for reassembly into a packet. A cell comprises a header and a payload. The context table 102 provides the status of each received packet.
In one embodiment, the segmentation module 101 segments an incoming packet at 256B cell boundaries, wherein the last cell of the packet may be either 256B or 128B depending upon the size of the last cell in the packet. Common elements of the cell header in a given packet can be saved in buffer 103 as a common structure. As the segmentation module 101 concatenates the cell header to a cell payload, the common structure is also included, along with a (recalculated) sequence number and parity information for error correction.
Further, a reassembly system 100R comprises a segmentation module 101, a reassembly module 104, a content addressable memory 106 such as a TCAM, and a buffer 107. TCAM is a ternary content addressable memory. With a content addressable memory, the data is provided to the content addressable memory, and the content addressable memory returns a list of addresses where the data is stored, if found. Content addressable memory searches the entire memory in one operation. When a generated reassembly key is provided to the TCAM and in one operation the TCAM returns an entry in the reassembly table where a matching logic key is stored, if found. The algorithmic complexity of TCAMs search algorithm is O(1).
For reassembly, matching a cell to a packet is based on certain contexts. Each cell context is checked and if it matches a buffer context the cell belongs to, then the cell is stored in that buffer context for reassembling a packet.
A reassembly logic key 132 for a cell is created using tuples (i.e., ordered lists of elements) which are extracted from the cell header elements. The elements in the cell header include Source port, Destination port, COS, Unicast/Multicast bits, Source device ID, Destination device ID, Policer match, Vlan tag, Sequence number, packet id, Cell size and parity. A sequence number of the cell is not used in generating the logic key 132. The logic key 132 is placed in a TCAM table 133 comprising a TCAM bank in the TCAM 106. The logic key 132 includes those elements of the cell header that do not change across the different cells in a given packet. The sequence number (i.e., the sequence of the cell in a given packet) is not used to create the logic key 132.
Further, a reassembly packet buffer context 131 is constructed in the reassembly buffer 107 where the SOP cell is stored. The packet buffer context 131 has an associated content index 135 which indicates location of the packet buffer context 131 in the buffer 107. For each logic key 132 there is a corresponding content index 135 in the TCAM table 133. In one example, a content index X is associated with (or maps to) a first packet buffer context 131 (buffer segment), a content index Y is associated with (or maps to) a second packet buffer context 131, a content index Z is associated with (or maps to) a third packet buffer context 131, etc. As such, each content index corresponds to a packet buffer context 131 where cells of the same context are stored for reassembly purposes.
As such, for a new logic key 132, the TCAM table 133 is also populated with a content index 135 for a new packet buffer context 131. For all subsequent cells of as packet, TCAM table lookups for existing logic keys provide content indices of the already created packet buffer contexts 131.
Generally, the logic key serves as a way to lookup can index in the TCAM table for an incoming cell 130. The lookup logic finds context index of reassembly context (i.e., packet buffer context 131) for each incoming cell based on context of that cell.
Each cell carries a sequence number which identifies its sequence in the packet. The sequence number is an offset into the associated packet buffer context 131 where the cell is stored. The sequence number is not part of the logic key.
A logic key 132 is used as input to a TCAM lookup logic 134 for the TCAM table 133. For a given logic key 132, the TCAM lookup logic looks up a content index 135 in the TCAM table, wherein the content index is an index into the buffer 107 where a packet buffer context 131 for an incoming cell resides. As such, the content index 135 are offsets into the buffer 107 for the packet buffer contexts 131 of incoming cells (e.g., Cell 0, . . . , Cell N).
As successive cells arrive, logic keys are created using tuples. For example, as a cell arrives into egress, tuples are extracted from the cell header to create a logic key, and the logic key is used in the TCAM lookup table to lookup index of a packet buffer context 131 associated with the cell. Since this is a consecutive (or successive) cell (not a SOP) of the packet, the TCAM logic 134 uses the logic key to look into TCAM table for a context index 135 to the packet buffer context 131 associated with the cell. The found content index provides an offset to the buffer 107 where a packet buffer context 131 for the incoming cells for the packet are stored.
Once a context index 135 for a corresponding packet buffer context 131 of an incoming cell is found, the cell sequence number is used to find the offset for that cell in the packet buffer context 131 in the reassembly buffer 107, and to store the cell in that offset in the packet buffer context 131. As such, the sequence number of the cells is an offset into the packet buffer context 131 associated with the cell.
Storing the cell includes linking the cell into the corresponding packet context buffer 131 based on the index 135 into the reassembly buffer 107, using the sequence number of the cells act as offset into the context buffer 131. As such the cell header is removed, and the cell is linked into the packet context buffer 131 as the packet is reassembled. A count of the cells for each packet context buffer is maintained, wherein the entire packet is considered reassembled when the required cell count for the packet is reached. At this point egress processing for the assembled packet can begin. In the above lookup logic, the algorithm complexity for lookup into the TCAM is O(1).
Ingress processing (e.g., segmentation system 100S) creates cells from packets and adds redundancy check, such as CRC, to each cell before transport on switching fabric. A cell coming into egress processing (e.g., reassembly system 100R) is checked for errors, such as by checking encoding, before the cell is used for reassembly. If errors are detected, then error correction (e.g., forward error correction or backward error correction) corrects the errors in a cell before reassembly. TCAM lookup logic can also detect errors in an incoming cell in egress processing.
In a reassembly phase or egress device, process block 153A comprises maintaining a reassembly table in a content addressable memory, wherein the reassembly table includes one or more entries corresponding to one or more packets, and wherein each entry comprises a logic key for a corresponding packet and a content index into a reassembly buffer area for storing incoming member cells of that packet.
Process block 153B handles a SOP cell of a packet. In response to a receiving an incoming member cell of a packet that is a SOP cell or if the cell lookup key is not found in the reassembly table (i.e., a non-SOP cell if it arrives ahead of others, out of order) of a packet, process block 153B generates a new logic key using selected information from the SOP (or the received out of order non-SOP) cell header wherein the selected information is the same for all member cells of the packet, allocates an area of the reassembly buffer for storing member cells of the packet, and places a new entry into the reassembly table, wherein the new entry includes said new logic key and a new content index into the reassembly buffer area for storing incoming member cells of that packet. Block 153B also starts a reassembly timer for this context. The packet is reassembled using the stored member cells in the reassembly buffer area for the packet using cell offset number or sequence number from cell header. The cell offset number with respect to the packet is unique for each member cell. The cell offset number or sequence number is not included in the reassembly key formation. In one example, the switching fabric comprises a switched fabric in a distributed information technology environment.
Process block 154 comprises receiving a successive incoming member cell of a packet from a switching fabric wherein each member cell comprises a segment of the packet and a header. Process block 155 comprises generating a reassembly key using selected information from the incoming member cell header wherein the selected information is the same for all member cells of the packet. Process block 156 comprises checking a reassembly table in a content addressable memory to find an entry that includes a logic key matching the reassembly key. Process block 157 comprises using a content index in the found entry and a sequence number of the incoming member cell within the packet, to determine a location offset in a reassembly buffer area for storing the incoming member cell at said location offset in the reassembly buffer area for the packet for reassembly. Process block 158 comprises checking if a member cell count has been reached. If yes, process proceeds to block 159, otherwise the process proceeds to block 158A. Process block 159 comprises reassembling the stored member cells into a packet when a count is reached which indicates all member cells of the packet are present.
Decision block 158A checks if a reassembly timer timed out. If all the cells associated to a packet do not arrive within certain time period starting from receiving the first cell, then in process block 158B the logic declares the reassembly error and clears reassembly context 132, context index 135 and reassembly buffers 131. Otherwise the process proceeds to block 154 for next member cell of the packet.
Aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.”
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
In the context of this document, a “computer-readable medium” can be any means that can store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer readable medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, propagation medium, or other physical device or means that can contain or store a computer program for use by or in connection with a computer related system or method.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic or optical), a random access memory (RAM) (electronic), a read-only memory (ROM) (electronic), an erasable programmable read-only memory (EPROM, EEPROM, or Flash memory) (electronic), an optical fiber (optical), and a portable compact disc memory (CDROM, CD R/W) (optical). Note that the computer-readable medium could even be paper or another suitable medium, upon which the program is printed or punched (as in paper tape, punched cards, etc.), as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions, which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be emphasized that the above-described embodiments of the present invention, particularly, any “preferred” embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the invention.
Many variations and modifications may be made to the above-described embodiment(s) of the invention without departing substantially from the spirit and principles of the invention. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present invention and protected by the following claims.
Number | Date | Country | |
---|---|---|---|
Parent | 14554599 | Nov 2014 | US |
Child | 15639048 | US | |
Parent | 13619158 | Sep 2012 | US |
Child | 14554599 | US |