Packet forwarding system and method

By using multi-level switch structure, ECMP, and adaptive routing algorithms in high-performance computing clusters to select the optimal path, the network congestion problem caused by the Dragonfly network topology is solved and the message transmission efficiency and cluster performance are improved.

WO2024198774A1PCT designated stage expired Publication Date: 2024-10-03HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/077830
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-06
Filing Date
2024-02-20
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

The Dragonfly network topology can easily cause network congestion and affect the overall performance of high-performance computing clusters.

Method used

It adopts a multi-level switch structure, including first-level switches and second-level switches, and uses the ECMP algorithm and adaptive routing algorithm to select the optimal path in the routing table for message transmission, reducing the probability of network congestion.

Benefits of technology

It effectively reduces the probability of network congestion, improves the efficiency and reliability of message transmission, and ensures the overall performance of high-performance computing clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077830_03102024_PF_FP_ABST
    Figure CN2024077830_03102024_PF_FP_ABST
Patent Text Reader

Abstract

A packet forwarding system and a method. The packet forwarding system in the present application comprises a plurality of first subsystems and at least one second subsystem, wherein each first subsystem comprises a plurality of first-level switches and at least one second-level switch, the plurality of first-level switches are connected to one another, each first-level switch is connected to some or all of the at least one second-level switch, and each second-level switch is connected to some or all of the at least one second subsystem. Each first-level switch sends, to first-level switches or second-level switches that are connected to the first-level switch, packets of computing devices connected to the first-level switch, and sends received packets to the computing devices; and each second-level switch receives packets from first-level switches or second subsystems that are connected to the second-level switch, and sends received packets to the first-level switches or second subsystems that are connected to the second-level switch. Each second subsystem performs packet forwarding between first subsystems. In such a packet forwarding system, there are a plurality of different packet transmission paths, such that network congestion can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Message forwarding system and method

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 31, 2023, with application number 202310384114.X and application name “A self-adaptive routing method”, the entire contents of which are incorporated by reference into this application; this application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 6, 2023, with application number 202310666191.4 and application name “A message forwarding system and method”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a message forwarding system and method. Background Art

[0004] High-performance computing (HPC) clusters connect multiple computing devices using network topology. In this network topology, if a large number of paths exist between any two computing devices, efficient message transmission between them is guaranteed. Conversely, if there are few or long paths between two computing devices, efficient message transmission between them may be impossible. Therefore, network topology is a key factor affecting the overall performance of HPC.

[0005] HPC clusters often use the Dragonfly topology, which consists of multiple groups of switches. Each group includes multiple adjacent switches, and the switches in each group are fully connected. Any two groups of switches are fully connected, with at least one link between them.

[0006] The Dragonfly topology connection method is simple, but it is a network topology that easily causes network congestion, restricting the overall performance of the HPC cluster.

[0007] Summary of the Invention

[0008] The present application provides a message forwarding system and method for reducing the probability of network congestion in a network topology.

[0009] In a first aspect, an embodiment of the present application provides a message forwarding system, which includes multiple first subsystems and at least one second subsystem. The first subsystem includes multiple first-level switches and at least one second-level switch. The multiple first-level switches are interconnected, each first-level switch is connected to part or all of at least one second-level switch, and each second-level switch is connected to part or all of at least one second subsystem.

[0010] In the first-level subsystem:

[0011] A primary switch can connect to a computing device, and the primary switch can send messages from the computing device to the connected primary switch or secondary switch. The primary switch can also send received messages to the computing device;

[0012] The secondary switch can receive messages from the connected primary switch or the second subsystem, and can also send received messages to the connected primary switch or the second subsystem.

[0013] The second subsystem is connected to at least two first subsystems. The second subsystem can receive messages from the first subsystems and can also send messages to the first subsystems.

[0014] Through the above system, in the first subsystem, any two first-level switches are connected, enabling direct message forwarding between the switches. For two first-level switches from different first subsystems, message transmission can proceed through a transmission path involving a second-level switch in one first subsystem, the second subsystem, and a second-level switch in another first subsystem. Message transmission can also proceed through other first-level switches in the same first subsystem. That is, the message transmission path can include not only a second-level switch in one first subsystem, the second subsystem, and a second-level switch in another first subsystem, but also other first-level switches in the two first subsystems. In this message forwarding system, multiple different message transmission paths exist, providing multiple optional paths for message forwarding, effectively reducing network congestion.

[0015] In one possible implementation, for any first-level switch, the routing table of the first-level switch indicates the path from the first-level switch to a computing device connected to any first-level switch in the message forwarding system. When the first-level switch sends or receives a message, if the first-level switch can query the routing table of the first-level switch based on the destination address carried in the message from the computing device to determine multiple paths to the destination address, where the destination address is the address of the computing device, and then selects a first target path from the multiple determined paths based on an ECMP algorithm and / or an adaptive routing algorithm, the first-level switch forwards the message based on the first target path. If the first-level switch can query the routing table of the first-level switch based on the destination address carried in the message from the computing device to determine a path to the destination address, then the path is the first target path, and the first-level switch forwards the message based on the first target path.

[0016] Through the above system, the first-level switch can implement path selection by looking up the routing table and using the ECMP algorithm and / or adaptive routing algorithm. The ECMP algorithm and the adaptive routing algorithm are suitable for systems with more complex network topologies. They can ensure that the best path is selected so that the message can be transmitted efficiently.

[0017] In a possible implementation, the routing table of the secondary switch indicates a path from the secondary switch to a computing device connected to any primary switch of the message forwarding system.

[0018] When the secondary switch sends a message, if the secondary switch queries its routing table based on the destination address carried in the received message to determine multiple paths to the destination address, where the destination address is the address of the computing device, the secondary switch selects a second destination path from the multiple determined paths based on an ECMP algorithm and / or an adaptive routing algorithm, and the secondary switch forwards the message based on the second destination path. If the secondary switch queries its routing table based on the destination address carried in the received message to determine a path to the destination address, then the path is the second destination path, and the secondary switch forwards the message based on the second destination path.

[0019] Through the above system, the secondary switch can implement path selection by looking up the routing table, as well as the ECMP algorithm and / or the adaptive routing algorithm. The secondary switch can select the most suitable transmission path for the message through the two routing algorithms, the ECMP algorithm and the adaptive routing algorithm, so that the message can be quickly transmitted to the destination address.

[0020] In one possible implementation, the routing table of the first-level switch includes a first routing table and a second routing table. The first routing table indicates a first path from the first-level switch to a computing device connected to any first-level switch, where the next hop of the first-level switch in the first path is a second-level switch. The second routing table indicates a second path from the first-level switch to a computing device connected to any first-level switch, where the next hop of the first-level switch in the second path is a first-level switch in a first subsystem to which the first-level switch belongs.

[0021] With the above system, the routing tables of the first-level switches can include two types of routing tables: a first routing table that enables packets to be transmitted upwards before being transmitted downwards. A second routing table that enables packets to be transmitted between first-level switches. The routing tables of the first-level switches cover a wide range of possible paths, ensuring that the first-level switches can select the optimal path for packet transmission.

[0022] In one possible implementation, when sending a message, the first-level switch may query only the first routing table or the second routing table, or may query both the first routing table and the second routing table. Hereinafter, a method for the first-level switch to query both the first routing table and the second routing table for message transmission is described. The first-level switch may utilize an ECMP algorithm to determine a first path to the computing device indicated by the destination address from the first routing table; the first-level switch may determine a second path to the computing device indicated by the destination address from the second routing table; and the first-level switch may select a first target path from the determined first and second paths using an adaptive routing algorithm.

[0023] Through the above system, the first-level switch queries the first routing table and the second routing table, and combines the ECMP algorithm and the adaptive routing algorithm to finally select the first target path suitable for the current network status of the system, ensuring that the message can reach the destination address smoothly.

[0024] In one possible implementation, if the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in different first subsystems, the first target path is the determined first path; if the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in the same first subsystem, the first target path is the determined second path.

[0025] Through the above system, when the computing device indicated by the destination address is connected to a different primary switch, the first target path is also different. The first target path can be the shortest path for message forwarding, so that the message can be quickly forwarded to the destination address.

