This invention relates in general to data packet processing at a network switching node, and more particularly, to techniques for facilitating packet processing by providing multiple types of forwarding tables at a network switching node and a selection mechanism for a selecting a particular forwarding table of the multiple types of tables based on an attribute associated with a received data packet.
Switches or switching nodes interconnect end nodes of a data communications (or transfer) network and forward data packets between the end nodes. Switches are transparent to the end nodes and generally are not directly addressed. Instead, packets are addressed to their ultimate destination in a network using a local destination address. For one class of switches, every destination port within a network of switches is configured with one or more unique local destination addresses to provide this functionality. From the point of view of a switch, a local destination address represents a path through the switch from one of its input ports to an output port. A switching node is conventionally configured with a single forwarding table. Individual packets are forwarded through a switch to an output port or output ports based on the packet's local destination address field and the switch's forwarding table.
Applicants recognize herein that a reduction in the size of memory required for a switching node's forwarding table is possible if forwarding tables of different types are provided and used to map received data packets addressed to downstream nodes and upstream nodes to appropriate output ports of the switching node.
Thus, the shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method of packet processing for a node of a data transfer network wherein the node has a plurality of types of forwarding tables. The method includes receiving a data packet at the node and selecting a forwarding table from the multiple types of forwarding tables based on an attribute associated with the received data packet. The forwarding table selected is then employed by the node to map the received data packet to an output port of the node.
Further aspects of the method of the present invention include configuring a node of a data transfer network by providing a plurality of types of forwarding tables, selection logic for selecting one of the provided types of forwarding tables for a data packet received by the node, and mapping logic for mapping a received data packet to an output port of the node. The mapping logic utilizes the selected forwarding table in mapping the received data packet to an output port of the node.
Systems and computer program products corresponding to the above-summarized methods are also described and claimed herein.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention.
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:
Generally stated, provided herein is a packet processing technique for a node of a data transfer network. Pursuant to the technique, the node is provided with a plurality of types of forwarding tables. The technique includes receiving a data packet at the node and selecting a forwarding table from the multiple types of forwarding tables based on an attribute associated with the received data packet. The received data packet is then mapped to an output port of the node using the selected forwarding table.
One embodiment of packet processing logic for a node of a data transfer network, in accordance with one or more aspects of the present invention, is illustrated in
As illustrated in
The output of forwarding table decoder logic 20 (LFT_DECODE) is used as a selection control signal to a multiplexer 28 to select either the output of linear forwarding table 24 or the output of random forwarding table 26 for use in mapping the received data packet to an output port.
In this embodiment, when the value of an attribute of the received packet falls within the portion of an attribute-value space defined by LFT_BASE and LFT_MASK, multiplexer 22 applies a transformation to the attribute of the received data packet. Parameter LFT_SHIFT is applied as a selection control input to multiplexer 22 to define the transformation. In this example, the transformation of the attribute value involves selecting only fourteen of the sixteen bits comprising the destination address. The parameter LFT_SHIFT determines whether bits 0 to 13, 1 to 14, or 2 to 15 are selected where the value of LFT_SHIFT equals 0, 1, or 2, respectively. The transformed attribute value output of multiplexer 22 is then used as an index to linear forwarding table 24 to determine the output to which to map the received data packet. Linear forwarding table 24 comprises a list of port indices addressed by the transformed attribute values in one example.
In this example, transforming the attribute value by ignoring two of the bits comprising the destination address of a packet has the effect of mapping four (22) destination addresses to the same the same linear forwarding table index. Advantageously, the transformation results in a reduction in the number of port indices that are required to be stored in the linear forwarding table by a factor of four.
When the value of the attribute of the received packet falls outside of the portion of the attribute-value space defined by LFT_BASE and LFT_MASK, random forwarding table 26 is selected for use in mapping the received data packet to an output port of the node. In one example, random forwarding table 26 comprises a list of destination addresses and their corresponding output port indices.
One embodiment of a packet processing technique for a node of a data transfer network in accordance with one or more aspects of the present invention is described below with reference to flowchart 40 of
If the data packet's destination address falls within the linear forwarding table address space, the processing proceeds along branch 42, where the destination address is transformed into a linear forwarding table index by selecting a subset of the bits comprising the destination address 44. The subset selected is controlled by the parameter LFT_SHIFT. That is, the transformation comprises shifting the destination address LFT_SHIFT bits to the right in a register so that the destination address is truncated by deleting the number of least significant bits specified by the parameter LFT_SHIFT.
The resulting linear forwarding table index is tested 45 to determine whether it corresponds to one of the destination addresses assigned to the linear forwarding table or to one of the destination addresses assigned to a default mapping rule. If the resulting linear forwarding table index corresponds to a destination address assigned to the linear forwarding table, branch 46 is taken, and the received packet is mapped 47 to the port that is addressed in the linear forwarding by the linear forwarding table index.
If the data packet's destination address does not fall within the linear forwarding table address space, then processing proceeds along branch 43 to determine whether the packet's destination address is assigned to the random forwarding table or to a default mapping rule. If the destination address is an entry in the random forwarding table, branch 49 is taken, and the received packet is mapped 50 to the port that is indicated by an entry in the random forwarding table associated with the destination address entry in the random forwarding table.
In one embodiment, one or more destination addresses can be represented in a random forwarding table by two parameters, RFT_BASE and RFT_MASK, and, consequently, each row of the random forwarding table comprises three entries—an RFT_BASE value, an RFT_MASK value, and a corresponding port index. Condition statement 48 determines whether a received packet's destination address matches one of the destination addresses represented by an RFT_BASE, RFT_MASK pair. As illustrated in
If branch 46 is not taken from inquiry 45, or branch 49 is not taken from inquiry 48, then the received data packet is mapped 51 to an output port according to a routing scheme other than the mapping defined by the linear forwarding table or the mapping defined by the random forwarding table. In one example, the processing of statement 51 could comprise mapping the received data packet to a default port. In another example, the received data packet could simply be discarded.
In another embodiment, the random forwarding table could be replaced by a content addressable memory (CAM) forwarding table. The CAM forwarding table comprises two columns with each row comprising, for example, a destination address entry in one column and a corresponding port index in the other column. Condition statement 48 in this embodiment would comprise determining whether a packet's destination address matches one of the destination address entries in the CAM forwarding table.
In the example of
For purposes of comparison, Table 2 shown below presents exemplary linear forwarding tables for 4-port switch SW161, 4-port switch SW265 and 4-port switch SW367 for network environment 60 for an example in which the switches have only linear forwarding tables. Table 3 shown below presents exemplary random forwarding tables for 4-port switch SW161, 4-port switch SW265 and 4-port switch SW367 for network environment 60 for an example in which the switches have only random forwarding tables. From a comparison of the sizes of the linear forwarding tables presented in Tables 1 and 2, it is apparent that use of a technique of packet processing in accordance with the present invention facilitates a reduction in the size of the linear forwarding table required in switching nodes at each level of network environment 60. Similarly, it is apparent that use of this technique also facilitates a reduction in the size of the random forwarding table required in switching nodes at each level of network environment 60 from a comparison of the sizes of the random forwarding tables presented in Tables 1 and 3. Although a packet processing technique utilizing both linear and random forwarding tables requires two forwarding tables, the total memory required is less than if only one type of forwarding table is provided in the switching node.
An example of a data transfer network switching environment wherein the technique of the present invention may be advantageously utilized is a switching node that is an enhancement of the Infiniband™ architecture standard. In this environment, a packet processing technique and system in accordance with the present invention can be utilized to extend a switching node's unicast routing capabilities by dynamically using both linear and random forwarding tables to map received data packets to the switching node's output ports. Unicast routing maps a received data packet to one output port of a switching node. The Infiniband™ specification requires unicast routing when the destination address of the data packet is greater than 0 and less than 0xC000.
The present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has therein, for instance, computer readable program code means or logic (e.g., instructions, code, commands, etc.) to provide and facilitate the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately.
Additionally, at least one program storage device readable by a machine embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided.
The flow diagrams depicted herein are just examples. There may be many variations to these diagrams or the steps (or operations) described therein without departing from the spirit of the invention. For instance, the steps may be performed in a differing order, or steps may be added, deleted or modified. All of these variations are considered a part of the claimed invention.
Although preferred embodiments have been depicted and described in detail herein, it will be apparent to those skilled in the relevant art that various modifications, additions, substitutions and the like can be made without departing from the spirit of the invention and these are therefore considered to be within the scope of the invention as defined in the following claims.
This application is a continuation of co-pending U.S. patent application Ser. No. 10/737,989, filed Dec. 17, 2003, and published Jul. 7, 2005 as U.S. Patent Publication No. US/2005-0149600 A1, entitled “Method, System and Program Product for Facilitating Forwarding of Data Packets Through a Node of a Data Transfer Network Using Multiple Types of Forwarding Tables”, by Herring et al., the entirety of which is hereby incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 10737989 | Dec 2003 | US |
Child | 11766475 | Jun 2007 | US |