Message forwarding system and method

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

CN118740729APending Publication Date: 2024-10-01HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310666191.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-31
Filing Date
2023-06-06
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The Dragonfly network topology can easily cause network congestion and limit 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 to ensure that messages can be transmitted efficiently.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740729A_ABST
    Figure CN118740729A_ABST
Patent Text Reader

Abstract

The invention discloses a message forwarding system and method, the message forwarding system comprises a plurality of first subsystems and at least one second subsystem, each first subsystem comprises a plurality of first-level switches and at least one second-level switch, the first-level switches are connected with one another, and the second-level switches are connected with the first-level switches. Each primary switch is connected with a part or all of the at least one secondary switch, and each secondary switch is connected with a part or all of the at least one second subsystem. The first-level switch sends the message of the connected computing device to the connected first-level switch or second-level switch and sends the received message to the computing device; and the second-level switch receives the message from the connected first-level switch or the second subsystem, and sends the received message to the connected first-level switch or the second subsystem. And the second subsystem forwards the message between the first subsystems. In the message forwarding system, a plurality of different message transmission paths exist, so that the network congestion can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the Intellectual Property Office of the People's Republic of China on March 31, 2023, with application number 202310384114.X and invention name "A Self-Adaptive Routing Method", the entire contents of which are incorporated by reference in 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] In a high performance computing (HPC) cluster, multiple computing devices are connected by means of a network topology. In this network topology, if there are a large number of paths between any two computing devices, the two computing devices can be effectively guaranteed to perform efficient message transmission. On the contrary, if there are a small number of paths or a long path between two computing devices, the two computing devices may not be able to perform efficient message transmission. It can be seen that the network topology is an important factor affecting the overall performance of HPC.

[0005] HPC clusters often use the Dragonfly topology, which includes multiple groups of switches, each of which includes multiple adjacent switches. The multiple switches in each group are connected in a fully connected manner. Any two groups of switches are connected in a fully connected manner, and there is at least one link between any two groups of switches.