[0026] In one possible implementation, the routing table of the secondary switch includes a third routing table and a fourth routing table. The third routing table indicates a third path from the secondary switch to a computing device connected to any primary switch. The next hop of the secondary switch in the third path is the primary switch or the second subsystem (a switch in the second subsystem). The fourth routing table indicates a fourth path from the secondary switch to computing devices connected to some primary switches. The next hop of the secondary switch in the fourth path is a primary switch in the first subsystem to which the secondary switch belongs. The third path from the secondary switch to the same computing device and the next hop of the secondary switch in any fourth path are different.

[0027] With the above system, the routing table of the secondary switch can include two types of routing tables. The third routing table can be used to transmit packets in either an upward or downward direction. The fourth routing table supplements the third routing table. The routing table of the secondary switch covers a variety of possible paths, ensuring that the secondary switch can select the optimal path for packet transmission.

[0028] In one possible implementation, when sending a message, the secondary switch may query only the third routing table or the fourth routing table, or may query both the third routing table and the fourth routing table. Herein, a method for the secondary switch to query both the third routing table and the fourth routing table for message transmission is described. The secondary switch may utilize an ECMP algorithm to determine a third path to the computing device indicated by the destination address from the third routing table; determine a fourth path to the computing device indicated by the destination address from the fourth routing table; and then, using an adaptive routing algorithm, select a second target path from the determined third and fourth paths.

[0029] Through the above system, the secondary switch selects multiple paths for packets, which are applicable to different scenarios.

[0030] In one possible implementation, if the primary switch and the secondary switch to which the computing device indicated by the destination address is connected are located in different first subsystems, the second target path is the determined third path; if the primary switch and the secondary switch to which the computing device indicated by the destination address is connected are located in the same first subsystem, the second target path is the determined fourth path.

[0031] Through the above system, when the computing device indicated by the destination address is connected to a different primary switch, the second target path is also different. The second target path can be the shortest path for message forwarding, ensuring that the message can be efficiently transmitted in the system.

[0032] In one possible implementation, a link connecting two primary switches includes multiple virtual channels, a link connecting a primary switch and a secondary switch includes multiple virtual channels, and a link connecting at least one second subsystem of a secondary switch includes multiple virtual channels.

[0033] In any first subsystem, the first-level switch and the second-level switch select a virtual channel to transmit messages according to a first channel selection strategy; between the first subsystem and the second subsystem, the second-level switch and the second subsystem select a virtual channel to transmit messages according to a second channel selection strategy, wherein the first channel selection strategy and the second channel selection strategy are different.

[0034] Through the above system, multiple virtual channels are set up in the links between switches, and the methods of selecting virtual channels inside the first subsystem and outside the first subsystem are different, ensuring that messages can be transmitted in parallel on the multiple virtual channels, reducing the probability of congestion in the network topology.

[0035] In one possible implementation, the second subsystem includes at least one switch. The switch's routing table indicates the path from the switch to any computing device connected to the first-level switch. When the switch sends a message, if the switch queries the switch's routing table based on the destination address carried in the received message to determine multiple paths to the destination address, where the destination address is the address of the computing device, then the switch selects a third destination path from the multiple determined paths based on an ECMP algorithm, and forwards the message based on the third destination path. If the switch queries the switch's routing table based on the destination address carried in the received message to determine a path to the destination address, then the path is the third destination path, and the switch forwards the message based on the third destination path.

[0036] Through the above system, the switch queries the routing table and combines the ECMP algorithm to finally select the third target path, ensuring that the message can reach the destination address smoothly.

[0037] In a second aspect, the present application further provides a message forwarding method, which can be implemented by the aforementioned message forwarding system. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The structure of the message forwarding system can be found in the aforementioned description and will not be repeated here. In this method:

[0038] For any first-level switch, the first-level switch can send messages of the connected computing device to the connected first-level switch or second-level switch, and send received messages to the computing device.

[0039] The secondary switch receives messages from the connected primary switch or the second subsystem, and sends the received messages to the connected primary switch or the second subsystem.

[0040] The second subsystem receives messages from the first subsystem and sends messages to the first subsystem.

[0041] In one possible implementation, a routing table of a first-level switch indicates a path from the first-level switch to a computing device connected to any first-level switch in the message forwarding system. When the first-level switch sends a message, it queries the routing table of the first-level switch based on the destination address carried in the message from the computing device to determine multiple paths to the destination address, where the destination address is the address of the computing device. The first-level switch selects a first target path from the multiple determined paths based on an ECMP algorithm and / or an adaptive routing algorithm, and forwards the message according to the first target path.

[0042] In one possible implementation, a routing table of a secondary switch indicates a path from the secondary switch to a computing device connected to any primary switch in a message forwarding system. When the secondary switch sends a message, the secondary switch queries the routing table of the secondary switch based on a destination address carried in the received message to determine multiple paths to the destination address, where the destination address is the address of the computing device. The secondary switch selects a second target path from the multiple determined paths based on an ECMP algorithm and / or an adaptive routing algorithm. The secondary switch then forwards the message based on the second target path.

[0043] In one possible implementation, the routing table of the first-level switch includes a first routing table and a second routing table. The first routing table indicates a first path from the first-level switch to a computing device connected to any first-level switch, where the next hop of the first-level switch in the first path is a second-level switch. The second routing table indicates a second path from the first-level switch to a computing device connected to any first-level switch, where the next hop of the first-level switch in the second path is a first-level switch in a first subsystem to which the first-level switch belongs.

[0044] In one possible implementation, when a first-level switch sends a message, it calls an ECMP algorithm to determine a first path to a computing device indicated by a destination address from a first routing table; the first-level switch determines a second path to the computing device indicated by the destination address from a second routing table; and the first-level switch selects a first target path from the determined first and second paths according to an adaptive routing algorithm.

[0045] In one possible implementation, if the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in different first subsystems, the first target path is the determined first path; if the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in the same first subsystem, the first target path is the determined second path.

[0046] In one possible implementation, the routing table of the secondary switch includes a third routing table and a fourth routing table. The third routing table indicates a third path from the secondary switch to a computing device connected to any primary switch. The next hop of the secondary switch in the third path is the primary switch or the second subsystem. The fourth routing table indicates a fourth path from the secondary switch to computing devices connected to some primary switches. The next hop of the secondary switch in the fourth path is a primary switch in the first subsystem to which the secondary switch belongs. The next hop of the secondary switch in the third and fourth paths from the secondary switch to the same computing device is different.

[0047] In one possible implementation, when the secondary switch sends a message, it may call an ECMP algorithm to determine a third path to the computing device indicated by the destination address from a third routing table; the secondary switch may determine a fourth path to the computing device indicated by the destination address from a fourth routing table; and the secondary switch may select a second target path from the determined third and fourth paths according to an adaptive routing algorithm.

[0048] In one possible implementation, if the primary switch and the secondary switch to which the computing device indicated by the destination address is connected are located in different first subsystems, the second target path is the determined third path; if the primary switch and the secondary switch to which the computing device indicated by the destination address is connected are located in the same first subsystem, the second target path is the determined fourth path.

[0049] In one possible implementation, a link connecting two first-level switches includes multiple virtual channels, a link connecting a first-level switch and a second-level switch includes multiple virtual channels, and a link connecting at least one second subsystem of a second-level switch includes multiple virtual channels. Within any first subsystem, the first-level switch and the second-level switch select virtual channels for message transmission according to a first channel selection policy. Between the first subsystem and the second subsystem, the second-level switch and the second subsystem select virtual channels for message transmission according to a second channel selection policy, wherein the first channel selection policy and the second channel selection policy are different.

[0050] In one possible implementation, the second subsystem includes at least one switch. The switch's routing table indicates a path from the switch to a computing device connected to any first-level switch. The second-level switch receives packets from the connected first-level switch or the second subsystem. The switch can send the received packet to the connected first-level switch or the second subsystem. When sending the packet, the switch queries the switch's routing table based on the destination address carried in the received packet to determine multiple paths to the destination address, where the destination address is the address of the computing device. The switch selects a third destination path from the determined multiple paths based on an ECMP algorithm. The switch then forwards the packet along the third destination path.

[0051] In a third aspect, embodiments of the present application further provide a switching device, which may be the primary switch, the secondary switch, or the switch in the second subsystem mentioned in the first aspect. The beneficial effects can be found in the description of the first aspect and are not further elaborated here. The switching device includes a processor. The aforementioned processor types are merely examples, and this application does not limit the specific type of processor included in the switching device. Optionally, the switching device further includes a power supply circuit and a memory. The power supply circuit is used to power the processor.