[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. Summary of the invention

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

[0008] 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.

[0009] In the first-level subsystem:

[0010] The primary switch can connect to the computing device, and the primary switch can send the computing device's message to the connected primary switch or secondary switch. The primary switch can also send the received message to the computing device;

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

[0012] 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.

[0013] Through the above system, in the first subsystem, there is a connection between any two first-level switches, so that the first-level switches can directly forward messages between switches. For two first-level switches from different first subsystems, messages can be transmitted through the transmission path of a second-level switch in a first subsystem, a second subsystem, and a second-level switch in another first subsystem, and messages can also be transmitted with the help of other first-level switches in the first subsystem, that is, in addition to a second-level switch in a first subsystem, a second subsystem, and a second-level switch in another first subsystem, the message transmission path can also include other first-level switches in the two first subsystems. In this message forwarding system, there are multiple different message transmission paths, and there are multiple optional paths when forwarding messages, which can effectively reduce network congestion.

[0014] In a possible implementation, for any first-level switch, the routing table of the first-level switch indicates the path from the first-level switch to the computing device connected to any first-level switch of 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 according to the destination address carried in the message of the computing device to determine multiple paths to the destination address, the destination address is the address of the computing device, and then select the first target path from the multiple determined paths according to the ECMP algorithm and / or the adaptive routing algorithm; the first-level switch forwards the message according to the first target path. When the first-level switch can query the routing table of the first-level switch according to the destination address carried in the message of 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 according to the first target path.

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

[0016] 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.

[0017] When the secondary switch sends a message, if 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, the destination address is the address of the computing device; the secondary switch selects a second target path from the determined multiple paths according to the ECMP algorithm and / or the adaptive routing algorithm; the secondary switch forwards the message according to the second target path. If the secondary switch queries the routing table of the secondary switch according to the destination address carried in the received message to determine a path to the destination address, then the path is the second target path, and the secondary switch forwards the message according to the second target path.

[0018] Through the above system, the secondary switch can realize path selection by looking up the routing table, and 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 of the ECMP algorithm and the adaptive routing algorithm, so that the message can be quickly transmitted to the destination address.

[0019] In a 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, 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 a computing device connected to any first-level switch, and 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.

[0020] Through the above system, the routing table of the first-level switch can include two types of routing tables, one type of routing table is a first routing table that enables the message to be transmitted upward first and then downward. The other type of routing table is a second routing table that enables the message to be transmitted between the first-level switches. The routing table of the first-level switch covers various possible paths, ensuring that the first-level switch can select a better path when selecting a transmission path for the message.

[0021] In a possible implementation, when sending a message, the first-level switch may only query the first routing table or the second routing table, or may query the first routing table and the second routing table. Here is a method in which the first-level switch queries the first routing table and the second routing table for message transmission. The first-level switch may call the ECMP algorithm to determine the first path to the computing device indicated by the destination address from the first routing table; the first-level switch may determine the second path to the computing device indicated by the destination address from the second routing table; the first-level switch may select the first target path from the determined first path and second path according to the adaptive routing algorithm.

[0022] 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.

[0023] In a 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.

[0024] 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 to achieve message forwarding, so that the message can be quickly forwarded to the destination address.

[0025] In a 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 the primary switch in the first subsystem to which the secondary switch belongs, and 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.

[0026] Through the above system, the routing table of the secondary switch can include two types of routing tables, and the third routing table is capable of transmitting the message upward or downward. The fourth routing table is a supplement to the third routing table. The routing table of the secondary switch covers various possible paths, ensuring that the secondary switch can select a better path when selecting a transmission path for the message.

[0027] In a possible implementation, when sending a message, the secondary switch may only query the third routing table or the fourth routing table, or query the third routing table and the fourth routing table. Here is a method in which the secondary switch queries the third routing table and the fourth routing table for message transmission. The secondary switch may call the ECMP algorithm to determine the third path to the computing device indicated by the destination address from the third routing table; determine the fourth path to the computing device indicated by the destination address from the fourth routing table; and then select the second target path from the determined third path and fourth path according to the adaptive routing algorithm.

[0028] Through the above system, the secondary switch has many ways to select paths for messages, which are suitable for different scenarios.

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

[0030] 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.

[0031] In a 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; a link connecting at least one second subsystem of a secondary switch includes multiple virtual channels;

[0032] In any first subsystem, the primary switch and the secondary 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 secondary 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.

[0033] Through the above system, multiple virtual channels are set for the links between switches, and the methods of selecting virtual channels inside 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.

[0034] In a possible implementation, the second subsystem includes at least one switch, and the routing table of the switch indicates the path from the switch to the computing device connected to any first-level switch. When the switch sends a message, if 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, the destination address is the address of the computing device; then, according to the ECMP algorithm, a third target path is selected from the multiple determined paths; and the message is forwarded according to the third target path. If the switch queries the routing table of the switch according to the destination address carried in the received message to determine a path to the destination address, then the path is the third target path, and the switch forwards the message according to the third target path.

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

[0036] In the second aspect, the present application further provides a message forwarding method, which can be implemented by the message forwarding system mentioned above. 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 above description and will not be repeated here. In this method:

[0037] For any primary switch, the primary switch can send messages of the connected computing device to the connected primary switch or secondary switch, and send received messages to the computing device.

[0038] 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.

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

[0040] In a possible implementation, the routing table of the first-level switch indicates the path from the first-level switch to the computing device connected to any first-level switch of the message forwarding system. When the first-level switch sends a message, the routing table of the first-level switch is queried 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 the ECMP algorithm and / or the adaptive routing algorithm; the first-level switch forwards the message according to the first target path.

[0041] 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. When the secondary switch sends a message, the routing table of the secondary switch is queried according to 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 target path from the determined multiple paths according to the ECMP algorithm and / or the adaptive routing algorithm; and the secondary switch forwards the message according to the second target path.

[0042] In a 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, 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 a computing device connected to any first-level switch, and 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.

[0043] In one possible implementation, when a first-level switch sends a message, the ECMP algorithm is called 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 path and second path according to an adaptive routing algorithm.

[0044] In a 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.

[0045] In a 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 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.

[0046] In a possible implementation, when the secondary switch sends a message, the ECMP algorithm can be called to determine a third path to the computing device indicated by the destination address from the third routing table; the secondary switch determines a fourth path to the computing device indicated by the destination address from the fourth routing table; and the secondary switch selects a second target path from the determined third path and fourth path according to the adaptive routing algorithm.

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

[0048] In a 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; a link connecting at least one second subsystem of a secondary switch includes multiple virtual channels; within any first subsystem, the primary switch and the secondary 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 secondary 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.

[0049] In a possible implementation, the second subsystem includes at least one switch, the routing table of the switch indicates the path from the switch to any computing device connected to the first-level switch, and the second-level switch receives a message from the first-level switch or the second subsystem to which it is connected. The switch can send the received message to the first-level switch or the second subsystem to which it is connected. When sending the message, 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 the address of the computing device; the switch selects a third target path from the determined multiple paths according to the ECMP algorithm; and the switch forwards the message according to the third target path.

[0050] In a third aspect, an embodiment of the present application further provides a switching device, which may be the primary switch, the second 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 will not be repeated here. The switching device includes a processor. The types of processors listed above are only examples, and the present application does not limit the specific types of processors included in the switching device. Optionally, a power supply circuit and a memory are also included. The power supply circuit is used to power the processor.

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

[0052] In a possible implementation manner, the processor has a 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 each possible implementation manner of the first aspect. The beneficial effects can be referred to the description of the first aspect and will not be repeated here. The processor may be a central processing unit (CPU) or other specific integrated circuits.

[0053] In another possible implementation, a memory stores computer program instructions, a processor is coupled to the memory, and 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 above-mentioned first aspect and each possible implementation manner of the first aspect.

[0054] In a fourth aspect, the present application further provides a switching device, which has the function of implementing the behavior of the primary 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 primary 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 and will not be repeated here.

[0055] In a fifth aspect, the present application also provides a computer-readable storage medium, in which instructions are stored. 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 various possible implementations of the first aspect.

[0056] 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.

[0057] 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 various possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic diagram of the architecture of a message forwarding system provided for this application;

[0059] Figure 2 A schematic diagram of the structure of a message forwarding system provided for this application;

[0060] Figure 3A-3B A schematic diagram of the structure of a first subsystem provided in this application;

[0061] Figure 4 A schematic diagram of a routing table of a primary switch provided for this application;

[0062] Figure 5 A schematic diagram of a routing table of a secondary switch provided for this application;

[0063] Figure 6 A schematic diagram of the structure of a second subsystem provided in this application;

[0064] Figure 7 A schematic diagram of a message forwarding method provided by this application;

[0065] Figure 8 A schematic diagram of the structure of a switching device provided for this application;

[0066] Fig. 9 A schematic diagram of the structure of a switching device provided in this application. DETAILED DESCRIPTION

[0067] 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.

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

[0069] ECMP means that when there are multiple paths with equal costs to reach a destination address, multiple messages sent to the destination address can be shared through the multiple paths to achieve load balancing. When one of the paths fails, it can be switched to a non-faulty path to achieve fast path switching. There are many path selection strategies in the ECMP algorithm. For example, the path can be selected by hashing the source address of the message, or by polling the transmission messages among the multiple paths. For another example, the paths are allocated based on the weight of the paths, and the paths with large weights are allocated more messages. The weight of the path can be a preset value.

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

[0071] Adaptive routing algorithm refers to dynamically adjusting the path selection strategy of the switch by real-time monitoring of the network status of the switch and the system where the switch is located, so as to better use the network status of the system where the switch is located. In the adaptive routing algorithm, the switch will analyze the routing table, the network topology of the system where the switch is located, and the information of the links in the system where the switch is located, calculate the quality of the path and the available bandwidth on the link, and select the optimal path.

[0072] like Figure 1 As shown, a message forwarding system provided in an embodiment of the present application is provided. The message forwarding system 10 includes two types of subsystems. For the convenience of description, the two types of subsystems are respectively referred to as a first subsystem 100 and a second subsystem 200. The message forwarding system 10 includes a plurality of first subsystems 100 and at least one second subsystem 200. Each first subsystem 100 can be connected to all second subsystems 200, or only to some of the second subsystems 200.

[0073] For any first subsystem 100, the first subsystem 100 can be connected to a computing device in addition to being connected to the second subsystem 200. 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 connected to the first subsystem 100.

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

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

[0076] (1) The first subsystem 100.

[0077] like Figure 2 As shown, it is a structural diagram of a first subsystem 100 provided in an embodiment of the present application. 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.

[0078] The first subsystem 100 includes a plurality of primary switches 110 and at least one secondary switch 120, and each primary switch 110 may be connected to all secondary switches 120 or to some secondary switches 120. The plurality of primary switches 110 may be fully connected, that is, the plurality of primary switches 110 are connected to each other, and each primary switch 110 is connected to a primary switch 110 other than the primary switch 110 in the first subsystem 100.

[0079] For any primary switch 110, the primary switch 110 can be connected to a computing device in addition to the secondary switch 120. The present 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 a computing device, and can also receive messages from a connected secondary switch 120 or a connected primary switch 110; the primary switch 110 can transmit the received message to the connected computing device, the connected secondary switch 120 or the connected primary switch 110.

[0080] 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 the secondary switch 120, the secondary switch 120 can be connected to one or more switches 210 in the second subsystem 200.

[0081] Functionally, the secondary switch 120 can receive messages from the connected primary switch 110, and can also receive messages from the connected second subsystem 200; the secondary switch 120 can transmit the received message to the connected primary switch 110, or the connected second subsystem 200. For any secondary switch 120, the embodiment of the present application does not limit the number of primary switches 110 or the number of second subsystems 200 connected to the secondary switch 120. 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.

[0082] like Figure 3A As shown, it is a structural schematic diagram of a first subsystem 100 provided in an embodiment of the present application, in which the first subsystem 100 includes three primary switches 110 and two secondary switches 120. The three primary switches 110 are connected to each other. Each primary switch 110 is connected to each secondary switch 120. Each secondary switch 120 is connected to each second subsystem 200.

[0083] like Figure 3B As shown, it is a structural schematic diagram of a first subsystem 100 provided in an embodiment of the present application, in which the first subsystem 100 includes three primary switches 110 and two secondary switches 120. The three primary switches 110 are connected to each other. Each primary switch 110 is connected to each secondary switch 120. Each secondary switch 120 is connected to a second subsystem 200, and each secondary switch 120 is connected to a different second subsystem 200.

[0084] 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.

[0085] 1) Level 1 switch 110.

[0086] A primary switch 110 is used as an example for description. The primary switch 110 stores a routing table, and the routing table of the primary switch 110 indicates a path from the primary switch 110 to any computing device connected to the primary switch 110 of the message forwarding system 10 .

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

[0088] The routing table of the primary switch 110 can be abstracted as Figure 4 The table shown is in the form of a table, in which each row is an entry, and an entry represents a path. The table records the destination address of the path and the next hop of the primary switch 110 in the path. The next hop of the primary switch 110 refers to the next device that receives the message after the message passes through the primary switch 110 in the path. The device is a device connected to the primary switch 110, such as a computing device connected to the primary switch 110, a connected primary switch 110, or a connected secondary switch 120. The next hop can be represented by the port number of the primary switch 110 and / or the address of the next hop (that is, the address of the device connected to the primary switch 110). Among them, the port number of the primary switch 110 identifies the port that is connected to the primary switch 110 at the next hop of the primary switch 110 in the path. The address of the next hop refers to the address of the device connected to the primary switch 110.

[0089] The addresses involved in the embodiments of the present application (such as the address of the next hop of the primary switch 110 or the secondary switch 120, the address of the next hop of the switch in the second subsystem 200, and the destination address in the message, etc.) can be an Internet protocol (IP) address or a media access control address (MAC).

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