[0052] The processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0053] In one possible implementation, the processor has the function of implementing the behavior of the primary switch, the second switch, or the switch in the second subsystem in the method examples in the first aspect and various possible implementations of the first aspect. The beneficial effects can be found in the description of the first aspect and are not further described here. The processor may be a central processing unit (CPU) or other specific integrated circuit.

[0054] In another possible implementation, a memory stores computer program instructions, and a processor is coupled to the memory. The processor may call the computer executable instructions stored in the memory to execute the method executed by the primary switch, the second switch, or the switch in the second subsystem in the first aspect and each possible implementation of the first aspect.

[0055] In a fourth aspect, the present application also provides a switching device, which has the function of implementing the behavior of the first-level switch, the second switch or the switch in the second subsystem in the method example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more units corresponding to the above functions. In one possible design, the structure of the device includes a forwarding module (for receiving or sending messages), and a routing module (for determining the transmission path of the message). These modules can perform the corresponding functions of the first-level switch, the second switch or the switch in the second subsystem in the method example of the first aspect above. For details, please refer to the detailed description in the method example, which will not be repeated here.

[0056] In a fifth aspect, the present application also provides a computer-readable storage medium, wherein instructions are stored in the switch-readable storage medium. When the instructions are executed on the switch, the switch executes the method executed by the first-level switch, the second switch, or the switch in the second subsystem in the above-mentioned first aspect and each possible implementation of the first aspect.

[0057] In a sixth aspect, the present application further provides a computer program product comprising instructions, which, when executed on a switch, enables the switch to execute the method in the above-mentioned first aspect and various possible implementations of the first aspect.

[0058] In a seventh aspect, the present application also provides a computer chip, which is connected to a memory, and the chip is used to read and execute a software program stored in the memory, and execute the method executed by the first-level switch, the second switch, or the switch in the second subsystem in the above-mentioned first aspect and each possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] FIG1 is a schematic diagram of the architecture of a message forwarding system provided by the present application;

[0060] FIG2 is a schematic structural diagram of a message forwarding system provided by the present application;

[0061] 3A-3B are schematic structural diagrams of a first subsystem provided by this application;

[0062] FIG4 is a schematic diagram of a routing table of a primary switch provided by the present application;

[0063] FIG5 is a schematic diagram of a routing table of a secondary switch provided by the present application;

[0064] FIG6 is a schematic structural diagram of a second subsystem provided by the present application;

[0065] FIG7 is a schematic diagram of a message forwarding method provided by the present application;

[0066] FIG8 is a schematic structural diagram of a switching device provided by the present application;

[0067] FIG9 is a schematic structural diagram of a switching device provided in this application. DETAILED DESCRIPTION

[0068] Before describing a message forwarding system and method provided in an embodiment of the present application, two routing algorithms involved in an embodiment of the present application are described.

[0069] (1) Equal-Cost Multi-path Routing (ECMP) algorithm.

[0070] ECMP means that when there are multiple paths with equal costs to a destination address, multiple packets sent to that destination address can be shared across these multiple paths to achieve load balancing. When one path fails, it can be switched to a non-faulty path, achieving rapid path switching. There are many different path selection strategies in the ECMP algorithm. For example, a path can be selected by hashing the source address of the message, or by polling and transmitting packets among the multiple paths. In another example, paths are allocated based on their weights, with paths with higher weights receiving more packets. Path weights can be preset values.

[0071] (2) Adaptive routing (AR) algorithm.

[0072] Adaptive routing algorithms monitor the network status of the switch and its system in real time and dynamically adjust the switch's path selection strategy to better utilize the network status of the system in which the switch resides. In adaptive routing algorithms, the switch analyzes the routing table, the network topology of the system in which the switch resides, and the links in the system. It calculates path quality and available link bandwidth to select the optimal path.

[0073] As shown in FIG1 , an embodiment of the present application provides a message forwarding system. The message forwarding system 10 includes two subsystems, which, for ease of description, are referred to as a first subsystem 100 and a second subsystem 200. The message forwarding system 10 includes multiple first subsystems 100 and at least one second subsystem 200. Each first subsystem 100 can be connected to all or only some of the second subsystems 200.

[0074] For any first subsystem 100, in addition to being connected to the second subsystem 200, the first subsystem 100 can also be connected to a computing device. The first subsystem 100 can receive messages from the computing device or send messages to the computing device. This application does not limit the number of computing devices that the first subsystem 100 can connect to.

[0075] For any second subsystem 200, the second subsystem 200 is connected to at least two first subsystems 100 and can forward messages between the at least two first subsystems 100. In other words, the second subsystem 200 can forward messages received from one connected first subsystem 100 to another connected first subsystem 100. The second subsystem 200 is the connecting "hub" of the at least two first subsystems 100.

[0076] The internal structures of the first subsystem 100 and the second subsystem 200 are described below.

[0077] (1) The first subsystem 100.

[0078] As shown in Figure 2, a structural diagram of a first subsystem 100 provided in an embodiment of the present application is provided. The first subsystem 100 includes multiple switches. Based on the positions of the multiple switches in the first subsystem 100, the multiple switches include two types of switches. For the convenience of explanation, the two types of switches are respectively referred to as a primary switch 110 and a secondary switch 120.

[0079] The first subsystem 100 includes multiple first-level switches 110 and at least one second-level switch 120. Each first-level switch 110 can be connected to all or some of the second-level switches 120. The first-level switches 110 can be fully connected, that is, the first-level switches 110 are connected to each other, and each first-level switch 110 is connected to the first-level switches 110 in the first subsystem 100 except for the first-level switch 110 itself.

[0080] For any primary switch 110, in addition to being connected to the secondary switch 120, the primary switch 110 can also be connected to a computing device. This application does not limit the number of computing devices connected to the primary system. The number of computing devices that the first subsystem 100 can connect to is related to the data and performance of the primary switch 110. Functionally, the primary switch 110 can receive messages from computing devices, and can also receive messages from the connected secondary switch 120 or the connected primary switch 110; the primary switch 110 can transmit the received messages to the connected computing device, the connected secondary switch 120, or the connected primary switch 110.

[0081] For any secondary switch 120, in addition to being connected to the primary switch 110, the secondary switch 120 can also be connected to the second subsystem 200 (the switch 210 in the second subsystem 200). For a second subsystem 200 connected to a secondary switch 120, the secondary switch 120 can be connected to one or more switches 210 in the second subsystem 200.

[0082] Functionally, the secondary switch 120 can receive packets from the connected primary switch 110 and can also receive packets from the connected second subsystem 200. The secondary switch 120 can transmit the received packets to the connected primary switch 110 or the connected second subsystem 200. For any secondary switch 120, the embodiments of the present application do not limit the number of primary switches 110 or the number of second subsystems 200 to which the secondary switch 120 is connected. The secondary switch 120 can be connected to only some of the primary switches 110 in the first subsystem 100, or to all of the primary switches 110 in the first subsystem 100. The secondary switch 120 can be connected to only some of the second subsystems 200 in the message forwarding system 10, or to all of the second subsystems 200 in the message forwarding system 10.

[0083] FIG3A is a schematic diagram of the structure of a first subsystem 100 according to an embodiment of the present application. The first subsystem 100 includes three primary switches 110 and two secondary switches 120. The three primary switches 110 are interconnected. Each primary switch 110 is connected to each secondary switch 120. Each secondary switch 120 is connected to each second subsystem 200.

[0084] FIG3B is a schematic diagram of the structure of a first subsystem 100 according to an embodiment of the present application. The first subsystem 100 includes three primary switches 110 and two secondary switches 120. The three primary switches 110 are interconnected. Each primary switch 110 is connected to each secondary switch 120. Each secondary switch 120 is connected to a second subsystem 200, with each secondary switch 120 connected to a different second subsystem 200.

[0085] Both the primary switch 110 and the secondary switch 120 have a message forwarding function. The following describes how the primary switch 110 and the secondary switch 120 implement message forwarding.

[0086] 1) Level 1 switch 110.

[0087] The following description uses a level 1 switch 110 as an example. The level 1 switch 110 stores a routing table, which indicates a path from the level 1 switch 110 to a computing device connected to any level 1 switch 110 in the message forwarding system 10 .

[0088] The first-level switch 110 can select a transmission path for the message according to the routing table of the first-level switch 110 to ensure that the message can reach the computing device indicated by the destination address in the message.

[0089] The routing table of the first-level switch 110 can be abstracted into the table format shown in FIG4 . Each row of the table is an entry, and each entry represents a path. The table records the destination address of the path and the next hop of the first-level switch 110 in the path. The next hop of the first-level switch 110 refers to the next device that receives the packet after the packet passes through the first-level switch 110 in the path. The device is a device connected to the first-level switch 110, such as a computing device connected to the first-level switch 110, a connected first-level switch 110, or a connected second-level switch 120. The next hop can be represented by the port number of the first-level switch 110 and / or the address of the next hop (i.e., the address of the device connected to the first-level switch 110). The port number of the first-level switch 110 identifies the port on the path to which the next hop of the first-level switch 110 is connected to the first-level switch 110. The address of the next hop refers to the address of the device connected to the first-level switch 110.

[0090] The addresses involved in the embodiments of the present application (such as the next-hop address of the primary switch 110 or the secondary switch 120, the next-hop address of the switch in the second subsystem 200, and the destination address in the message, etc.) can be Internet Protocol (IP) addresses or Media Access Control (MAC) addresses.

[0091] For the destination address of a message, there are one or more paths in the routing table of the first-level switch 110. When there is a path, the first-level switch 110 can directly forward the message along the path and transmit the message to the next hop of the first-level switch 110 in the path.

[0092] When multiple paths exist, the first-level switch 110 may select one path from the multiple paths as the first target path, forward the packet according to the first target path, and transmit the packet to the next hop of the first-level switch 110 in the first target path. The embodiments of the present application do not limit the manner in which the first-level switch 110 selects the first target path from the multiple paths. For example, the first-level switch 110 may select the first target path from the multiple paths based on an ECMP algorithm or an adaptive routing algorithm. For another example, the first-level switch 110 may select the first target path from the multiple paths based on both an ECMP algorithm and an adaptive routing algorithm.

[0093] The routing table of the first-level switch 110 may include two routing tables. For the convenience of description, the two routing tables are respectively referred to as a first routing table and a second routing table.

[0094] The first routing table indicates a first path from the first-level switch 110 to a computing device connected to any first-level switch 110 in the message forwarding system 10. This first path refers to the path that packets follow when packets are transmitted "upward" and then "downward." "Upward" refers to the direction toward switches above the first-level switch 110, which are the second-level switches 120 or switches in the second subsystem 200. Accordingly, after a packet reaches a switch above the first-level switch 110, the "downward" direction refers to the direction toward switches below it, which are the first-level switches 110. Therefore, the next hop of the first-level switch 110 in the first path is the second-level switch 120 to which the first-level switch 110 is connected.

[0095] The second routing table indicates a second path from the first-level switch 110 to a computing device connected to any first-level switch 110 in the message forwarding system 10. This second path, different from the first path, allows direct message transmission between first-level switches 110. Therefore, the next hop of the first-level switch 110 in this second path is a first-level switch 110 in the first subsystem 100 to which the first-level switch 110 belongs.

[0096] For a destination address of a message, there are one or more first paths in the first routing table, and there are one or more second paths in the second routing table.

[0097] The first-level switch 110 may select one first path or one second path from the one or more first paths and the one or more second paths as the first target path. The embodiment of the present application does not limit the manner in which the first-level switch 110 selects the first target path from the one or more first paths and the one or more second paths.

[0098] For example, the first-level switch 110 may invoke an ECMP algorithm to determine one or more first paths from a first routing table to a computing device indicated by a destination address; determine one or more second paths from a second routing table to the computing device indicated by the destination address; and the first-level switch 110 may select a first target path from the determined first and second paths based on the adaptive routing algorithm. For another example, the first-level switch 110 may determine one or more first paths from a first routing table to a computing device indicated by a destination address; determine one or more second paths from a second routing table to the computing device indicated by the destination address; and the first-level switch 110 may select a first target path from the determined first and second paths based on the adaptive routing algorithm.

[0099] When the computing device indicated by the destination address of the message is a computing device connected to the first-level switch 110 in the first subsystem 100 to which the first-level switch 110 belongs, then the path for directly transmitting the message between the first-level switches 110 is the shortest, that is, the second path is the shortest path. The first path will take a detour relative to the second path, that is, it needs to be transferred by a second-level switch 120 other than the first-level switch 110 connected to the computing device. In this case, when selecting the first target path, the first-level switch 110 can give priority to the second path as the first target path. If the second path is in a congested state, the first path can be used as the first target path. The embodiment of the present application does not limit the method by which the first-level switch 110 determines whether the first path or the second path is in a congested state. Taking the first path as an example, the first-level switch 110 can monitor the messages transmitted on the first path. When the number of messages being transmitted on the first path exceeds the set maximum message threshold, the first path is considered to be in a congested state. Otherwise, the first path is considered to be not in a congested state. The first-level switch 110 may set a non-zero credit value for the first path. Each time a packet transmission begins, the credit value is decremented by one, and each time a packet transmission is completed, the credit value is incremented by one. When the credit value of the first path falls below a set minimum threshold, the first path is considered to be congested; otherwise, the first path is considered to be uncongested. The above methods are examples; any method capable of determining whether the first path or the second path is congested is applicable to the embodiments of the present application.

[0100] When the computing device indicated by the destination address of the message is not a computing device connected to the first-level switch 110 in the first subsystem 100 to which the first-level switch 110 belongs, that is, the computing device indicated by the destination address of the message is a computing device connected to a first-level switch 110 outside the first subsystem 100 to which the first-level switch 110 belongs, then the first path is the shortest path. In this case, when selecting the first target path, if the first path is not congested, the first path may be prioritized as the first target path. If the first path is congested and the second path is not congested, the first-level switch 110 may prioritize the second path as the first target path when selecting the first target path. If the first path is congested and the second path is congested, the first-level switch 110 may prioritize the first path as the first target path when selecting the first target path.

[0101] 2) Secondary switch 120.

[0102] The following description uses a secondary switch 120 as an example. The secondary switch 120 stores a routing table, which indicates a path from the secondary switch 120 to a computing device connected to any primary switch 110 of the message forwarding system 10 .

[0103] The secondary switch 120 can select a transmission path for the message according to the routing table of the secondary switch 120 to ensure that the message can reach the computing device indicated by the destination address in the message.

[0104] The routing table of the secondary switch 120 can be abstracted into the table format shown in FIG5 . Each row of the table is an entry, and each entry represents a path. The entry records the destination address of the path and the next hop of the secondary switch 120 in the path. The next hop of the secondary switch 120 refers to the next device that receives the message after the message passes through the secondary switch 120 in the path. This device is the device connected to the secondary switch 120, such as the primary switch 110 to which the secondary switch 120 is connected, or the switch in the second subsystem 200 to which the secondary switch 120 is connected. The next hop can be represented by the port number of the secondary switch 120 and / or the address of the next hop (i.e., the address of the device to which the secondary switch 120 is connected). The port number of the secondary switch 120 identifies the port to which the next hop of the secondary switch 120 in the path is connected to the secondary switch 120. The address of the next hop refers to the address of the device to which the secondary switch 120 is connected.

[0105] For a destination address of a message, there are one or more paths in the routing table of the secondary switch 120. When there is a path, the secondary switch 120 can directly forward the message along the path and transmit the message to the next hop of the secondary switch 120 in the path.

[0106] When multiple paths exist, the secondary switch 120 may select one path from the multiple paths as the second target path, forward the packet according to the second target path, and transmit the packet to the next hop of the secondary switch 120 in the second target path. The embodiments of the present application do not limit the manner in which the secondary switch 120 selects the second target path from the multiple paths. For example, the secondary switch 120 may select the second target path from the multiple paths based on an ECMP algorithm or an adaptive routing algorithm. For another example, the secondary switch 120 may select the second target path from the multiple paths based on both an ECMP algorithm and an adaptive routing algorithm.

[0107] The routing table of the secondary switch 120 may include two routing tables. For the convenience of description, the two routing tables are respectively referred to as a third routing table and a fourth routing table.