[0091] When there are multiple paths, the first-level switch 110 can select a path from the multiple paths as the first target path, forward the message according to the first target path, and transmit the message to the next hop of the first-level switch 110 in the first target path. The embodiment of the present application does not limit the way in which the first-level switch 110 selects the first target path from the multiple paths. For example, the first-level switch 110 can select the first target path from the multiple paths according to the ECMP algorithm or the adaptive routing algorithm. For another example, the first-level switch 110 can select the first target path from the multiple paths according to the ECMP algorithm and the adaptive routing algorithm.

[0092] 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.

[0093] The first routing table indicates the first path from the first-level switch 110 to the computing device connected to any first-level switch 110 in the message forwarding system 10. The first path refers to the transmission path of the message when the transmission of the message needs to follow the principle of "upward" first and then "downward". "Upward" refers to the direction of the switch above the first-level switch 110, and the switch above the first-level switch 110 is the second-level switch 120 or the switch in the second subsystem 200. Correspondingly, after the message reaches the switch above the first-level switch 110, "downward" refers to the direction of the switch below the switch, and the switch below the switch is the first-level switch 110. Therefore, the next hop of the first-level switch 110 in the first path is the second-level switch 120 connected to the first-level switch 110.

[0094] The second routing table indicates a second path from the primary switch 110 to a computing device connected to any primary switch 110 in the message forwarding system 10, and the second path is different from the first path, and allows messages to be directly transmitted between primary switches 110. Therefore, the next hop of the primary switch 110 in the second path is the primary switch 110 in the first subsystem 100 to which the primary switch 110 belongs.

[0095] 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.

[0096] The first-level switch 110 may select a first path or a 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.