[0108] The third routing table indicates a third path from the secondary switch 120 to a computing device connected to any primary switch 110 in the message forwarding system 10. This third path allows packets to be transmitted both "upward" and "downward." "Upward" refers to the switch above the secondary switch 120, which is the switch 210 in the second subsystem 200. Correspondingly, "downward" refers to the switch below the secondary switch, which is the primary switch 110. Whether a packet travels "upward" or "downward" depends on the packet's destination address. If the computing device indicated by the packet's destination address is located in a different first subsystem 100 than the secondary switch 120, the packet must be transmitted upward; otherwise, the packet must be transmitted downward. Therefore, the next hop of the secondary switch 120 in this third path is either the second subsystem 200 to which the secondary switch 120 is connected (for "upward" packet transmission) or the primary switch 110 (for "downward" packet transmission).

[0109] The fourth routing table indicates a fourth path from the secondary switch 120 to computing devices connected to some of the primary switches 110 in the message forwarding system 10. The fourth path allows packets to be transmitted "downward." Packets are allowed to be transmitted between primary switches 110 along the fourth path. The next hop of the secondary switch 120 in the fourth path is the primary switch 110 in the first subsystem 100 to which the secondary switch 120 belongs. For a computing device, the next hop of the secondary switch 120 in any third path from the secondary switch 120 to the computing device is different from the next hop of the secondary switch 120 in any fourth path from the secondary switch 120 to the computing device. In other words, the next hop of the secondary switch 120 in the third and fourth paths from the secondary switch 120 to the computing device is a different primary switch 110.

[0110] For example, a first subsystem 100 includes a first-level switch 110A, a first-level switch 110B, a first-level switch 110C, a first-level switch 110D, and a second-level switch 120. The routing table of the second-level switch 120 includes a third routing table and a fourth routing table. Assuming that the computing device indicated by the destination address of a packet is the computing device connected to the first-level switch 110A, then in the third routing table, the next hop of the second-level switch 120 recorded in the entry containing the destination address should be the first-level switch 110A. That is, the next hop of the second-level switch 120 in the third path is the first-level switch 110A. In the fourth routing table, the next hop of the second-level switch 120 recorded in the entry containing the destination address can be a first-level switch 110 other than the first-level switch 110A. That is, the next hop of the second-level switch 120 in the fourth path is some or all of the first-level switches 110B, 110C, and 110D. The fourth path indicates that the message may be transmitted to the first-level switch 110A by some or all of the first-level switch 110B, the first-level switch 110C, and the first-level switch 110D.

[0111] For a destination address of a message, there are one or more third paths in the third routing table, and there are one or more fourth paths in the fourth routing table.

[0112] The secondary switch 120 may select one third path or one fourth path from the one or more third paths and the one or more fourth paths as the second target path. The embodiment of the present application does not limit the manner in which the secondary switch 120 selects the second target path from the one or more third paths and the one or more fourth paths.

[0113] For example, the secondary switch 120 may invoke the ECMP algorithm to determine a third path from the third routing table to the computing device indicated by the destination address; determine one or more fourth paths from the fourth routing table to the computing device indicated by the destination address; and the secondary switch 120 may select a second target path from the determined third and fourth paths according to the adaptive routing algorithm. For another example, the secondary switch 120 may determine a third path from the third routing table to the computing device indicated by the destination address; determine a fourth path from the fourth routing table to the computing device indicated by the destination address; and the secondary switch 120 may select a second target path from the determined third and fourth paths according to the adaptive routing algorithm.

[0114] When the computing device indicated by the destination address of the message is a computing device connected to the primary switch 110 in the first subsystem 100 to which the secondary switch 120 belongs, the path for the secondary switch 120 to directly transmit the message to the primary switch 110 connected to the computing device is the shortest, that is, the third path is the shortest path. The fourth path is a detour relative to the third path, that is, it requires transit through a primary switch 110 other than the primary switch 110 connected to the computing device. The fourth path is not the shortest path, but it is less likely to be congested. In this case, when selecting the second target path, if the third path is not congested, the secondary switch 120 may prioritize the third path as the second target path. If the third path is congested and the fourth path is not congested, the fourth path may be selected as the second target path. The method for the secondary switch 120 to determine whether the third path or the fourth path is congested is similar to the method for the primary switch 110 to determine whether the first path or the second path is congested. For details, please refer to the above description and will not be repeated here. Likewise, the present embodiment does not limit the method by which the secondary switch 120 determines whether the third path or the fourth path is in a congested state. Any method capable of determining whether the third path or the fourth path is in a congested state is applicable to the present embodiment.

[0115] When the computing device indicated by the destination address of the message is not the computing device connected to the primary switch 110 in the first subsystem 100 to which the secondary switch 120 belongs, that is, the computing device indicated by the destination address of the message is the computing device connected to a secondary switch 120 outside the first subsystem 100 to which the secondary switch 120 belongs, in this case, when selecting the second target path, the secondary switch 120 selects the third path from the third routing table as the second target path.

[0116] (2) The second subsystem 200.

[0117] Figure 6 shows a schematic diagram of the structure of a second subsystem 200 according to an embodiment of the present application. The second subsystem 200 includes one or more switches 210. When the second subsystem 200 includes multiple switches 210, the embodiment of the present application does not limit the connection method of the multiple switches 210. Figure 6 exemplifies one such connection method.

[0118] For any switch 210 in the second subsystem 200 , the switch 210 can forward a message, select a path for the message, and forward the message according to the selected path.

[0119] The switch 210 stores a routing table that indicates the path from the switch 210 to any computing device connected to the primary switch 110. The format of the switch 210 routing table is similar to the format shown in Figures 4 or 5. Each row in the routing table is an entry, representing a path. Each entry includes the destination address of the path and the next hop of the switch 210 in the path. The next hop of the switch 210 is the next device that receives the packet after it passes through the switch 210 in the path. This device is the device to which the switch 210 is connected, such as another switch 210 in the second subsystem 200 or the secondary switch 120. The next hop can be represented by the switch's port number and / or the address of the next hop (i.e., the address of the device to which the switch 210 is connected). The switch's port number identifies the port to which the next hop of the switch 210 in the path is connected to. The next hop address is the address of the device to which the switch 210 is connected.

[0120] For the destination address of a message, there are one or more paths in the routing table of the switch 210. When there is a path, the switch 210 can directly forward the message along the path and transmit the message to the next hop of the switch 210 in the path.

[0121] When multiple paths exist, switch 210 may select one path from the multiple paths as the third target path, forward the packet according to the third target path, and transmit the packet to the next hop of switch 210 in the third target path. The embodiment of the present application does not limit the manner in which switch 210 selects the third target path from the multiple paths. For example, switch 210 may select the third target path from the multiple paths based on an ECMP algorithm or an adaptive routing algorithm.

[0122] Furthermore, in the embodiment of the present application, the link connecting two switches (the switches may be the primary switch 110, the secondary switch 120, or the switch 210 in the second subsystem 200) may include multiple virtual channels. In other words, the path between the two switches may include multiple virtual channels, each of which can be used to transmit messages. The division of virtual channels ensures that multiple messages can be transmitted in parallel between the two switches, effectively improving message transmission efficiency.

[0123] In the message forwarding system 10, after determining a path for forwarding a message (e.g., a first target path, a second target path, and a third target path), any switch can further select a virtual channel for transmitting the message along the path. Any switch can prioritize unoccupied virtual channels along the path for message transmission, or select a virtual channel with fewer messages currently being transmitted along the path for message transmission.

[0124] In this embodiment of the present application, within the first subsystem 100, the primary switch 110 and the secondary switch 120 can select virtual channels for message transmission according to a first channel selection policy. Between the first subsystem 100 and the second subsystem 200, the secondary switch 120 and the second subsystem 200 (the switch 210 within the second subsystem 200) select virtual channels for message transmission according to a second channel selection policy. The first channel selection policy and the second channel selection policy are different. In other words, the virtual channel selection policy is different within the first subsystem 100 and outside of the first subsystem 100.

[0125] The path between two switches includes multiple virtual channels, and channel numbers can be set to identify different virtual channels. The switch selects the virtual channel for transmitting messages on the path, which means that the channel number of the virtual channel needs to be determined. The first channel selection policy and the second channel selection policy describe the rules that need to be followed in selecting the channel number.

[0126] For example, in the first subsystem 100, the first channel selection strategy requires that the channel numbers of the virtual channels be determined in ascending order. This means that when forwarding messages within the first subsystem 100, the channel numbers of the virtual channels selected by the first-level switch 110 and the second-level switch 120 for transmitting the message must be greater than the channel numbers of the virtual channels for receiving the message. This ensures that the channel numbers of the virtual channels increase during message forwarding within the first subsystem 100. Between the first subsystem 100 and the second subsystem 200, the second channel selection strategy requires that the channel numbers of the virtual channels be determined in descending order. This means that when forwarding messages between the first subsystem 100 and the second subsystem 200, the channel numbers of the virtual channels selected by the second-level switch 120 and the switches of the second subsystem 200 for transmitting the message must be less than the channel numbers of the virtual channels for receiving the message.

[0127] For example, a first subsystem 100 includes a primary switch 110A, a primary switch 110B, a primary switch 110C, and a secondary switch 120E. The packet transmission path is primary switch 110A -> primary switch 110B -> primary switch 110C -> secondary switch 120E. If the virtual channel selected by primary switch 110A when forwarding a packet to primary switch 110B is numbered 0, then the virtual channel selected by primary switch 110B when forwarding the packet to primary switch 110C must have a channel number greater than 0. Assuming that the virtual channel selected by primary switch 110B when forwarding a packet to primary switch 110C is numbered 1, then the virtual channel selected by primary switch 110C when forwarding the packet to secondary switch 120E must also have a channel number greater than 1. Therefore, when the primary switch 110C forwards the message to the secondary switch 120E, the channel number of the virtual channel selected may be 2, thereby ensuring that the channel numbers of the virtual channels of the message in the first subsystem 100 are gradually increased and in ascending order.

[0128] When the secondary switch 120E needs to send the message to the switch in the second subsystem 200, it needs to select the channel number of the virtual channel in descending order. That is, when the secondary switch 120E forwards the message to the switch in the second subsystem 200, the channel number of the virtual channel selected must be less than 2. Assume that the channel number of the virtual channel selected by the secondary switch 120E when forwarding the message to the switch in the second subsystem 200 is 1. When the switch in the second subsystem 200 needs to send the message to the secondary switch 120 in another first subsystem 100, it also needs to select the channel number of the virtual channel in descending order. When the switch in the second subsystem 200 forwards the message to the secondary switch 120F, the channel number of the virtual channel selected must be less than 1. Therefore, the channel number of the virtual channel selected by the switch in the second subsystem 200 when forwarding the message to the secondary switch 120F can be 0.

[0129] For another example, within the first subsystem 100, the first channel selection strategy requires that the channel numbers of the virtual channels be determined by maintaining the same channel number. This means that during packet forwarding within the first subsystem 100, the channel numbers of the virtual channels selected by the primary switch 110 and the secondary switch 120 for transmitting the packet are always the same. Between the first subsystem 100 and the second subsystem 200, the second channel selection strategy requires that the channel numbers of the virtual channels be determined in ascending order. This means that during packet forwarding between the first subsystem 100 and the second subsystem 200, the channel numbers of the virtual channels selected by the secondary switch 120 and the switches of the second subsystem 200 for transmitting the packet must be greater than the channel numbers of the virtual channels for receiving the packet.

[0130] For example, a first subsystem 100 includes a primary switch 110A, a primary switch 110B, a primary switch 110C, and a secondary switch 120E. The packet transmission path is primary switch 110A -> primary switch 110B -> primary switch 110C -> secondary switch 120E. When primary switch 110A forwards a packet to primary switch 110B, the virtual channel selected is numbered 0. Therefore, when primary switch 110B forwards the packet to primary switch 110C, the virtual channel selected is also numbered 0. When primary switch 110C forwards the packet to secondary switch 120E, the virtual channel selected must also be numbered 0. This ensures that the virtual channels of packets in first subsystem 100 always have the same channel number.

[0131] When the secondary switch 120E needs to send the message to the switch in the second subsystem 200, it needs to select the channel number of the virtual channel in ascending order. That is, when the secondary switch 120E forwards the message to the switch 210 in the second subsystem 200, the channel number of the virtual channel selected must be greater than 0. For example, the channel number of the virtual channel selected by the secondary switch 120E when forwarding the message to the switch 210 in the second subsystem 200 is 1. When the switch 210 in the second subsystem 200 needs to send the message to the secondary switch 120 in another first subsystem 100, it also needs to select the channel number of the virtual channel in ascending order. When the switch 210 in the second subsystem 200 forwards the message to the secondary switch 120F, the channel number of the virtual channel selected must be greater than 1. Therefore, the channel number of the virtual channel selected by the switch 210 in the second subsystem 200 when forwarding the message to the secondary switch 120F can be 2.

[0132] By adopting different channel selection strategies (such as the first channel selection strategy and the second channel selection strategy) inside and outside the first subsystem 100, it can be ensured that multiple messages can be transmitted along different virtual channels during the transmission process of the message forwarding system. Even if multiple messages are transmitted using the same path, these multiple messages can also be transmitted through different virtual channels, and link deadlock is not likely to occur, that is, it is not likely that one message locks the path and causes other messages to be unable to be transmitted.

[0133] The following describes the message forwarding process in the message forwarding system 10, as shown in FIG7 , which is a message forwarding method provided by an embodiment of the present application. The method includes:

[0134] Step 701: The primary switch 110 receives a message from a connected computing device.

[0135] Step 702: The primary switch 110 determines whether the computing device indicated by the destination address of the message is another computing device connected to the primary switch 110. If so, step 703 is executed; otherwise, step 704 is executed. Hereinafter, the computing device indicated by the destination address of the message is referred to as the target computing device.

[0136] Step 703: The first-level switch 110 sends the message to another computing device connected to the first-level switch 110.

[0137] Step 704: The primary switch 110 determines whether the primary switch 110 connected to the destination computing device is located in the same first subsystem 100 as the primary switch 110. If yes, execute step 705; otherwise, execute step 707.

[0138] This application does not limit the manner in which the first-level switch 110 determines whether the first-level switch 110 connected to the destination computing device is located in the same first subsystem 100 as the first-level switch 110. For example, the addresses of the computing devices connected to the same first subsystem 100 are similar. Taking the destination address as an IP address as an example, the first N values ​​of the IP address can represent the first subsystem 100. In other words, the first N values ​​of the IP addresses of the computing devices connected to the same first subsystem 100 are the same. If the first-level switch 110 determines that the first N values ​​of the IP address are the same as the first N values ​​of the IP address of the connected computing device, then the first-level switch 110 of the destination computing device and the first-level switch 110 are located in the same first subsystem 100. For another example, the first-level switch 110 stores the addresses of computing devices connected to each first-level switch 110 in the first subsystem 100. The first-level switch 110 can determine, based on the address of the destination computing device, whether the destination computing device is the address of the computing device connected to each first-level switch 110 in the first subsystem 100. If so, it means that the first-level switch 110 connected to the destination computing device and the first-level switch 110 are located in the same first subsystem 100; otherwise, the first-level switch 110 connected to the destination computing device and the first-level switch 110 are located in different first subsystems 100.

[0139] Step 705: The first-level switch 110 queries the second routing table to determine one or more second paths.

[0140] Step 706: The first-level switch 110 selects a first target path from the plurality of second paths according to the adaptive routing algorithm. When only one second path is determined, the second path is the first target path.

[0141] Step 707: The first-level switch 110 calls the ECMP algorithm to query the first routing table and determine one or more first paths. The first-level switch 110 queries the second routing table and determines one or more second paths.

[0142] Step 708: The first-level switch 110 selects a first target path from the first path and the second path determined in step 707 according to the adaptive routing algorithm. The first path and the second path determined in step 707 are a first path determined by invoking the ECMP algorithm and one or more second paths determined by querying the second path table.

[0143] Steps 705 to 706 and steps 707 to 708 are merely described using a specific method of querying the first routing table and the second routing table. In fact, the embodiments of the present application do not limit the method of querying the first routing table and the second routing table. For example, when the first-level switch 110 connected to the destination computing device and the first-level switch 110 are located in the same first subsystem 100, the first-level switch 110 can query the first routing table and the second routing table to determine one or more first paths and one or more second paths, and then select the first target path from them according to the adaptive routing algorithm. For another example, regardless of whether the first-level switch 110 determines that the first-level switch 110 connected to the destination computing device and the first-level switch 110 are located in the same first subsystem 100, the first-level switch 110 can first query the first routing table using the ECMP algorithm to determine one or more first paths. The first-level switch 110 queries the second routing table to determine one or more second paths, and then selects the first target path from the determined first and second paths according to the adaptive routing algorithm.