[0097] For example, the first-level switch 110 may call the ECMP algorithm to determine one or more first paths to the computing device indicated by the destination address from the first routing table; determine one or more second paths to the computing device indicated by the destination address from the second routing table; the first-level switch 110 selects the first target path from the determined first path and the second path according to the adaptive routing algorithm. For another example, the first-level switch 110 may determine one or more first paths to the computing device indicated by the destination address from the first routing table; determine one or more second paths to the computing device indicated by the destination address from the second routing table; the first-level switch 110 selects the first target path from the determined first path and the second path according to the adaptive routing algorithm.

[0098] 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, and the first path will take a detour relative to the second path, that is, it is necessary to connect the second-level switch 120 outside the first-level switch 110 of the computing device for transfer. 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 way in 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 can set a non-zero credit value for the first path. Each time a message is transmitted, the credit value is reduced by one, and each time a message is transmitted, the credit value is increased by one. When the credit value of the first path is lower than the set minimum 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 above method is an example, and any method that can determine whether the first path or the second path is in a congested state is applicable to the embodiments of the present application.

[0099] 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 the 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 the first-level switch 110 selects the first target path, if the first path is not in a congested state, the first path can be given priority as the first target path. If the first path is in a congested state and the second path is not in a congested state, when the first-level switch 110 selects the first target path, the second path can be given priority as the first target path. If the first path is in a congested state and the second path is in a congested state, when the first-level switch 110 selects the first target path, the first path can be given priority as the first target path.

[0100] 2) Secondary switch 120.

[0101] A secondary switch 120 is used as an example for description. The secondary switch 120 stores a routing table, and the routing table of the secondary switch 120 indicates a path from the secondary switch 120 to a computing device connected to any primary switch 110 of the message forwarding system 10 .

[0102] 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.

[0103] The routing table of the secondary switch 120 can be abstracted as Figure 5 The table form shown is a table in which each row is an entry, and an 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. The device is the device connected to the secondary switch 120, such as the primary switch 110 connected to the secondary switch 120 and the switch in the second subsystem 200 connected to it. The next hop can be represented by the port number of the secondary switch 120 and / or the address of the next hop (that is, the address of the device connected to the secondary switch 120). Among them, the port number of the secondary switch 120 identifies the port that is connected to the secondary switch 120 at the next hop of the secondary switch 120 in the path. The address of the next hop refers to the address of the device connected to the secondary switch 120.

[0104] 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 one path, the secondary switch 120 can directly forward the message according to the path and transmit the message to the next hop of the secondary switch 120 in the path.

[0105] When there are multiple paths, the secondary switch 120 can select a path from the multiple paths as the second target path, forward the message according to the second target path, and transmit the message to the next hop of the secondary switch 120 in 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 multiple paths. For example, the secondary switch 120 can select the second target path from the multiple paths according to the ECMP algorithm or the adaptive routing algorithm. For another example, the secondary switch 120 can select the second target path from the multiple paths according to the ECMP algorithm and the adaptive routing algorithm.

[0106] 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.

[0107] 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. The third path means that the message can be transmitted "upward" or "downward". "Upward" refers to the direction of the switch above the secondary switch 120, and the switch above the secondary switch 120 is the switch 210 in the second subsystem 200. Correspondingly, "downward" refers to the direction of the switch below the switch, and the switch below the switch is the primary switch 110. Whether the message is "upward" or "downward" is related to the destination address of the message. If the computing device indicated by the destination address of the message is located in a different first subsystem 100 from the secondary switch 120, the message needs to be transmitted upward, otherwise, the message needs to be transmitted downward. Therefore, the next hop of the secondary switch 120 in the third path is the second subsystem 200 (corresponding to the message "upward" transmission) or the primary switch 110 (corresponding to the message "downward" transmission) connected to the secondary switch 120.

[0108] The fourth routing table indicates a fourth path from the secondary switch 120 to the computing device connected to some of the primary switches 110 in the message forwarding system 10, and the fourth path means that the message can be transmitted "downward". When transmitting along the fourth path, the message is allowed to be transmitted between the primary switches 110. 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 path and the fourth path from the secondary switch 120 to the computing device is a different primary switch 110.

[0109] For example, a first subsystem 100 includes a primary switch 110A, a primary switch 110B, a primary switch 110C, a primary switch 110D, and a secondary switch 120. The routing table of the secondary switch 120 includes a third routing table and a fourth routing table. Assuming that the computing device indicated by the destination address of the message is the computing device connected to the primary switch 110A, then, in the third routing table, the next hop of the secondary switch 120 recorded in the table entry where the destination address is located should be the primary switch 110A, that is, the next hop of the secondary switch 120 in the third path is the primary switch 110A. In the fourth routing table, the next hop of the secondary switch 120 recorded in the table entry where the destination address is located can be a primary switch 110 other than the primary switch 110A, that is, the next hop of the secondary switch 120 in the fourth path is part or all of the primary switch 110B, the primary switch 110C, and the primary switch 110D. The fourth path indicates that the message may be transmitted to the primary switch 110A by part or all of the primary switch 110B, the primary switch 110C, and the primary switch 110D.

[0110] 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.

[0111] 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.

[0112] For example, the secondary switch 120 may call the ECMP algorithm to determine a third path to the computing device indicated by the destination address from the third routing table; determine one or more fourth paths to the computing device indicated by the destination address from the fourth routing table; the secondary switch 120 selects the second target path from the determined third path and the fourth path according to the adaptive routing algorithm. For another example, the secondary switch 120 may 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; the secondary switch 120 selects the second target path from the determined third path and the fourth path according to the adaptive routing algorithm.

[0113] 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, then 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, and the fourth path will take a detour relative to the third path, that is, it needs to be transferred by a primary switch 110 other than the primary switch 110 connected to the computing device. The fourth path is not the shortest path, but the fourth path is not easy to be congested. In this case, when the secondary switch 120 selects the second target path, if the third path is not in a congested state, the third path can be preferentially used as the second target path. If the third path is in a congested state and the fourth path is not in a congested state, the fourth path can be used as the second target path. The way in which the secondary switch 120 determines whether the third path or the fourth path is in a congested state is similar to the way in which the primary switch 110 determines whether the first path or the second path is in a congested state, and the details can be referred to the above description, which will not be repeated here. Similarly, the embodiment of the present application 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 that can determine whether the third path or the fourth path is in a congested state is applicable to the embodiment of the present application.

[0114] 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 the 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.

[0115] (2) The second subsystem 200.

[0116] like Figure 6, which is a schematic diagram of the structure of a second subsystem 200 provided in an embodiment of the present application, wherein 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 One of the connection methods is shown as an example.

[0117] 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.

[0118] The switch 210 stores a routing table, which indicates the path from the switch 210 to any computing device connected to the first-level switch 110. The format of the routing table of the switch 210 is similar to Figure 4 or Figure 5 The format shown is similar. Each row in the routing table is an entry, representing a path, and 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 refers to the next device that receives the message after the message passes through the switch 210 in the path. The device is the device connected to the switch 210, such as other switches 210 in the second subsystem 200 connected, or the connected secondary switch 120. The next hop can be represented by the port number of the switch and / or the address of the next hop (that is, the address of the device connected to the switch 210). Among them, the port number of the switch identifies the port that refers to the next hop of the switch 210 in the path and is connected to the switch 210. The address of the next hop refers to the address of the device connected to the switch 210.

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

[0120] When there are multiple paths, the switch 210 can select a path from the multiple paths as the third target path, forward the message according to the third target path, and transmit the message to the next hop of the switch 210 in the third target path. The embodiment of the present application does not limit the way in which the switch 210 selects the third target path from the multiple paths. For example, the switch 210 can select the third target path from the multiple paths according to the ECMP algorithm or the adaptive routing algorithm.

[0121] In addition, in the embodiment of the present application, the link connecting two switches (the switch may be the primary switch 110, the secondary switch 120, or the switch 210 in the second subsystem 200) may include multiple virtual channels, that is, the path between the two switches may include multiple virtual channels, and the multiple virtual channels may be used to transmit messages. The division of virtual channels can ensure that multiple messages can be transmitted in parallel between the two switches, which can effectively improve the message transmission efficiency.

[0122] In the message forwarding system 10, after determining the path (such as the first target path, the second target path, and the third target path) for forwarding the message, any switch can further select a virtual channel for transmitting the message on the path. Any switch can preferentially select an unoccupied virtual channel on the path to transmit the message, or select a virtual channel on the path with a smaller number of messages being transmitted to transmit the message.

[0123] In the embodiment of the present application, in the first subsystem 100, the primary switch 110 and the secondary switch 120 can select a virtual channel to transmit a message according to the first channel selection strategy. Between the first subsystem 100 and the second subsystem 200, the secondary switch 120 and the second subsystem 200 (the switch 210 in the second subsystem 200) select a virtual channel to transmit a message according to the second channel selection strategy. The first channel selection strategy and the second channel selection strategy are different. That is, the selection strategy of the virtual channel is different inside the first subsystem 100 and outside the first subsystem 100.