[0144] Step 709: Level-1 switch 110 forwards the packet according to the first target path. If the next hop of level-1 switch 110 in the first target path is a level-1 switch 110 to which level-1 switch 110 is connected, and the level-1 switch 110 is similar to level-1 switch 110, then steps 702 to 709 are executed. For details, refer to the previous section and are not further described here. If the next hop of level-1 switch 110 in the first target path is a level-2 switch 120 to which level-1 switch 110 is connected, then level-2 switch 120 executes step 710.

[0145] Step 710: The secondary switch 120 determines whether the primary switch 110 connected to the destination computing device is located in the same first subsystem 100 as the secondary switch 120. If so, step 711 is executed; otherwise, step 713 is executed. The method by which the secondary switch 120 determines whether the primary switch 110 connected to the destination computing device is located in the same first subsystem 100 as the secondary switch 120 is located is similar to the method by which the primary switch 110 determines whether the primary switch 110 connected to the destination computing device is located in the same first subsystem 100 as the primary switch 110. For details, please refer to the aforementioned content and will not be repeated here.

[0146] Step 711: The secondary switch 120 calls the ECMP algorithm to query the third routing table and determine one or more third paths. The secondary switch 120 queries the fourth routing table and determines one or more fourth paths.

[0147] Step 712 : The secondary switch 120 selects a second target path from the third path and the fourth path determined in step 711 according to the adaptive routing algorithm.

[0148] Step 713: The secondary switch 120 calls the ECMP algorithm to query the third routing table and determines one or more third paths, which are the second target paths.

[0149] Steps 711 to 712 and step 713 are merely described as a specific method of querying the third routing table and the fourth routing table. In fact, the embodiments of the present application are not limited to the method of querying the third routing table and the fourth routing table. For example, when the primary switch 110 connected to the destination computing device and the secondary switch 120 are located in the same first subsystem 100, the secondary switch 120 can query the third routing table and the fourth routing table to determine one or more third paths and / or one or more fourth paths, and then use the adaptive routing algorithm to select the second target path from them.

[0150] Step 714: Level 2 switch 120 forwards the packet according to the second target path. If the next hop of Level 2 switch 120 in the second target path is the Level 1 switch 110 to which it is connected, and this Level 1 switch 110 is similar to the Level 1 switch 110 mentioned above, then Steps 702 to 709 are executed. For details, please refer to the previous section and will not be repeated here. If the next hop of Level 2 switch 120 in the first target path is the switch in the second subsystem 200 to which it is connected, then the switch 210 in the second subsystem 200 executes Step 715.

[0151] Step 715: The switch 210 in the second subsystem 200 invokes the ECMP algorithm to query the routing table of the switch and determine the third target path.

[0152] Step 716: The switch 210 in the second subsystem 200 forwards the packet according to the third target path. If the next hop of the switch in the third target path is another switch 210 in the second subsystem 200 to which the switch is connected, the other switch 210 in the second subsystem 200 is similar to the switch 210 in the second subsystem 200 mentioned above, and steps 715 to 716 are performed. If the next hop of the switch in the first target path is a secondary switch 120 to which the primary switch is connected, the secondary switch 120 is similar to the secondary switch 120 mentioned above, and steps 710 to 714 are performed.

[0153] As shown in FIG8 , it is a structural diagram of a switching device provided in an embodiment of the present application. The switching device 800 may have the functions of the aforementioned first-level switch 110 , second-level switch, or switch 210 in the second subsystem 200 .

[0154] The switching device 800 includes a processor 810, a power supply circuit 820, and optionally a memory 830. The processor 810, the power supply circuit 820, and the memory 830 can be connected via a bus, which can be a Peripheral Component Interconnect Express (PCIe) bus, a Compute Express Link (CXL), a Universal Serial Bus (USB) protocol, or other bus protocols. The power supply circuit 820 is used to supply power to the processor 810.

[0155] Processor 810 is the computing and control core of the switching device. It can be a central processing unit (CPU) or other specific integrated circuit. Processor 810 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0156] The memory 830 is typically used to store computer program instructions and routing tables related to the switching device. The memory 830 typically uses dynamic random access memory (DRAM). In addition to DRAM, the memory 830 can also be other random access memories, such as static random access memory (SRAM), storage class memory (SCM), etc. In addition, the memory 830 can also be read-only memory (ROM). As for read-only memory, for example, it can be programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), etc. The memory 830 can also be a dual in-line memory module or dual in-line memory module (DIMM), flash memory (FLASH), etc.

[0157] The processor 810 can support the operations performed in the primary switch 110, the secondary switch, or the switch 210 in the second subsystem 200 in the aforementioned embodiments by calling the computer program instructions in the memory 830.

[0158] The processor 810 can directly run computer program instructions burned on the processor to support the operations performed in the primary switch 110, the secondary switch, or the switch 210 in the second subsystem 200 in the aforementioned embodiments.

[0159] Based on the same inventive concept as the method embodiment, the present application also provides a switching device for executing the method performed by the primary switch 110, the secondary switch, or the switch 210 in the second subsystem 200 in the above-described embodiment. The relevant features can be found in the above-described method embodiment and are not further described here. As shown in Figure 9, the switching device 900 includes a forwarding module 901 and a routing module 902.

[0160] The forwarding module 901 is configured to send and receive messages. For example, the forwarding module 901 may forward the message according to a first target path. For another example, the forwarding module 901 may forward the message according to a second target path. For another example, the forwarding module 901 may forward the message according to a third target path.

[0161] The routing module 902 is configured to determine a transmission path for the message. The transmission path may be a first target path, a second target path, or a third target path. The manner in which the routing module 902 determines the transmission path can be found in the aforementioned description of the first target path determined by the first-level switch 110, the second target path determined by the second-level switch 120, and the third target path determined by the switch 210, and will not be further described here.

[0162] It should be noted that the division of modules in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. The functional modules in the embodiments of the present application may be integrated into a single processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The integrated modules may be implemented in either hardware or software functional modules.

[0163] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).

[0164] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.

[0166] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0168] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations.

Claims

1. A message forwarding system, characterized in that: The message forwarding system includes a plurality of first subsystems and at least one second subsystem, the first subsystem includes a plurality of first-level switches and at least one second-level switch, the plurality of first-level switches are connected to each other, each of the first-level switches is connected to part or all of the at least one second-level switch, and each of the second-level switches is connected to part or all of the at least one second subsystem; The primary switch is used to connect a computing device, send a message of the computing device to the connected primary switch or the secondary switch, and send a received message to the computing device; The secondary switch is used to receive a message from the connected primary switch or the second subsystem, and send the received message to the connected primary switch or the second subsystem; The second subsystem is used to receive messages from the first subsystem and send messages to the first subsystem.

2. The system according to claim 1, characterized in that The routing table of the first-level switch indicates a path from the first-level switch to a computing device connected to any first-level switch of the message forwarding system, and the first-level switch is specifically used to: querying the routing table of the first-level switch according to the destination address carried by the message of the computing device to determine multiple paths to the destination address, wherein the destination address is the address of the computing device; Selecting a first target path from the determined multiple paths according to an equal cost multi-path routing ECMP algorithm and / or an adaptive routing algorithm; The message is forwarded according to the first target path.

3. The system according to claim 1 or 2, characterized in that: The routing table of the secondary switch indicates a path from the secondary switch to a computing device connected to any primary switch of the message forwarding system, wherein the secondary switch is specifically used for: querying the routing table of the secondary switch according to the destination address carried in the received message to determine multiple paths to the destination address, where the destination address is an address of a computing device; Selecting a second target path from the determined multiple paths according to an ECMP algorithm and / or an adaptive routing algorithm; The message is forwarded according to the second target path.

4. The system according to claim 2, characterized in that The routing table of the first-level switch includes a first routing table and a second routing table, the first routing table indicates a first path from the first-level switch to the computing device connected to any one of the first-level switches, and the next hop of the first-level switch in the first path is the second-level switch, and the second routing table indicates a second path from the first-level switch to the computing device connected to any one of the first-level switches, and the next hop of the first-level switch in the second path is the first-level switch in the first subsystem to which the first-level switch belongs.