[0124] The path between two switches includes multiple virtual channels that can be set with channel numbers 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 strategy and the second channel selection strategy describe the rules that need to be followed in selecting the channel number.

[0125] For example, in the first subsystem 100, the first channel selection strategy requires that the channel number of the virtual channel be determined in ascending order. This means that in the message forwarding within the first subsystem 100, the channel number of the virtual channel selected by the primary switch 110 and the secondary switch 120 for transmitting the message needs to be larger than the channel number of the virtual channel for receiving the message, that is, to ensure that the channel number of the virtual channel is increasing during the message forwarding process within the first subsystem 100. Between the first subsystem 100 and the second subsystem 200, the second channel selection strategy requires that the channel number of the virtual channel be determined in descending order. This means that in the message forwarding between the first subsystem 100 and the second subsystem 200, the channel number of the virtual channel selected by the secondary switch 120 and the switch of the second subsystem 200 for transmitting the message needs to be smaller than the channel number of the virtual channel for receiving the message.

[0126] 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 transmission path of the message is primary switch 110A->primary switch 110B->primary switch 110C->secondary switch 120E. When the primary switch 110A forwards the message to the primary switch 110B, the channel number of the virtual channel selected is 0, then the channel number of the virtual channel selected by the primary switch 110B when forwarding the message to the primary switch 110C needs to be greater than 0. Assuming that the channel number of the virtual channel selected by the primary switch 110B when forwarding the message to the primary switch 110C is 1, then the channel number of the virtual channel selected by the primary switch 110C when forwarding the message to the secondary switch 120E needs to be 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.

[0127] When the secondary switch 120E needs to send the message to the switch in the second subsystem 200, it is necessary to select the channel number of the virtual channel in descending order. That is, 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 needs to 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 a message to the secondary switch 120 in another first subsystem 100, it is also necessary to select the channel number of the virtual channel in descending order. 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 needs to 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.

[0128] For another example, in the first subsystem 100, the first channel selection strategy requires that the channel number of the virtual channel be determined by maintaining the same channel number. This means that in the message forwarding within the first subsystem 100, the channel number of the virtual channel selected by the primary switch 110 and the secondary switch 120 for transmitting the message is always the same. Between the first subsystem 100 and the second subsystem 200, the second channel selection strategy requires that the channel number of the virtual channel be determined in ascending order. This means that in the message forwarding between the first subsystem 100 and the second subsystem 200, the channel number of the virtual channel selected by the secondary switch 120 and the switch of the second subsystem 200 for transmitting the message needs to be larger than the channel number of the virtual channel for receiving the message.

[0129] 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 transmission path of the message is primary switch 110A->primary switch 110B->primary switch 110C->secondary switch 120E. When the primary switch 110A forwards the message to the primary switch 110B, the channel number of the virtual channel selected is 0. Then, when the primary switch 110B forwards the message to the primary switch 110C, the channel number of the virtual channel selected is equal to 0. When the primary switch 110C forwards the message to the secondary switch 120E, the channel number of the virtual channel selected also needs to be equal to 0. This ensures that the channel number of the virtual channel of the message in the first subsystem 100 is always the same.

[0130] When the secondary switch 120E needs to send the message to the switch in the second subsystem 200, it is necessary to select the channel number of the virtual channel in ascending order. That is, 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 needs to be greater than 0. Assume that 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 a message to the secondary switch 120 in another first subsystem 100, it is also necessary 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 needs to 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.

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

[0132] The following describes the message transfer process in the message forwarding system 10. Figure 7 The above is a message forwarding method provided by an embodiment of the present application. The method comprises:

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

[0134] 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. The computing device indicated by the destination address of the message is referred to as the target computing device.

[0135] Step 703: The primary switch 110 sends the message to another computing device connected to the primary switch 110.

[0136] 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.

[0137] The present application does not limit the manner in 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 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 ​​in the IP address can characterize 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 primary 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, it means that the primary switch 110 of the destination computing device and the primary 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 whether the destination computing device is the address of the computing device connected to each first-level switch 110 in the first subsystem 100 according to the address of the destination computing device. 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.

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

[0139] Step 706: The primary 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.

[0140] 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.

[0141] Step 708: The primary 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 calling the ECMP algorithm and one or more second paths determined by querying the second path table.

[0142] Steps 705 to 706 and steps 707 to 708 are only described in a specific way of querying the first routing table and the second routing table. In fact, the embodiment of the present application does not limit the way 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 is located in the same first subsystem 100 as the first-level switch 110, 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 path and second path according to the adaptive routing algorithm.