5. The system according to claim 4, characterized in that The primary switch is specifically used for: Invoke an ECMP algorithm to determine a first path from the first routing table to the computing device indicated by the destination address; Determine from the second routing table a second path to the computing device indicated by the destination address; The first target path is selected from the determined first path and second path according to an adaptive routing algorithm.

6. The system according to claim 5, characterized in that If the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in different first subsystems, the first target path is the determined first path; if the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in the same first subsystem, the first target path is the determined second path.

7. The system according to claim 3, characterized in that The routing table of the secondary switch includes a third routing table and a fourth routing table, the third routing table indicating a third path from the secondary switch to the computing device connected to any one of the primary switches, the next hop of the secondary switch in the third path being the primary switch or the second subsystem, the fourth routing table indicating a fourth path from the secondary switch to the computing device connected to some of the primary switches, the next hop of the secondary switch in the fourth path being the primary switch in the first subsystem to which the secondary switch belongs, and the next hop of the secondary switch in the third path and the fourth path from the secondary switch to the same computing device is different.

8. The system according to claim 6, characterized in that The secondary switch is specifically used for: Invoke an ECMP algorithm to determine a third path from the third routing table to the computing device indicated by the destination address; Determine a fourth path from the fourth routing table to the computing device indicated by the destination address; The second target path is selected from the determined third path and fourth path according to an adaptive routing algorithm.

9. The system according to claim 5, characterized in that If the primary switch connected to the computing device indicated by the destination address and the secondary switch are located in different first subsystems, the second target path is the determined third path; if the primary switch connected to the computing device indicated by the destination address and the secondary switch are located in the same first subsystem, the second target path is the determined fourth path.

10. The system according to any one of claims 1 to 9, characterized in that: The link connecting the two primary switches includes a plurality of virtual channels, the link connecting the primary switch and the secondary switch includes a plurality of virtual channels; the link connecting the at least one second subsystem of the secondary switch includes a plurality of virtual channels; In any of the first subsystems, the first-level switch and the second-level switch select a virtual channel to transmit a message according to a first channel selection strategy; between the first subsystem and the second subsystem, the second-level switch and the second subsystem select a virtual channel to transmit a message according to a second channel selection strategy, wherein the first channel selection strategy and the second channel selection strategy are different.

11. The system according to any one of claims 1 to 10, characterized in that: The second subsystem includes at least one switch, wherein a routing table of the switch indicates a path from the switch to a computing device connected to any first-level switch, and the switch is used to: querying the routing table of the switch according to the destination address carried in the received message to determine multiple paths to the destination address, where the destination address is an address of a computing device; selecting a third target path from the determined multiple paths according to the ECMP algorithm; The message is forwarded according to the third target path.

12. A message forwarding method, characterized in that: The method is applied to a message forwarding system, the message forwarding system includes a plurality of first subsystems and at least one second subsystem, the first subsystem includes a plurality of first-level switches and at least one second-level switch, the plurality of first-level switches are connected to each other, each of the first-level switches is connected to part or all of the at least one second-level switch, and each of the second-level switches is connected to part or all of the at least one second subsystem; the method includes: The primary switch sends the message of the connected computing device to the connected primary switch or the secondary switch, and sends the received message to the computing device; The secondary switch receives a message from the connected primary switch or the second subsystem, and sends the received message to the connected primary switch or the second subsystem; The second subsystem receives messages from the first subsystem and sends messages to the first subsystem.

13. The method according to claim 12, characterized in that The routing table of the first-level switch indicates a path from the first-level switch to a computing device connected to any first-level switch of the message forwarding system, and the first-level switch sends a message of the connected computing device to the connected first-level switch or the second-level switch, including: The first-level switch queries the routing table of the first-level switch according to the destination address carried in the message of the computing device to determine multiple paths to the destination address, where the destination address is the address of the computing device; The first-level switch selects a first target path from the determined multiple paths according to an equal-cost multi-path routing ECMP algorithm and / or an adaptive routing algorithm; The first-level switch forwards the message according to the first target path.

14. The method according to claim 12 or 13, characterized in that The routing table of the secondary switch indicates a path from the secondary switch to a computing device connected to any primary switch of the message forwarding system, and the secondary switch sends the received message to the connected primary switch or the second subsystem, including: The secondary switch queries the routing table of the secondary switch according to the destination address carried in the received message to determine multiple paths to the destination address, where the destination address is an address of a computing device; The secondary switch selects a second target path from the determined multiple paths according to an ECMP algorithm and / or an adaptive routing algorithm; The secondary switch forwards the message according to the second target path.

15. The method according to claim 13, characterized in that The routing table of the first-level switch includes a first routing table and a second routing table, the first routing table indicates a first path from the first-level switch to the computing device connected to any one of the first-level switches, and the next hop of the first-level switch in the first path is the second-level switch, and the second routing table indicates a second path from the first-level switch to the computing device connected to any one of the first-level switches, and the next hop of the first-level switch in the second path is the first-level switch in the first subsystem to which the first-level switch belongs.

16. The method according to claim 15, characterized in that The primary switch sends a message of the connected computing device to the connected primary switch or the secondary switch, including: The first-level switch calls the ECMP algorithm to determine a first path from the first routing table to the computing device indicated by the destination address; The first-level switch determines a second path from the second routing table to the computing device indicated by the destination address; The first-level switch selects the first target path from the determined first path and second path according to an adaptive routing algorithm.

17. The method according to claim 16, characterized in that If the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in different first subsystems, the first target path is the determined first path; if the first-level switch connected to the computing device indicated by the destination address and the first-level switch are located in the same first subsystem, the first target path is the determined second path.

18. The method of claim 14, wherein: The routing table of the secondary switch includes a third routing table and a fourth routing table, the third routing table indicating a third path from the secondary switch to the computing device connected to any one of the primary switches, the next hop of the secondary switch in the third path being the primary switch or the second subsystem, the fourth routing table indicating a fourth path from the secondary switch to the computing device connected to some of the primary switches, the next hop of the secondary switch in the fourth path being the primary switch in the first subsystem to which the secondary switch belongs, and the next hop of the secondary switch in the third path and the fourth path from the secondary switch to the same computing device is different.

19. The method according to claim 17, characterized in that The second-level switch sends the received message to the connected first-level switch or the second subsystem, including: The secondary switch calls the ECMP algorithm to determine a third path from the third routing table to the computing device indicated by the destination address; The secondary switch determines a fourth path from the fourth routing table to the computing device indicated by the destination address; The secondary switch selects the second target path from the determined third path and fourth path according to an adaptive routing algorithm.

20. The method of claim 16, wherein: If the primary switch connected to the computing device indicated by the destination address and the secondary switch are located in different first subsystems, the second target path is the determined third path; if the primary switch connected to the computing device indicated by the destination address and the secondary switch are located in the same first subsystem, the second target path is the determined fourth path.

21. The method according to any one of claims 12 to 20, characterized in that: The link connecting the two primary switches includes a plurality of virtual channels, and the link connecting the primary switch and the secondary switch includes a plurality of virtual channels; The link connecting the at least one second subsystem of the secondary switch includes a plurality of virtual channels; the method further includes: In any of the first subsystems, the first-level switch and the second-level switch select a virtual channel to transmit a message according to a first channel selection strategy; between the first subsystem and the second subsystem, the second-level switch and the second subsystem select a virtual channel to transmit a message according to a second channel selection strategy, wherein the first channel selection strategy and the second channel selection strategy are different.

22. The method according to any one of claims 12 to 21, characterized in that: The second subsystem includes at least one switch, the routing table of the switch indicates a path from the switch to a computing device connected to any first-level switch, and the second-level switch sends a received message to the connected first-level switch or the second subsystem, including: The switch queries the routing table of the switch according to the destination address carried in the received message to determine multiple paths to the destination address, where the destination address is an address of a computing device; The switch selects a third target path from the determined multiple paths according to the ECMP algorithm; The switch forwards the message according to the third target path.

Citation Information

Patent Citations

  • Managing virtual port channel switch peers from software-defined network controller

    CN109716717A

  • Data forwarding method and access layer switching equipment

    CN110536187A

  • Message transmission method and device, computing equipment and storage medium

    CN113411257A

  • Forwarding path planning method for large-scale data network center

    CN115462049A

  • Systems and methods for integrating network switch management with computing resource management

    US20210111946A1