[0143] Step 709: The primary switch 110 forwards the message according to the first target path. If the next hop of the primary switch 110 in the first target path is the primary switch 110 to which the primary switch 110 is connected, and the connected primary switch 110 is similar to the primary switch 110, steps 702 to 709 are executed. For details, please refer to the above content, which will not be repeated here. If the next hop of the primary switch 110 in the first target path is the secondary switch 120 to which the primary switch 110 is connected, the secondary switch 120 executes step 710.

[0144] 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, execute step 711, otherwise execute step 713. The way in 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 similar to the way in 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, and the details can be referred to the above content, which will not be repeated here.

[0145] 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.

[0146] 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.

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

[0148] Steps 711 to 712 and step 713 are only described in a specific way of querying the third routing table and the fourth routing table. In fact, the embodiment of the present application does not limit the way 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.

[0149] Step 714: The secondary switch 120 forwards the message according to the second target path. If the next hop of the secondary switch 120 in the second target path is the primary switch 110 connected to the secondary switch 120, the connected primary switch 110 is similar to the aforementioned primary switch 110, and steps 702 to 709 are executed. For details, please refer to the aforementioned content, which will not be repeated here. If the next hop of the secondary switch 120 in the first target path is the switch in the second subsystem 200 connected to the secondary switch 120, the switch 210 in the second subsystem 200 executes step 715.

[0150] 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.

[0151] Step 716: The switch 210 in the second subsystem 200 forwards the message 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 connected to the switch, the other switch 210 in the second subsystem 200 connected to the switch 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 the secondary switch 120 connected to the primary switch, the secondary switch 120 is similar to the secondary switch 120 mentioned above, and steps 710 to 714 can be performed.

[0152] like Figure 8 As shown, it is a structural diagram of a switching device provided in an embodiment of the present application. The switching device 800 can have the functions of the aforementioned primary switch 110, secondary switch, or switch 210 in the second subsystem 200.

[0153] 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 may be connected via a bus, which may be a peripheral component interconnect express (PCIe) bus, or a compute express link (CXL), a universal serial bus (USB) protocol, or other protocol bus. The power supply circuit 820 is used to supply power to the processor 810.

[0154] The processor 810 is the computing core and control core of the switching device, which can be a central processing unit (CPU) or other specific integrated circuits. The processor 810 can 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, discrete hardware components, etc.

[0155] The memory 830 is usually used to store the relevant computer program instructions and routing tables in the switching device. The memory 830 usually adopts 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 a read-only memory (ROM). As for the read-only memory, for example, it can be a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), etc. The memory 830 can also be a dual in-line memory module or a dual in-line memory module (DIMM), a flash memory medium (FLASH), etc.

[0156] 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.

[0157] The processor 810 can directly run the 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.

[0158] Based on the same inventive concept as the method embodiment, the embodiment of the present application also provides a switching device, which is used to execute the method executed by the primary switch 110, the secondary switch, or the switch 210 in the second subsystem 200 in the above embodiment. The relevant features can be found in the above method embodiment and will not be repeated here. Fig. 9 As shown, the switching device 900 includes a forwarding module 901 and a routing module 902 .

[0159] The forwarding module 901 is used to send and receive messages. For example, the forwarding module 901 can forward messages according to a first target path. For another example, the forwarding module 901 can forward messages according to a second target path. For another example, the forwarding module 901 can forward messages according to a third target path.

[0160] The routing module 902 is used to determine a transmission path for the message, and the transmission path can be a first target path, a second target path, and a third target path. The way in which the routing module 902 determines the transmission path can refer to the way in which the first-level switch 110 determines the first target path, the second-level switch 120 determines the second target path, and the switch 210 determines the third target path in the above description, which will not be repeated here.

[0161] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The functional modules in the embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0162] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by 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 process or function described in the embodiment of the present invention is 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 computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by 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 one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).

[0163] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may 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 may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0164] 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 process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart 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 generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0165] These computer program instructions may also be stored in a computer readable memory capable of directing 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 an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0166] 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, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0167] Obviously, those skilled in the art can 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 also intended to include these modifications and variations.

Claims

1. A message forwarding system, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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 of claim 13, It is 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 of claim 15, It is characterized in that 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 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 of claim 16, It is 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, It is 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.

19. The method of claim 17, It is 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, It is 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.

21. The method according to any one of claims 12 to 20, It is 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, It is 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.