Routing method and data forwarding system

By defining the opposite transmission direction in the ring network, the data out-of-order problem caused by data traffic equalization between the four nodes of the ring interconnect is solved, which simplifies the implementation complexity and is suitable for multicast data forwarding.

CN116349208BActive Publication Date: 2025-02-14HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080105269.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-25
Publication Date
2025-02-14
Estimated Expiration
2040-09-25

AI Technical Summary

Technical Problem

The existing routing rules between the four nodes connected to the ring are balanced when data traffic between diagonal nodes may cause the data received by the destination node to be out of order, increasing the implementation complexity.

Method used

A routing method is provided to directly transmit data along the direction of the ring network by defining opposite transmission directions (first direction and second direction) in the ring network, avoiding data shunt and traffic equalization between diagonal nodes.

Benefits of technology

This method simplifies the implementation complexity of ring interconnect nodes while avoiding interconnect bus congestion and is suitable for forwarding of multicast data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116349208B_ABST
    Figure CN116349208B_ABST
Patent Text Reader

Abstract

The present application discloses a routing method and a data forwarding system, which relate to the field of data processing. The method is applied to a ring network composed of at least 4 nodes, wherein the at least 4 nodes include a first node and a second node adjacent to each other. The method comprises: the first node obtains the first data to be sent, the destination node of the first data to be sent is the first destination node, and the first destination node is not adjacent to the first node; the first node sends all the first data to be sent along the first direction in the ring network; the second node obtains the second data to be sent, the destination node of the second data to be sent is the second destination node, and the second destination node is not adjacent to the second node; the second node sends all the second data to be sent along the second direction in the ring network, and the first direction is opposite to the second direction. By using this method, when the ring network composed of the aforementioned at least 4 nodes transmits data, there will be no congestion of the interconnection bus between nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing, and in particular to a routing method and a data forwarding system. Background Art

[0002] At present, in scenarios where interconnection complexity is relatively sensitive, such as the interconnection between different dies in the same chip package (packagc), or the interconnection between different chips on the same printed circuit board (PCB), the interconnection between four nodes is generally a ring interconnection. The typical feature of a ring interconnection is that the interconnection between two adjacent nodes that are directly interconnected is bidirectional. For example, for the four nodes of node A, node B, node C, and node D that adopt a ring interconnection, the specific connection relationship can be: node A is interconnected with node B, node B is interconnected with node C, node C is interconnected with node D, and node D is interconnected with node A. Taking the interconnection between node A and node B as an example, there is a connection from node A to node B, and there is also a connection from node B to node A.

[0003] The existing routing rules between the four nodes interconnected by the ring are generally: data between two adjacent nodes that are directly interconnected are sent directly. For example, node A can send data to node B at line speed R rate. Data between two diagonal nodes that are indirectly interconnected (or not directly interconnected) needs to be distributed (traffic distribution), or, it can also be called load balancing (LB). For example, when node A sends data to node C, 50% of the data can be forwarded to node C through node B, and the other 50% of the data can be forwarded to node C through node D. Through the aforementioned routing rules, it can usually be guaranteed that the data between the four nodes interconnected by the ring can pass through each node without blocking.

[0004] However, in the above existing routing rules for the four nodes interconnected by the ring, LB is performed on the data between the diagonal nodes, which may cause the data received by the destination node to be out of order, and the destination node needs to reorder the received data, which increases the implementation complexity. For example, suppose that the data sent by node A to node C includes two messages P1 and P2 that need to be guaranteed in order, such as: P1 is before P2; when LB is performed on the data, P1 is forwarded to node C through node B, and P2 is forwarded to node C through node D. Then, due to the different data traffic states inside nodes B and D, the processing delays of P1 and P2 may be different, resulting in node C receiving P2 first and then P1. At this time, node C needs to reorder P1 and P2. Summary of the invention

[0005] The embodiment of the present application provides a routing method and a data forwarding system. When four nodes are connected in a ring interconnection manner and the ports of all nodes have no egress competition, the method can avoid interconnection bus congestion while simplifying the implementation complexity of the four nodes interconnected in a ring. In addition, the method is also applicable to the forwarding of multicast data.

[0006] In a first aspect, an embodiment of the present application provides a routing method, which is applied to a ring network composed of at least 4 nodes, wherein the at least 4 nodes include a first node and a second node, and the first node and the second node are adjacent. The method includes: the first node obtains first data to be sent, the destination node of the first data to be sent is the first destination node, and the first destination node is not adjacent to the first node. The first node sends all the first data to be sent along a first direction in the ring network. The second node obtains second data to be sent, the destination node of the second data to be sent is the second destination node, and the second destination node is not adjacent to the second node; the second node sends all the second data to be sent along a second direction in the ring network, and the first direction and the second direction are opposite.

[0007] In this method, the first node sends data to the first destination node along the first direction in the ring network; the second node sends data to the second destination node along the second direction in the ring network, and the first direction is opposite to the second direction; therefore, when data is transmitted between nodes, there will be no congestion of the interconnection bus. In addition, since there is no need to perform LB on the data, there is no need for the node to reorder the received data, thereby simplifying the implementation complexity of the node.

[0008] In a possible design, the ring network includes only four nodes, the first destination node is a diagonal node of the first node, and the second destination node is a diagonal node of the second node.

[0009] Alternatively, in some embodiments, the application scenario of the method may include other I / O nodes in addition to the ring network, which is not limited here.

[0010] In one possible design, the method further includes: the first node obtains third data to be sent, the destination node of the third data to be sent is the second node; the first node sends all the third data to be sent directly to the second node. The second node obtains fourth data to be sent, the destination node of the fourth data to be sent is the first node; the second node sends all the fourth data to be sent directly to the first node.

[0011] That is, in this method, data between two adjacent nodes (such as the first node and the second node) can be sent directly.

[0012] In a possible design, the first direction is clockwise, and the second direction is counterclockwise.

[0013] In another possible design, the first direction is counterclockwise, and the second direction is clockwise.

[0014] In a possible design, the method further includes: when the first node sends data (such as the first data to be sent) to the diagonal node of the first node along the first direction, the second node located in the first direction of the first node copies the data. And / or, when the second node sends data (such as the second data to be sent) to the diagonal node of the second node along the second direction, the first node located in the second direction of the second node copies the data.

[0015] This design can be applied to multicast scenarios to realize the sending of multicast data.

[0016] Taking feasibility into consideration, in one possible design, each of the four nodes in the ring network includes a plurality of interconnected sub-nodes, the sub-nodes included in any two nodes correspond one-to-one, and the sub-nodes included in two adjacent nodes are interconnected one-to-one.

[0017] In this design, the first node directly sends all the third data to be sent to the second node, including: when the sending subnode in the first node corresponds to the receiving subnode in the second node, the sending subnode directly sends all the third data to be sent to the receiving subnode. The second node directly sends all the fourth data to be sent to the first node, including: when the sending subnode in the second node corresponds to the receiving subnode in the first node, the sending subnode directly sends all the fourth data to be sent to the receiving subnode.

[0018] Optionally, the first node sends all the third data to be sent directly to the second node, and further includes: if the second node is located in the first direction of the first node, and the sending subnode in the first node does not correspond to the receiving subnode in the second node, the sending subnode sends all the third data to be sent to the receiving subnode via the subnode in the second node corresponding to the sending subnode. The second node sends all the fourth data to be sent directly to the first node, and further includes: if the second node is located in the first direction of the first node, and the sending subnode in the second node does not correspond to the receiving subnode in the first node, the sending subnode sends all the fourth data to be sent to the receiving subnode via the subnode in the first node corresponding to the sending subnode.

[0019] Optionally, the first node sends all the third data to be sent directly to the second node, and further includes: if the second node is located in the second direction of the first node, and the sending subnode in the first node does not correspond to the receiving subnode in the second node, the sending subnode sends all the third data to be sent to the receiving subnode via the subnode in the first node corresponding to the receiving subnode. The second node sends all the fourth data to be sent directly to the first node, and further includes: if the second node is located in the second direction of the first node, and the sending subnode in the second node does not correspond to the receiving subnode in the first node, the sending subnode sends all the fourth data to be sent to the receiving subnode via the subnode in the second node corresponding to the receiving subnode.

[0020] Optionally, the first node sends all the first data to be sent along the first direction in the ring network, including: the sending subnode in the first node sends all the first data to be sent to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode in the second node in the first direction of the first node; wherein the receiving subnode corresponds to the sending subnode. And / or, the sending subnode in the first node sends all the first data to be sent to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode and the subnode corresponding to the receiving subnode in the second node in the first direction of the first node in sequence; wherein the receiving subnode does not correspond to the sending subnode.

[0021] Optionally, the second node sends all the second data to be sent along the second direction in the ring network, including: the sending subnode in the second node sends all the second data to be sent to the receiving subnode in the diagonal node of the second node via the subnode corresponding to the sending subnode in the first node in the second direction of the second node; wherein the receiving subnode corresponds to the sending subnode. And / or, the sending subnode in the second node sends all the second data to be sent to the receiving subnode in the diagonal node of the second node via the subnode corresponding to the sending subnode and the subnode corresponding to the receiving subnode in the first node in the second direction of the second node; wherein the receiving subnode does not correspond to the sending subnode.

[0022] This design can be applied to the scenario where four nodes are interconnected by a ring, and each node may actually be composed of multiple sub-nodes with lower bandwidth.

[0023] In a second aspect, an embodiment of the present application provides a data forwarding system, comprising at least 4 nodes, the at least 4 nodes forming a ring network, the at least 4 nodes including a first node and a second node, the first node and the second node being adjacent. The first node is used to obtain first data to be sent, the destination node of the first data to be sent is the first destination node, the first destination node is not adjacent to the first node; all the first data to be sent are sent along a first direction in the ring network. The second node is used to obtain second data to be sent, the destination node of the second data to be sent is the second destination node, the second destination node is not adjacent to the second node; all the second data to be sent are sent along a second direction in the ring network, the first direction and the second direction are opposite.

[0024] The data forwarding system can be a CPU system composed of four CPUs, or a server system composed of four servers, or a larger computing system or transmission system composed of four server systems, etc. Alternatively, the data forwarding system can also be a switching chip composed of multiple sub-units, a chip system composed of different chips on a PCB, a system composed of different network devices, etc.

[0025] In a possible design, the ring network includes only four nodes, the first destination node is a diagonal node of the first node; and the second destination node is a diagonal node of the second node.

[0026] In a possible design, the first node is further used to obtain third data to be sent, the destination node of the third data to be sent is the second node; and all the third data to be sent are directly sent to the second node. The second node is further used to obtain fourth data to be sent, the destination node of the fourth data to be sent is the first node; and all the fourth data to be sent are directly sent to the first node.

[0027] In a possible design, each of the four nodes in the ring network includes a plurality of interconnected subnodes, the subnodes included in any two nodes correspond one to one, and the subnodes included in two adjacent nodes correspond one to one to each other. The first node is specifically used to send all third to-be-sent data directly to the receiving subnode through the sending subnode when the sending subnode in the first node corresponds to the receiving subnode in the second node. The second node is specifically used to send all fourth to-be-sent data directly to the receiving subnode through the sending subnode when the sending subnode in the second node corresponds to the receiving subnode in the first node.

[0028] In a possible design, the first node is further used to send all third to-be-sent data to the receiving subnode through the sending subnode via the subnode corresponding to the sending subnode in the second node if the second node is located in the first direction of the first node and the sending subnode in the first node does not correspond to the receiving subnode in the second node. The second node is further used to send data to the receiving subnode through the sending subnode via the subnode corresponding to the sending subnode in the first node if the second node is located in the first direction of the first node and the sending subnode in the second node does not correspond to the receiving subnode in the first node.

[0029] In a possible design, the first node is further used to send all third to-be-sent data to the receiving subnode through the sending subnode via the subnode corresponding to the receiving subnode in the first node if the second node is located in the second direction of the first node and the sending subnode in the first node does not correspond to the receiving subnode in the second node. The second node is further used to send data to the receiving subnode through the sending subnode via the subnode corresponding to the receiving subnode in the second node if the second node is located in the second direction of the first node and the sending subnode in the second node does not correspond to the receiving subnode in the first node.

[0030] In a possible design, the first node is specifically used to send all first data to be sent to a receiving subnode in a diagonal node of the first node through a sending subnode in the first node, via a subnode corresponding to the sending subnode in a second node in a first direction of the first node; wherein the receiving subnode corresponds to the sending subnode. And / or, the first node is used to send all first data to be sent to a receiving subnode in a diagonal node of the first node through a sending subnode in the first node, via a subnode corresponding to the sending subnode and a subnode corresponding to the receiving subnode in a second node in a first direction of the first node in sequence; wherein the receiving subnode does not correspond to the sending subnode.

[0031] In a possible design, the first node is specifically configured to send all second data to be sent to a receiving subnode in a diagonal node of the second node through a sending subnode in the second node, via a subnode in the first node in the second direction of the second node corresponding to the sending subnode; wherein the receiving subnode corresponds to the sending subnode. And / or, send all second data to be sent to a receiving subnode in a diagonal node of the second node through a sending subnode in the second node, via a subnode in the first node in the second direction of the second node corresponding to the sending subnode and a subnode corresponding to the receiving subnode; wherein the receiving subnode does not correspond to the sending subnode.

[0032] As can be seen from the above, each node in the data forwarding system described in the second aspect routes data according to the routing method described in the first aspect. Therefore, the beneficial effects of the second aspect can be referred to in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram showing the interconnection of four node rings is shown;

[0034] Figure 2 A schematic diagram showing the interconnection of four node meshes is shown;

[0035] Figure 3 A schematic diagram of ring interconnection in a switching chip is shown;

[0036] Figure 4 Another schematic diagram showing the interconnection of four node rings;

[0037] Figure 5 A schematic diagram showing the routing direction in the four node ring interconnection provided by an embodiment of the present application;

[0038] Figure 6 Another schematic diagram showing the routing direction in the four-node ring interconnection provided by an embodiment of the present application;

[0039] Figure 7 Another schematic diagram showing the interconnection of four node rings;

[0040] Figure 8 Another schematic diagram showing the interconnection of four node rings. DETAILED DESCRIPTION

[0041] In the network field or computing-related fields, there are often scenarios where different nodes are interconnected. In the interconnection between different dies in the same chip package, each die can be considered a node. Or, in the interconnection between different chips on the same printed circuit board (PCB), each chip can be considered a node. Or, when different network devices in the network are interconnected to exchange data, each network device can be considered a node, etc.

[0042] In the above node interconnection scenario, the interconnection between the four nodes usually includes two interconnection modes: ring interconnection and mesh interconnection. The following takes the interconnection between four nodes A, B, C and D as an example to briefly introduce the two interconnection modes of ring interconnection and mesh interconnection.

[0043] Figure 1Figure 1 shows a schematic diagram of four node rings interconnected. Figure 1 As shown, for the four nodes A, B, C, and D that are interconnected by a ring, two adjacent nodes can be interconnected in pairs, thereby forming a ring structure as a whole. Figure 1 The specific connection relationship given as an example is: node A is interconnected with node B, node B is interconnected with node C, node C is interconnected with node D, and node D is interconnected with node A. R represents the input / output (I / O) port rate. Taking the interconnection between node A and node B as an example, there is a connection from node A to node B, and there is also a connection from node B to node A. That is, among the four nodes interconnected by ring, the interconnection between two adjacent nodes directly interconnected is bidirectional.

[0044] Figure 2 Figure 2 shows a schematic diagram of four node mesh interconnections. Figure 2 As shown. For the four nodes A, B, C, and D that use mesh interconnection, each of them is directly interconnected with the other three nodes, such as: Node A is interconnected with Node B, Node C, and Node D respectively. r represents the I / O port rate. For the four nodes that use mesh interconnection, the interconnection between any two nodes is bidirectional.

[0045] Please also refer to Figure 1 and Figure 2 , by comparison Figure 1 and Figure 2 It can be learned that: Figure 1 In the ring interconnection shown in the figure, the diagonal nodes such as node A and node C, node B and node D are not directly connected to each other. Figure 2 In the mesh interconnection mode shown, diagonal nodes such as node A and node C, node B and node D are directly interconnected. Figure 1 In the ring interconnection method shown, the interconnection complexity is lower.

[0046] Therefore, for scenarios where interconnection complexity is sensitive, such as the interconnection between different dies in the same chip package mentioned above, or the interconnection between different chips on the same PCB, the interconnection between four or more nodes is generally similar to Figure 1 The ring interconnection method shown.

[0047] For example, Figure 3 FIG. 1 shows a schematic diagram of the ring interconnection in a switching chip. Figure 3 As shown in Figure 1, a large-capacity switch chip can be composed of four identical small-capacity sub-units (chiplets), which can also be called small chips. Figure 3 Taking the switch chip with a capacity of 50 terabits per second (Tbps) as an example, the switch chip can be composed of 4 chiplets with a capacity of 12.8 Tbps each, that is, the capacity of each chiplet is 12.8 Tbps. The 4 chiplets can be named A, B, C, and D in sequence. The 4 chiplets can be interconnected in a ring, that is, A is connected to B, B is connected to C, C is connected to D, and D is connected to A.

[0048] For mesh interconnection, the routing mechanism between any two nodes is generally direct. For example, if node A wants to send data to node C, it can be sent directly through the direct bus between node A and node C. Of course, in some possible implementations, depending on the bandwidth of the interconnection bus, if the bandwidth between the two nodes is not less than the I / O bandwidth of the nodes (for example, Figure 2 As shown in the figure, each connection is r), then the direct bus is usually selected for transmission. However, when the interconnection bus between two nodes is less than r, it may also need to be sent through other nodes to ensure the line rate.

[0049] For ring interconnection, two directly connected nodes can directly send data through the direct bus, but two nodes that are not directly connected (such as Figure 1 When data is sent between nodes A and C (as shown in FIG), it must be forwarded through other intermediate nodes, such as: when node A needs to send data to node C, it needs to be forwarded to node C through node B and / or node D. Assuming that when node A needs to send data to node C, all data is forwarded to node C through node B. At this time, if node B also needs to send data to node C, the path between node B and node C will contain data that node A needs to send to node C and data that node B needs to send to node C, which may cause congestion of the interconnection bus between node B and node C. Therefore, when the interconnection between four nodes adopts a ring interconnection method, a routing mechanism needs to be considered to avoid congestion of the interconnection bus.

[0050] Avoiding interconnect bus congestion means that when there is no output contention (or, oversubscription) at the ports of all nodes, after adopting the specified routing mechanism, any traffic distribution will not cause the data traffic to be sent to accumulate in the node due to exceeding the internal interconnect bus bandwidth. Output contention means that the sum of the ingress traffic to a certain output port exceeds the bandwidth of the output port. Traffic distribution refers to the traffic pattern (traffic pattern) of data traffic sent from any source node to any destination node.

[0051] The existing routing rules for the four nodes interconnected by the ring are generally: data between two adjacent nodes that are directly interconnected is sent directly. Data between two diagonal nodes that are indirectly interconnected (or not directly interconnected) needs to be distributed (traffic distribution), or, it can also be called load balancing (LB). Through the above routing rules, it can usually be guaranteed that the data between the four nodes of the ring interconnection can pass through each node without blocking, that is, the interconnection bus congestion can be avoided.

[0052] For example, Figure 4 Another schematic diagram showing the interconnection of four node rings is shown. Figure 4 As shown, for four nodes interconnected by ring: node A, node B, node C and node D, a possible connection mode is that node A is interconnected with node B, node B is interconnected with node C, node C is interconnected with node D, and node D is interconnected with node A. The interconnection bus between node A and node B includes: bus ab for node A to send data to node B, and bus ba for node B to send data to node A. The other nodes are similar and will not be described here.

[0053] when Figure 4 When the four nodes shown in the figure adopt the aforementioned routing rules, the direct transmission of data between two adjacent nodes that are directly interconnected refers to: the direct transmission of data between node A and node B, or node B and node C, or node C and node D, or node D and node A, for example, node A can send data to node B at R rate line speed. The need for LB of data between two diagonal nodes that are indirectly interconnected refers to: the data between node A and node C, or node B and node D is LB, for example, when node A sends data to node C, 50% of the data can be forwarded to node C through node B, and the other 50% of the data can be forwarded to node C through node D.

[0054] For example, suppose Figure 4 In the four nodes shown, the I / O port rate R of each node is 1, and there is no egress contention on the ports of all nodes. When node A needs to send data to node C, and node B needs to send data to node D, node C needs to send data to node A, and node D needs to send data to node B, that is, when nodes A, B, C, and D have data flows corresponding to nodes C, D, A, and B at the same time, the data transmission method can be as follows.

[0055] 1) Node A forwards 50% of the data to be sent to node C to node C via node B (the path is buses ab and bc), and forwards the other 50% to node C via node D (the path is buses ad and dc).

[0056] 2) Node B forwards 50% of the data to be sent to node D to node D via node A (the path is buses ba and ad), and forwards the other 50% to node D via node C (the path is buses bc and cd).

[0057] 3) Node C forwards 50% of the data that needs to be sent to node A to node A through node D (the path is buses cd and da), and forwards the other 50% to node A through node B (the path is buses cb and ba).

[0058] 4) Node D forwards 50% of the data to be sent to node B to node B via node A (the path is buses da and ab), and forwards the other 50% to node B via node C (the path is buses dc and cb).

[0059] At this time, the data traffic occupancy in the connection buses of the above four nodes can be shown in Table 1 below.

[0060] Table 1

[0061]

[0062]

[0063] In Table 1, blank or unfilled cells indicate that there is no data (or traffic) transmitted on the bus. The numbers in filled cells indicate the bandwidth occupied by the data transmitted on the bus. Taking A→C as an example, since the I / O port rate R of A is 1, node A sends half of the data destined for node C to node B via ab, and node B forwards it to node C via bc. Therefore, the data sent by node A to node C will occupy a bandwidth of 0.5 in ab.

[0064] From Table 1, we can see that when Figure 4 When the four nodes shown in the figure adopt the aforementioned routing rules, the total bandwidth of each bus does not exceed 1. Therefore, when nodes A, B, C and D have data flows corresponding to nodes C, D, A and B at the same time, the data can pass through each node without blocking.

[0065] Of course, the above-mentioned method of performing data LB at 50% is a common practice, and there may be other division methods, the principles of which are similar and will not be repeated here.

[0066] The four nodes interconnected by a ring forward data according to the above-mentioned LB routing rules. Although it can avoid congestion of the interconnection bus, in the above-mentioned existing routing rules between the four nodes interconnected by a ring, LB is performed on the data between the diagonal nodes, which may cause the data received by the destination node to be out of order, and the destination node needs to re-order the received data, which increases the implementation complexity.

[0067] For example, suppose that the data sent by node A to node C includes two messages P1 and P2 that need to be sequenced, such as: P1 is before P2; and when LB is performed on the data, P1 is forwarded to node C through node B, and P2 is forwarded to node C through node D. Then, due to the different data flow states inside nodes B and D, the processing delays of P1 and P2 may be different, and node C may receive P2 first and then P1. At this time, node C needs to reorder P1 and P2. Reordering often requires a certain buffer to store the messages that are sent last but arrived first, such as P2, and also requires corresponding processing logic management, which will lead to a high implementation complexity of node C. For the source node (such as node A sends data to node C, node A is called the source node and node C is called the destination node), since the data may be composed of large and small messages of different lengths, and the sending time of the message is uncertain, it is also a problem for the source node to evenly distribute the traffic to the adjacent nodes, which will also increase the implementation complexity of node A. In summary, the need for the four nodes interconnected by the ring to forward data according to the above LB routing rules will increase the complexity of the implementation.

[0068] In addition, for a certain source node, if there is multicast data, or multicast traffic that needs to be sent, a unicast mechanism similar to unicast is generally used for data forwarding, which may interfere with unicast. Among them, multicast data means: assuming that node A needs to fan out message P3 to two destination nodes, node B and node C, at the same time, message P3 can be understood as multicast data of node A. The unicast mechanism refers to the data sent by a certain source node mentioned above only to a certain destination node, such as: node A needs to send messages P1 and P2 to node C.

[0069] For example, if node A needs to fan out message P3 to both node B and node C, for the scenario of fanning out to node B, node A can directly send message P3 to node B. For the scenario of fanning out to node C, message P3 will be forwarded to node C by node B. In other words, message P3 that needs to fan out to node C will take the shortest path of A→B→C, and LB cannot be performed, which will cause bus congestion between node A and node B, and interfere with the message that node A needs to fan out to node B.

[0070] An embodiment of the present application provides a routing method, which is applied to a ring network composed of at least 4 nodes, wherein the at least 4 nodes include a first node and a second node, and the first node and the second node are adjacent to each other. The method includes: the first node obtains first data to be sent, the destination node of the first data to be sent is the first destination node, and the first destination node is not adjacent to the first node; the first node sends all the first data to be sent along a first direction in the ring network; the second node obtains second data to be sent, the destination node of the second data to be sent is the second destination node, and the second destination node is not adjacent to the second node; the second node sends all the second data to be sent along a second direction in the ring network, and the first direction and the second direction are opposite.

[0071] For example, the method can be applied to a scenario where four nodes are connected in a ring interconnection mode and there is no egress contention on the ports of all nodes. This method can avoid congestion of the interconnection bus between nodes while simplifying the implementation complexity of the four nodes interconnected in a ring. In addition, the method is also applicable to the forwarding of multicast data.

[0072] In a possible design, the ring network includes only four nodes, the first destination node is a diagonal node of the first node, and the second destination node is a diagonal node of the second node.

[0073] The following describes the method by taking a ring network including only four nodes as an example.

[0074] Please refer to Figure 4 As shown, a ring interconnection is adopted between node A, node B, node C and node D, node A and node C are diagonal nodes to each other, and node B and node D are diagonal nodes to each other. The first node described in the routing method provided in the embodiment of the present application can be any one of node A, node B, node C and node D. For example, when the first node is node A, the diagonal node of the first node is node C, and the adjacent nodes of the first node are node B and node D. Alternatively, when the first node is node B, the diagonal node of the first node is node D, and the adjacent nodes of the first node are node A and node C. Alternatively, the first node can also be node C and node D, which is similar to the above, and examples are not given one by one here.

[0075] In addition, it should be noted that A, B, C, D, etc. are only used to identify the node. When nodes A, B, C, and D are interconnected using other sequential rings, such as: nodes connected to node C, node C connected to node B, node B connected to node D, and node D connected to node A, the names of the first node and the diagonal nodes of the first node, as well as the adjacent nodes of the first node will change accordingly. For example, at this time, if the first node is node A, the diagonal node of the first node becomes node B, and the adjacent nodes of the first node become nodes C and node D. That is, the aforementioned Figure 4 The ring interconnection of the four nodes shown is only one interconnection order. The four nodes can also be interconnected in rings in other orders. However, no matter which order is used for interconnection, it does not affect the definition of the first node and the diagonal node of the first node, and the second node and the diagonal node of the second node in the embodiment of the present application.

[0076] It is easy to understand that the method is applied to four nodes connected in a ring. Since the first node is any one of the four nodes connected in a ring, in the routing method, when the first node and the diagonal node of the first node send data to each other (such as, in the embodiment of the present application, the diagonal node of the first node can be called the first destination node, and the data sent by the first node to the first destination node can be called the first data to be sent), the routing direction of the data is along the first direction. When the adjacent nodes of the first node, that is, the diagonal node of the second node and the diagonal node of the second node (also the adjacent nodes of the first node) send data to each other (such as, in the embodiment of the present application, the diagonal node of the second node can be called the second destination node, and the data sent by the second node to the second destination node can be called the second data to be sent), the routing direction of the data is along the second direction. Since the first direction and the second direction are opposite, there will be no congestion of the interconnection bus when the four nodes transmit data. In addition, since there is no need to perform LB on the data, there is no need for the node to reorder the received data, thereby simplifying the implementation complexity of the node.

[0077] The routing method provided in the embodiment of the present application is exemplarily described below with reference to the accompanying drawings.

[0078] It should be noted that, in the description of the present application, the words "first", "second", etc. are only used to distinguish the description and are not used to specifically limit a certain feature. In the description of the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. At least one referred to in the present application refers to one or more; multiple refers to two or more.

[0079] by Figure 4 Taking nodes A, B, C and D interconnected by a ring as shown in the figure as an example, the scenarios of sending data between the four nodes mainly include sending data between two directly connected adjacent nodes and sending data between two diagonal nodes that are not directly connected.

[0080] First, the specific application of the routing method in the scenario of sending data between two directly connected adjacent nodes is explained.

[0081] For node A and node B, node B and node C, node C and node D, and node D and node A, since the two nodes in any of the aforementioned groups are directly connected adjacent nodes, the data between node A and node B, the data between node B and node C, the data between node C and node D, and the data between node D and node A can be sent directly. Taking any one of node A, node B, node C and node D as the first node and its adjacent node as the second node as an example, it can be understood that the first node can directly send data to the second node (e.g., in the embodiment of the present application, the data sent by the first node to the second node can be referred to as the third data to be sent. The data sent by the second node to the first node can be referred to as the fourth data to be sent).

[0082] Furthermore, in the scenario of sending data between two diagonal nodes that are not directly connected, the specific application of the routing method is described.

[0083] For nodes A and C, which are diagonal nodes, since nodes A and C are not directly connected, the data between nodes A and C needs to be forwarded by an intermediate node. Similarly, for nodes B and D, which are diagonal nodes, since nodes B and D are not directly connected, the data between nodes B and D also needs to be forwarded by an intermediate node.

[0084] In the routing method, when node A needs to send data to node C, node A needs to send data to node C along the first direction via the intermediate node located in the first direction of node A. When node C needs to send data to node A, node C also needs to send data to node A along the first direction via the intermediate node located in the first direction of node C. When node B needs to send data to node D, node B needs to send data to node D along the second direction via the intermediate node located in the second direction of node B. When node D needs to send data to node B, node D also needs to send data to node B along the second direction via the intermediate node located in the second direction of node D. The first direction is opposite to the second direction. Similarly, taking any one of nodes A, B, C and D as the first node and its adjacent node as the second node as an example, it can be understood that the first node needs to send data to the diagonal node of the first node along the first direction; the second node adjacent to the first node needs to send data to the diagonal node of the second node along the second direction.

[0085] Figure 5 A schematic diagram showing the routing directions in the four-node ring interconnection provided in an embodiment of the present application is shown.

[0086] like Figure 5 As shown, in a possible design, the first direction is a clockwise direction, and the second direction is a counterclockwise direction opposite to the first direction.

[0087] In this design, when node A needs to send data to node C, node A needs to send data to node C in a clockwise direction via node B located in the clockwise direction of node A. That is, the path for node A to send data to node C is: A→B→C.

[0088] When node C needs to send data to node A, node C also needs to send data to node A in the clockwise direction via node D located in the clockwise direction of node C. That is, the path for node C to send data to node A is: C→D→A.

[0089] When node B needs to send data to node D, node B needs to send data to node D in a counterclockwise direction via node A located in the counterclockwise direction of node B. That is, the path for node B to send data to node D is: B→A→D.

[0090] When node D needs to send data to node B, node D also needs to send data to node B in the counterclockwise direction via node C located in the counterclockwise direction of node D. That is, the path for node D to send data to node B is: D→C→B.

[0091] Figure 6Another schematic diagram of the routing direction in the four-node ring interconnection provided by an embodiment of the present application is shown.

[0092] like Figure 6 As shown, in another possible design, the first direction is a counterclockwise direction, and the second direction is a clockwise direction opposite to the first direction.

[0093] In this design, when node A needs to send data to node C, node A needs to send data to node C in a counterclockwise direction via node D located in the counterclockwise direction of node A. That is, the path for node A to send data to node C is: A→D→C.

[0094] When node C needs to send data to node A, node C also needs to send data to node A in the counterclockwise direction via node B located in the counterclockwise direction of node C. That is, the path for node C to send data to node A is: C→B→A.

[0095] When node B needs to send data to node D, node B needs to send data to node D in a clockwise direction via node C located in the clockwise direction of node B. That is, the path for node B to send data to node D is: B→C→D.

[0096] When node D needs to send data to node B, node D also needs to send data to node B in the clockwise direction via node A located in the clockwise direction of node D. That is, the path for node D to send data to node B is: D→A→B.

[0097] Assume that the above Figure 5 In the ring-interconnected nodes A, B, C and D shown in the figure, the connection between node A and node B, and the connection between node C and node D are defined as rows, and the connection between node A and node D, and the connection between node B and node C are defined as columns. The routing method can also be simplified or simply understood as: nodes A, B, C and D follow the routing rule of "data between adjacent nodes are sent or reached directly, and data between diagonal nodes are first sent horizontally (horizontally refers to rows) and then vertically (vertically refers to columns)".

[0098] For example, when node A sends data to node C: first horizontal means node A sends data to node B, and then vertical means node B forwards data to node C. Or, when node B sends data to node D: first horizontal means node B sends data to node A, and then vertical means node A forwards data to node D. Or, when node D sends data to node B: first horizontal means node D sends data to node C, and then vertical means node C forwards data to node B.

[0099] Similarly, assuming that Figure 6In the ring-interconnected nodes A, B, C and D shown in the figure, the connection between node A and node B, and the connection between node C and node D are defined as rows, and the connection between node A and node D, and the connection between node B and node C are defined as columns. The routing method can also be simplified or simply understood as: nodes A, B, C and D follow the routing rule of "data between adjacent nodes are sent or reached directly, and data between diagonal nodes are first sent vertically (vertical refers to columns) and then horizontally (horizontal refers to rows)".

[0100] For example, when node A sends data to node C: the vertical line first means node A sends data to node D, and the horizontal line later means node D forwards data to node C. Or, when node B sends data to node D: the vertical line first means node B sends data to node C, and the horizontal line later means node C forwards data to node D. Or, when node D sends data to node B: the vertical line first means node D sends data to node A, and the horizontal line later means node A forwards data to node B.

[0101] When the routing method adopts the above Figure 5 or Figure 6 In any of the routing directions shown, the next hop node of any column bus (for example, the next hop node of bus ad is node D) must be the destination of all traffic on the column bus. Since there is no egress competition, the bandwidth of the column bus will not exceed. The previous hop node of any row bus (for example, the previous hop node of bus ab is node A) must be the source of all traffic on the row bus. Since the source traffic cannot exceed 1, the bandwidth of the row bus will not exceed.

[0102] Therefore, for the four nodes interconnected by the ring, when there is no egress competition at the egress port, the routing method provided by the embodiment of the present application can avoid interconnection bus congestion without LB. Since the nodes do not need to perform LB, there is no need to perform reordering, thereby simplifying the implementation complexity of the four nodes interconnected by the ring.

[0103] The above embodiment mainly introduces the routing method provided by the embodiment of the present application in the scenario of sending data from a source node to a single target node, that is, a unicast scenario. The following introduces the application of the routing method provided by the embodiment of the present application in a multicast scenario.

[0104] by Figures 4 to 6 Taking the nodes A, B, C and D shown in any of the figures as an example, assuming that node A needs to fan out multicast message P to nodes B and D at the same time, at this time, since nodes B and D are directly connected to node A and are adjacent nodes of node A, node A can directly fan out multicast message P to nodes B and D at the same time.

[0105] When node A needs to fan out multicast message P to node B and node C at the same time, node B is directly connected to node A, and node A can directly fan out multicast message P to node B. However, node C is a diagonal node of node A, so node A needs to forward multicast message P to node C via an intermediate node. For example, when node A is the first node and the first direction is clockwise, node A needs to forward multicast message P to node C via node B located in the clockwise direction of node A. When node A is the first node and the first direction is counterclockwise, node A needs to forward multicast message P to node C via node D located in the counterclockwise direction of node A.

[0106] That is, in the routing method, when the destination nodes to which the multicast message of the source node needs to be fanned out include the adjacent nodes of the source node, the source node can directly fan out the multicast message to the adjacent nodes. When the destination nodes to which the multicast message of the source node needs to be fanned out include the diagonal nodes of the source node, the source node can fan out the multicast message to the diagonal nodes via the intermediate nodes according to the data routing direction of the first node or the second node (depending on whether the source node is the first node or the second node) in the routing method.

[0107] Optionally, for a scenario where the destination nodes to which the multicast message of the source node needs to be fanned out include the adjacent nodes of the source node and the diagonal nodes of the source node, and the source node forwards the multicast message to the diagonal nodes via the adjacent nodes, the source node only needs to fan out the multicast message to the adjacent nodes once, and the adjacent nodes can retain (e.g., copy) a copy for themselves before forwarding the multicast message to the diagonal nodes of the source node. For example, when the source node fans out the multicast message to the adjacent nodes, an indication information can be added to the message, indicating that the message is sent to the adjacent nodes and the diagonal nodes of the source node at the same time, so that the adjacent nodes can retain a copy for themselves before forwarding the multicast message to the diagonal nodes of the source node.

[0108] Likewise Figures 4 to 6 Take the nodes A, B, C and D shown in the figure as an example, which are interconnected by a ring. Assume that node A needs to fan out multicast message P to nodes B and C at the same time. At this time, node A can send multicast message P to node B only once, and node B can forward the multicast message P to node C. However, before forwarding, node B will also retain a copy of multicast message P, so that node A can fan out multicast message P to nodes B and C at the same time.

[0109] Similarly, for any one of node A, node B, node C and node D, the aforementioned routing rules are followed. That is, when the routing method provided in the embodiment of the present application is applied to a multicast scenario, it can be understood that: when a first node sends data to a diagonal node of the first node along a first direction, a second node located in the first direction of the first node copies the data.

[0110] For example, when the first node needs to send data to the second node located in the first direction of the first node and the diagonal node of the first node at the same time, the first node directly sends the data to the second node located in the first direction of the first node, and the second node forwards the data to the diagonal node of the first node, and at the same time, copies and retains the data before forwarding.

[0111] Optionally, in the routing method provided in the embodiment of the present application, since the path between any two nodes in the four nodes interconnected by the ring is unique and fixed, it is also convenient to implement some enhanced functions. Figure 3 When switching chiplets in the shown switching chip, it is also possible to perform cut-through operations between chiplets to reduce switching latency. In the traditional LB method, the cut-through operation is complicated due to the existence of multiple paths. Therefore, the unique fixed path between nodes in this routing method also helps to simplify the complexity of the cut-through operation.

[0112] In some embodiments, considering feasibility, for four nodes interconnected by a ring, each node may actually be composed of multiple sub-nodes with lower bandwidth, such as N sub-nodes, where N may be a positive integer greater than 1, such as 2, 3, 4, etc. For example, Figure 7 Another schematic diagram showing the interconnection of four node rings.

[0113] like Figure 7 As shown, taking node A among nodes A, B, C, and D interconnected by ring as an example, node A may actually be composed of four sub-nodes, namely, sub-node A0, sub-node A1, sub-node A2, and sub-node A3. Assuming that the total external bandwidth of node A is R, the bandwidth of each sub-node constituting node A is r, and R=4r. For example, when R is 12.8Tbps, r is 3.2Tbps. Similarly, node B, node C, and node D are also composed of multiple sub-nodes. For example, node B is composed of four sub-nodes, namely, sub-node B0, sub-node B1, sub-node B2, and sub-node B3; node C is composed of four sub-nodes, namely, sub-node C0, sub-node C1, sub-node C2, and sub-node C3; node D is composed of four sub-nodes, namely, sub-node D0, sub-node D1, sub-node D2, and sub-node D3, etc. (the sub-nodes of node B, node C, and node D are not shown in the figure).

[0114] For example, when the four nodes interconnected by the ring are four chips, the subnodes included in each node may be the die in the chip. Alternatively, when the four nodes interconnected by the ring are four network devices, the subnodes included in each node may be the chips in the network devices. Alternatively, when the four nodes interconnected by the ring are four servers in a data forwarding system, the subnodes included in each node may be the processors in the servers, etc. Other scenarios will not be described one by one here.

[0115] When each of the four nodes in the ring interconnection consists of multiple sub-nodes, the bus between two adjacent directly connected nodes may actually consist of multiple sub-buses with lower bandwidth. Figure 7 As shown in the figure, taking bus ab where node A sends data to node B as an example, bus ab may actually be composed of four sub-buses ab0, ab1, ab2, and ab4. Assuming that the bandwidth of each sub-bus is r, the total bandwidth of bus ab is: R = 4r. For example, if r is 3.2Tbps, then R is 12.8Tbps. Each sub-node in node A corresponds to a sub-bus, such as: sub-node A0 corresponds to sub-bus ab0, sub-node A1 corresponds to sub-bus ab1, sub-node A2 corresponds to sub-bus ab2, and sub-node A3 corresponds to sub-bus ab3.

[0116] Similar to Figure 7 For the node A shown in FIG, for any one of the four nodes interconnected by the ring, the multiple sub-nodes in the node can be directly connected through the internal bus to achieve non-blocking exchange of traffic between the sub-nodes. Alternatively, in some other implementations, the multiple sub-nodes in each node can also achieve non-blocking exchange of traffic between the sub-nodes through dedicated switching logic (e.g., connected through a separate switching module).

[0117] The connection relationship of the sub-nodes of other nodes and the corresponding sub-buses are similar to those of node A and will not be described in detail.

[0118] It can be understood that the sub-nodes included in two adjacent nodes are interconnected in a one-to-one correspondence. For example, A0 is interconnected with B0, A1 is interconnected with B1, A2 is interconnected with B2, and A3 is interconnected with B3. There is also a one-to-one correspondence between the sub-nodes of any two nodes, such as: A0 corresponds to C0.

[0119] For the above Figure 7As for the nodes A, B, C, and D that are interconnected by rings, that is, when each of the nodes A, B, C, and D includes multiple sub-nodes, in the current routing mechanism, when exchanging data between the nodes, the data traffic will be evenly distributed to each sub-bus. For example, if the sub-node A0 has 3.2T of data to be sent to the node B, the sub-node A0 will first divide the 3.2T data evenly into the four sub-buses ab0, ab1, ab2, and ab4 through the exchange inside the node, and each sub-bus will be allocated 0.8T, and then sent to the node B through the four sub-buses. The purpose of doing this is to avoid bus contention when the four nodes are interconnected. But in fact, even if the data traffic is evenly distributed to each sub-bus, bus contention may still occur.

[0120] For example, assuming that the bandwidth of each sub-bus is 1, sub-node A0 needs to send data X with a flow size of 2 to sub-node D0, and send data Y with a flow size of 2 to sub-node C. Since the total flow size of data X and data Y is equal to 4, it does not exceed the total bandwidth of the outbound port of node A (the total bandwidth of the four sub-buses is equal to 4), and there is no outbound competition for node A. At this time, according to the current traffic balancing routing rules: data X from A0→D0 will occupy the four sub-buses ad0-ad3, and data Y from A0→C2 will occupy the four sub-buses ad0-ad3 and cd0-cd3 in turn. When node A performs traffic balancing on the flow of data X and data Y, if load balancing is achieved, data X occupies a bandwidth of 0.5 in each of the four sub-buses ad0-ad3, and data Y also occupies a bandwidth of 0.5 in each of the four sub-buses ad0-ad3. For each of the four sub-buses ad0-ad3, the bandwidth is not exceeded. However, if the load is unbalanced, such as: data X and data Y occupy 0.6 of the bandwidth in a certain sub-bus respectively, then the bandwidth occupied by data X and data Y in one of the four sub-buses ad0-ad3 will exceed 1, resulting in competition in the sub-bus and causing congestion. For example: due to the granularity of the data packets in data X and / or Y, node A may not be able to evenly distribute the traffic of data X and / or Y to each sub-bus, resulting in unbalanced load.

[0121] Based on this, for the scenario where each of the four nodes interconnected by a ring consists of N sub-nodes, the sub-nodes included in any two nodes correspond one-to-one, and the sub-nodes included in two adjacent nodes are interconnected one-to-one, the embodiment of the present application also provides a routing method, which can further ensure that the bus is free of congestion.

[0122] The following combination Figure 8The routing method is described in detail. Figure 8 Another schematic diagram showing the interconnection of four node rings.

[0123] like Figure 8 As shown, taking the example of four nodes interconnected by a ring, each node consists of four sub-nodes, and the sub-nodes included in two adjacent nodes are interconnected one by one, such as: between node A and node B, A0 and B0 are interconnected, A1 and B1 are interconnected, A2 and B2 are interconnected, and A3 and B3 are interconnected. Between node B and node C, B0 and C0 are interconnected, B1 and C1 are interconnected, B2 and C2 are interconnected, and B3 and C3 are interconnected. Between node C and node D, C0 and D0 are interconnected, C1 and D1 are interconnected, C2 and D2 are interconnected, and C3 and D3 are interconnected. Between node A and node D, A0 and D0 are interconnected, A1 and D1 are interconnected, A2 and D2 are interconnected, and A3 and D3 are interconnected.

[0124] Figure 8 Among the multiple sub-nodes shown, the scenarios in which a sending sub-node (also called a source sub-node) sends data to a receiving sub-node (also called a destination sub-node) mainly include: the sending sub-node and the receiving sub-node are sub-nodes in two adjacent nodes respectively, and the sending sub-node and the receiving sub-node are sub-nodes in diagonal nodes respectively.

[0125] For example, if the sending subnode is a subnode in node A and the receiving subnode is a subnode in node B or node D, the corresponding scenario is that the sending subnode and the receiving subnode are subnodes in two adjacent nodes. If the sending subnode is a subnode in node A and the receiving subnode is a subnode in node C, or the sending subnode is a subnode in node B and the receiving subnode is a subnode in node D, the corresponding scenario is that the sending subnode and the receiving subnode are subnodes in diagonal nodes.

[0126] First, a scenario in which the sending subnode and the receiving subnode are subnodes of two adjacent nodes is described.

[0127] In a possible design, when the sending subnode and the receiving subnode are subnodes of two adjacent nodes respectively, it specifically includes: 1) the scenario where the sending subnode and the receiving subnode correspond to each other; 2) the scenario where the sending subnode and the receiving subnode do not correspond to each other. For these two scenarios, the routing method can be as follows.

[0128] 1) For the scenario where the sending sub-node and the receiving sub-node correspond one to one: the sending sub-node directly sends data to the receiving sub-node.

[0129] For example, the sending subnode is A0, and the receiving subnode is B0 corresponding to A0, then subnode A0 directly sends data to subnode B0.

[0130] 2) For the scenario where the sending subnode and the receiving subnode do not correspond, it specifically includes: 2.1) The sending subnode and the receiving subnode do not correspond, and the sending subnode and the receiving subnode are in the same row (for the definition of the same row, please refer to the description in the aforementioned embodiment); 2.2) The sending subnode and the receiving subnode do not correspond, and the sending subnode and the receiving subnode are in the same column (for the definition of the same column, please refer to the description in the aforementioned embodiment).

[0131] 2.1) If the sending subnode and the receiving subnode do not correspond, and the sending subnode and the receiving subnode are in the same row, the sending subnode first sends the data to the subnode corresponding to the sending subnode in the node where the receiving subnode is located, and then the subnode corresponding to the sending subnode forwards the data to the receiving subnode. In other words, the cross-subnode operation is completed in the node where the receiving subnode is located.

[0132] For example, when the sending child node is A0 and the receiving child node is B1, child node A0 first sends the data to B0 corresponding to A0, and child node B0 then forwards the data to child node B1.

[0133] For another example, when the sending subnode is B0 and the receiving subnode is A1, subnode B0 first sends the data to A0 corresponding to B0, and subnode A0 then forwards the data to subnode A1.

[0134] 2.2) If the sending subnode and the receiving subnode do not correspond, and the sending subnode and the receiving subnode are in the same column, the sending subnode first sends the data to the subnode corresponding to the receiving subnode in the node where the sending subnode is located, and then the subnode corresponding to the receiving subnode forwards the data to the receiving subnode. That is, the cross-subnode operation is completed in the node where the sending subnode is located.

[0135] For example, when the sending child node is A0 and the receiving child node is D1, child node A0 first sends the data to A1 corresponding to D1, and child node A1 then forwards the data to child node D1.

[0136] For another example, when the sending child node is D0 and the receiving child node is A1, child node D0 first sends the data to D1 corresponding to A1, and child node D1 then forwards the data to child node A1.

[0137] In another possible design, when the sending subnode and the receiving subnode are subnodes of two adjacent nodes respectively, for the two scenarios described in 1) and 2) above, the routing method may also be as follows.

[0138] 1) If the sending subnode and the receiving subnode correspond one to one, the sending subnode directly sends data to the receiving subnode.

[0139] 2) As mentioned above, the scenario described in 2) above is for the scenario where the sending sub-node and the receiving sub-node do not correspond, and specifically includes: 2.1) The sending sub-node and the receiving sub-node do not correspond, and the sending sub-node and the receiving sub-node are in the same row (for the definition of the same row, please refer to the description in the aforementioned embodiment); 2.2) The sending sub-node and the receiving sub-node do not correspond, and the sending sub-node and the receiving sub-node are in the same column (for the definition of the same column, please refer to the description in the aforementioned embodiment).

[0140] 2.1) If the sending subnode and the receiving subnode do not correspond, and the sending subnode and the receiving subnode are in the same row, the sending subnode first sends the data to the subnode corresponding to the receiving subnode in the node where the sending subnode is located, and then the subnode corresponding to the receiving subnode forwards the data to the receiving subnode. That is, the cross-subnode operation is completed in the node where the sending subnode is located.

[0141] For example, when the sending child node is A0 and the receiving child node is B1, child node A0 first sends the data to A1 corresponding to B1, and child node A1 then forwards the data to child node B1.

[0142] 2.2) If the sending subnode and the receiving subnode do not correspond, and the sending subnode and the receiving subnode are in the same column, the sending subnode first sends the data to the subnode corresponding to the sending subnode in the node where the receiving subnode is located, and then the subnode corresponding to the sending subnode forwards it to the receiving subnode. In other words, the cross-subnode operation is completed in the node where the receiving subnode is located.

[0143] For example, when the sending child node is A0 and the receiving child node is D1, child node A0 first sends the data to D0 corresponding to A0, and child node D0 then forwards the data to child node D1.

[0144] For the above scenario where the sending sub-node and the receiving sub-node are sub-nodes of two adjacent nodes respectively, the routing method can also be comprehensively described as follows in two different design modes.

[0145] 1. If the sending subnode and the receiving subnode correspond one to one, the sending subnode directly sends data to the receiving subnode.

[0146] For example, when the sending subnode in the first node corresponds to the receiving subnode in the second node, the sending subnode directly sends all the third data to be sent to the receiving subnode. When the sending subnode in the second node corresponds to the receiving subnode in the first node, the sending subnode directly sends all the fourth data to be sent to the receiving subnode.

[0147] 2. If the sending subnode and the receiving subnode do not correspond, and the sending subnode is a subnode in the first node, and the receiving subnode is a subnode in the second node located in the first direction of the first node, the sending subnode sends data (such as all the third data to be sent) to the receiving subnode via the subnode in the second node corresponding to the sending subnode.

[0148] If the sending subnode and the receiving subnode do not correspond, and the sending subnode is a subnode in the first node and the receiving subnode is a subnode in the second node located in the second direction of the first node, the sending subnode sends data (such as all the third data to be sent) to the receiving subnode via the subnode corresponding to the receiving subnode in the first node.

[0149] If the sending subnode and the receiving subnode do not correspond, and the sending subnode is a subnode in the second node located in the first direction of the first node, and the receiving subnode is a subnode in the first node, the sending subnode sends data (such as all the fourth data to be sent) to the receiving subnode via the subnode in the first node corresponding to the sending subnode.

[0150] If the sending subnode and the receiving subnode do not correspond, and the sending subnode is a subnode in the second node located in the second direction of the first node, and the receiving subnode is a subnode in the first node, the sending subnode sends data (such as all the fourth data to be sent) to the receiving subnode via the subnode in the second node corresponding to the receiving subnode.

[0151] The first node is any one of node A, node B, node C, and node D, and the second node is an adjacent node of the first node.

[0152] In the above comprehensive description 2, when the first direction is clockwise and the second direction is counterclockwise, it refers to 2.1) and 2.2) of the first design method in the scenario where the sending sub-node and the receiving sub-node are sub-nodes of two adjacent nodes respectively. When the first direction is counterclockwise and the second direction is clockwise, it refers to 2.1) and 2.2) of the second design method in the scenario where the sending sub-node and the receiving sub-node are sub-nodes of two adjacent nodes respectively.

[0153] The following describes a scenario in which the sending subnode and the receiving subnode are subnodes of diagonal nodes respectively.

[0154] In the scenario where the sending subnode and the receiving subnode are subnodes of the diagonal node respectively, the sending of data must first follow the routing rules of the routing method described in the aforementioned embodiment of the present application. That is, in the embodiment of the present application, the routing method provided for the scenario where each node includes N subnodes is proposed on the basis of the routing method described in the aforementioned embodiment.

[0155] For example, when the sending subnode is a subnode in node A and the receiving subnode is a subnode in node C, the data sent by the sending subnode to the receiving subnode must first follow the rule in the routing method described in the aforementioned embodiment, where node A sends data to node C along the first direction.

[0156] Based on the routing rules of the routing method described in the above embodiments of the present application, the routing method may be specifically as follows.

[0157] 1) For the scenarios corresponding to the sending sub-node and the receiving sub-node.

[0158] The sending subnode in the first node sends data (such as all first data to be sent) to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode in the second node in the first direction of the first node.

[0159] The sending subnode in the second node sends data (such as all the second data to be sent) to the receiving subnode in the diagonal node of the second node via the subnode corresponding to the sending subnode in the first node in the second direction of the second node.

[0160] For example, if Figure 8 Node A shown in is the first node, and node B and node D are the second nodes.

[0161] Assuming that the first direction is clockwise and the second direction is counterclockwise, when the sending subnode is A0 and the receiving subnode is C0, subnode A0 first sends data to B0 corresponding to A0, and subnode B0 then forwards the data to subnode C0.

[0162] For another example, when the sending subnode is D0 and the receiving subnode is B0, subnode D0 first sends the data to C0 corresponding to D0, and subnode C0 then forwards the data to subnode B0.

[0163] For another example, when the sending child node is C0 and the receiving child node is A0, child node C0 first sends the data to D0 corresponding to C0, and child node D0 then forwards the data to child node A0.

[0164] Alternatively, assuming that the first direction is counterclockwise and the second direction is clockwise, when the sending subnode is A0 and the receiving subnode is C0, subnode A0 first sends data to D0 corresponding to A0, and subnode D0 then forwards the data to subnode C0.

[0165] For another example, when the sending child node is D0 and the receiving child node is B0, child node D0 first sends the data to A0 corresponding to D0, and child node A0 then forwards the data to child node B0.

[0166] For another example, when the sending child node is C0 and the receiving child node is A0, child node C0 first sends the data to B0 corresponding to C0, and child node B0 then forwards the data to child node A0.

[0167] 2) For scenarios where the sending subnode and the receiving subnode do not correspond.

[0168] The sending subnode in the first node sends data (such as all the first data to be sent) to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode in the second node in the first direction of the first node and the subnode corresponding to the receiving subnode.

[0169] The sending subnode in the second node sends data (such as all the second data to be sent) to the receiving subnode in the diagonal node of the second node via the subnode corresponding to the sending subnode in the first node in the second direction of the second node and the subnode corresponding to the receiving subnode.

[0170] For example, if Figure 8 Node A shown in is the first node, and node B and node D are the second nodes.

[0171] Assuming that the first direction is clockwise and the second direction is counterclockwise, when the sending subnode is A0 and the receiving subnode is C1, subnode A0 first sends data to B0 corresponding to A0, subnode B0 forwards the data to B1 corresponding to C1, and subnode B1 then forwards the data to subnode C1.

[0172] For another example, when the sending child node is D0 and the receiving child node is B1, child node D0 first sends data to C0 corresponding to D0, child node C0 forwards the data to C1 corresponding to B1, and child node C1 then forwards the data to child node B1.

[0173] For another example, when the sending child node is C0 and the receiving child node is A1, child node C0 first sends data to D0 corresponding to C0, child node D0 forwards the data to D1 corresponding to A1, and child node D1 then forwards the data to child node A1.

[0174] Alternatively, assuming that the first direction is counterclockwise and the second direction is clockwise, when the sending subnode is A0 and the receiving subnode is C1, subnode A0 first sends data to D0 corresponding to A0, subnode D0 forwards the data to D1 corresponding to C1, and subnode D1 then forwards the data to subnode C1.

[0175] For another example, when the sending child node is D0 and the receiving child node is B1, child node D0 first sends data to A0 corresponding to D0, child node A0 forwards the data to A1 corresponding to B1, and child node A1 then forwards the data to child node B1.

[0176] For another example, when the sending child node is C0 and the receiving child node is A1, child node C0 first sends data to B0 corresponding to C0, child node B0 forwards the data to B1 corresponding to A1, and child node B1 then forwards the data to child node A1.

[0177] For the scenario where each of the four nodes interconnected by a ring is composed of N sub-nodes, the sub-nodes included in any two nodes correspond one-to-one, and the sub-nodes included in two adjacent nodes are interconnected one-to-one, in the above-mentioned routing method provided by the embodiment of the present application, the next hop node of any sub-column bus (for example, the next hop of ad0 is D0) must be the traffic end point of all data on the sub-column bus. Since there is no export competition for D0, the bandwidth of the column bus will naturally not exceed. The previous hop node of any sub-row bus (for example, the previous hop of ab0 is A0) must be the traffic source point of all data on the row bus. Since the source point traffic cannot exceed, the bandwidth of the row bus will naturally not exceed.

[0178] Therefore, for four nodes interconnected by a ring, when there is no egress competition at the egress port, the routing method provided in the embodiment of the present application can also ensure that interconnection bus congestion is avoided for the scenario in which each of the four nodes interconnected by a ring is composed of N sub-nodes, the sub-nodes included in any two nodes correspond one-to-one, and the sub-nodes included in two adjacent nodes are interconnected one-to-one.

[0179] For example, assuming that three subnodes, namely subnode A0, subnode B0, and subnode C0, send data to subnode D0, subnode D1, and subnode D2 respectively. When data routing is performed according to the routing method provided in the embodiment of the present application, if the first direction is clockwise and the second direction is counterclockwise, the path for subnode A0 to send data to subnode D0 is A0→D0. The occupied bus is ad0; the path for subnode B0 to send data to subnode D1 is B0→A0→A1→D1, and the occupied buses are ba0 and ad1; the path for subnode C0 to send data to subnode D2 is C0→D0→D2, and the occupied bus is cd0. It can be seen that the data from B0→D1 will not go through ad0, but ad1, so it will not conflict with the data from A0→D0, thereby avoiding competition for buses between nodes.

[0180] In summary, the aforementioned embodiments of the present application provide a method for how to route data between four nodes interconnected by a ring, and provide a method for how to route data between sub-nodes when each node in the four nodes interconnected by the ring includes more sub-nodes. On this basis, the routing method provided by the embodiment of the present application can also be extended to the scenario of data routing between more nodes. For example, for the scenario of 8 nodes, every 2 nodes can be grouped together, so that the 8 nodes can be divided into 4 groups of nodes. When the 4 groups of nodes are interconnected by rings, the routing method provided by the embodiment of the present application can also be used. Similarly, for other more or less nodes (such as: 7 nodes, 15 nodes, 20 nodes, etc.), if these nodes can be divided into 4 groups of nodes interconnected by rings, the routing method provided by the embodiment of the present application can be used. Of course, the number of nodes in each group of nodes can be the same or different, and there is no restriction.

[0181] Optionally, the present application also provides a data forwarding system (the structure of the system can refer to the structure of the system in the above embodiment). Figures 3 to 8 As shown, the drawings are not used for illustration here, including at least 4 nodes, and the at least 4 nodes form a ring network. The nodes in the ring network route data according to the method described in the above embodiments. For example, the at least 4 nodes include a first node and a second node, and the first node and the second node are adjacent; the first node is used to obtain the first data to be sent, and the destination node of the first data to be sent is the first destination node, and the first destination node is not adjacent to the first node; all the first data to be sent are sent along the first direction in the ring network. The second node is used to obtain the second data to be sent, and the destination node of the second data to be sent is the second destination node, and the second destination node is not adjacent to the second node; all the second data to be sent are sent along the second direction in the ring network, and the first direction and the second direction are opposite.

[0182] Optionally, the data forwarding system may be a CPU system composed of four central processing units (CPUs), or a server system composed of four servers, or a larger computing system or transmission system composed of four server systems, etc. Alternatively, the data forwarding system may also be a switching chip as described in the aforementioned embodiment, a chip system composed of different chips on a PCB, a system composed of different network devices, etc.

[0183] In other words, the data forwarding system can be a system in different fields such as computing, data exchange, chips, communications, etc. As long as the data forwarding system includes four nodes connected in a ring, the routing method provided in the foregoing embodiments of the present application is applicable. The present application does not limit the specific implementation of each node.

[0184] In some embodiments, the data forwarding system may also include other nodes besides the at least 4 nodes mentioned above, such as I / O nodes, which is not limited here.

[0185] In a possible design, the ring network includes only four nodes, the first destination node is a diagonal node of the first node; and the second destination node is a diagonal node of the second node.

[0186] In a possible design, the first node is further used to obtain third data to be sent, the destination node of the third data to be sent is the second node; and all the third data to be sent are directly sent to the second node. The second node is further used to obtain fourth data to be sent, the destination node of the fourth data to be sent is the first node; and all the fourth data to be sent are directly sent to the first node.

[0187] In a possible design, each of the four nodes in the ring network includes a plurality of interconnected subnodes, the subnodes included in any two nodes correspond one to one, and the subnodes included in two adjacent nodes correspond one to one to each other. The first node is specifically used to send all third to-be-sent data directly to the receiving subnode through the sending subnode when the sending subnode in the first node corresponds to the receiving subnode in the second node. The second node is specifically used to send all fourth to-be-sent data directly to the receiving subnode through the sending subnode when the sending subnode in the second node corresponds to the receiving subnode in the first node.

[0188] In a possible design, the first node is further used to send all third to-be-sent data to the receiving subnode through the sending subnode via the subnode corresponding to the sending subnode in the second node if the second node is located in the first direction of the first node and the sending subnode in the first node does not correspond to the receiving subnode in the second node. The second node is further used to send data to the receiving subnode through the sending subnode via the subnode corresponding to the sending subnode in the first node if the second node is located in the first direction of the first node and the sending subnode in the second node does not correspond to the receiving subnode in the first node.

[0189] In a possible design, the first node is further used to send all third to-be-sent data to the receiving subnode through the sending subnode via the subnode corresponding to the receiving subnode in the first node if the second node is located in the second direction of the first node and the sending subnode in the first node does not correspond to the receiving subnode in the second node. The second node is further used to send data to the receiving subnode through the sending subnode via the subnode corresponding to the receiving subnode in the second node if the second node is located in the second direction of the first node and the sending subnode in the second node does not correspond to the receiving subnode in the first node.

[0190] In a possible design, the first node is specifically used to send all first data to be sent to a receiving subnode in a diagonal node of the first node through a sending subnode in the first node, via a subnode corresponding to the sending subnode in a second node in a first direction of the first node; wherein the receiving subnode corresponds to the sending subnode. And / or, the first node is used to send all first data to be sent to a receiving subnode in a diagonal node of the first node through a sending subnode in the first node, via a subnode corresponding to the sending subnode and a subnode corresponding to the receiving subnode in a second node in a first direction of the first node in sequence; wherein the receiving subnode does not correspond to the sending subnode.

[0191] In a possible design, the first node is specifically configured to send all second data to be sent to a receiving subnode in a diagonal node of the second node through a sending subnode in the second node, via a subnode in the first node in the second direction of the second node corresponding to the sending subnode; wherein the receiving subnode corresponds to the sending subnode. And / or, send all second data to be sent to a receiving subnode in a diagonal node of the second node through a sending subnode in the second node, via a subnode in the first node in the second direction of the second node corresponding to the sending subnode and a subnode corresponding to the receiving subnode; wherein the receiving subnode does not correspond to the sending subnode.

[0192] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A routing method, characterized in that: Applied to a ring network composed of four nodes, the four nodes include a first node and a second node, the first node and the second node are adjacent, the method includes: The first node acquires first data to be sent, the destination node of the first data to be sent is a first destination node, and the first destination node is a diagonal node of the first node; The first node sends all the first data to be sent along a first direction in the ring network; The second node acquires second data to be sent, the destination node of the second data to be sent is a second destination node, and the second destination node is a diagonal node of the second node; The second node sends all of the second data to be sent along a second direction in the ring network, and the first direction is opposite to the second direction.

2. The method according to claim 1, characterized in that The method further comprises: The first node acquires third data to be sent, and the destination node of the third data to be sent is the second node; The first node directly sends all the third data to be sent to the second node; The second node acquires fourth data to be sent, and the destination node of the fourth data to be sent is the first node; The second node sends all the fourth data to be sent directly to the first node.

3. The method according to claim 2, characterized in that Each of the four nodes in the ring network includes a plurality of interconnected sub-nodes, the sub-nodes included in any two nodes correspond to each other, and the sub-nodes included in two adjacent nodes correspond to each other. The first node directly sends all the third data to be sent to the second node, including: When the sending subnode in the first node corresponds to the receiving subnode in the second node, the sending subnode directly sends all the third data to be sent to the receiving subnode; The second node directly sends all the fourth data to be sent to the first node, including: When the sending subnode in the second node corresponds to the receiving subnode in the first node, the sending subnode directly sends all of the fourth data to be sent to the receiving subnode.

4. The method according to claim 3, characterized in that The first node directly sends all the third data to be sent to the second node, further comprising: If the second node is located in the first direction of the first node, and the sending subnode in the first node does not correspond to the receiving subnode in the second node, the sending subnode sends all the third data to be sent to the receiving subnode via the subnode in the second node corresponding to the sending subnode; The second node directly sends all the fourth data to be sent to the first node, further comprising: If the second node is located in the first direction of the first node, and the sending subnode in the second node does not correspond to the receiving subnode in the first node, the sending subnode sends all the fourth data to be sent to the receiving subnode via the subnode in the first node corresponding to the sending subnode.

5. The method according to claim 3 or 4, characterized in that: The first node directly sends all the third data to be sent to the second node, further comprising: If the second node is located in the second direction of the first node, and the sending subnode in the first node does not correspond to the receiving subnode in the second node, the sending subnode sends all the third data to be sent to the receiving subnode via the subnode in the first node corresponding to the receiving subnode; The second node directly sends all the fourth data to be sent to the first node, further comprising: If the second node is located in the second direction of the first node, and the sending subnode in the second node does not correspond to the receiving subnode in the first node, the sending subnode sends all the fourth data to be sent to the receiving subnode via the subnode in the second node corresponding to the receiving subnode.

6. The method according to claim 3, characterized in that The first node sends all the first to-be-sent data along a first direction in the ring network, including: The sending subnode in the first node sends all the first to-be-sent data to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode in the second node in the first direction of the first node; wherein the receiving subnode corresponds to the sending subnode; And / or, the sending subnode in the first node sends all the first data to be sent to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode in the second node in the first direction of the first node and the subnode corresponding to the receiving subnode in sequence; wherein the receiving subnode and the sending subnode do not correspond.

7. The method according to claim 6, characterized in that The second node sends all the second to-be-sent data along a second direction in the ring network, including: The sending subnode in the second node sends all the second data to be sent to the receiving subnode in the diagonal node of the second node via the subnode corresponding to the sending subnode in the first node in the second direction of the second node; wherein the receiving subnode corresponds to the sending subnode; And / or, the sending subnode in the second node sends all the second data to be sent to the receiving subnode in the diagonal node of the second node via the subnode corresponding to the sending subnode in the first node in the second direction of the second node, and the subnode corresponding to the receiving subnode; wherein the receiving subnode and the sending subnode do not correspond.

8. A data forwarding system, characterized in that: comprising four nodes, the four nodes forming a ring network, the four nodes comprising a first node and a second node, the first node and the second node being adjacent; The first node is used to obtain first data to be sent, the destination node of the first data to be sent is a first destination node, and the first destination node is a diagonal node of the first node; Sending all of the first data to be sent along a first direction in the ring network; The second node is used to obtain second data to be sent, the destination node of the second data to be sent is a second destination node, and the second destination node is a diagonal node of the second node; All of the second data to be sent are sent along a second direction in the ring network, wherein the first direction is opposite to the second direction.

9. The system according to claim 8, characterized in that The first node is further configured to obtain third data to be sent, the destination node of the third data to be sent being the second node; and to send all the third data to be sent directly to the second node; The second node is further used to obtain fourth data to be sent, the destination node of the fourth data to be sent is the first node; and send all the fourth data to be sent directly to the first node.

10. The system according to claim 9, characterized in that Each of the four nodes in the ring network includes a plurality of interconnected sub-nodes, the sub-nodes included in any two nodes correspond to each other, and the sub-nodes included in two adjacent nodes correspond to each other. The first node is specifically configured to send all the third to-be-sent data directly to the receiving subnode through the sending subnode when the sending subnode in the first node corresponds to the receiving subnode in the second node; The second node is specifically configured to send all of the fourth data to be sent directly to the receiving subnode through the sending subnode when the sending subnode in the second node corresponds to the receiving subnode in the first node.

11. The system according to claim 10, characterized in that The first node is further configured to send all the third data to be sent to the receiving subnode by means of the sending subnode via the subnode corresponding to the sending subnode in the second node if the second node is located in a first direction of the first node and the sending subnode in the first node does not correspond to the receiving subnode in the second node; The second node is specifically used to send data to the receiving subnode through the sending subnode via the subnode in the first node corresponding to the sending subnode if the second node is located in the first direction of the first node and the sending subnode in the second node does not correspond to the receiving subnode in the first node.

12. The system according to claim 10 or 11, characterized in that The first node is further configured to send all the third data to be sent to the receiving subnode by the sending subnode via the subnode corresponding to the receiving subnode in the first node if the second node is located in the second direction of the first node and the sending subnode in the first node does not correspond to the receiving subnode in the second node; The second node is specifically used to send data to the receiving subnode through the sending subnode via the subnode in the second node corresponding to the receiving subnode if the second node is located in the second direction of the first node and the sending subnode in the second node does not correspond to the receiving subnode in the first node.

13. The system according to claim 10, characterized in that The first node is specifically configured to send all the first to-be-sent data to a receiving subnode in a diagonal node of the first node through a sending subnode in the first node and a subnode corresponding to the sending subnode in a second node in a first direction of the first node; wherein the receiving subnode corresponds to the sending subnode; And / or, through the sending subnode in the first node, all the first data to be sent are sent to the receiving subnode in the diagonal node of the first node via the subnode corresponding to the sending subnode in the second node in the first direction of the first node, and the subnode corresponding to the receiving subnode; wherein the receiving subnode and the sending subnode do not correspond.

14. The system according to claim 13, characterized in that The first node is specifically configured to send all the second data to be sent to a receiving subnode in a diagonal node of the second node through a sending subnode in the second node and a subnode corresponding to the sending subnode in the first node in a second direction of the second node; wherein the receiving subnode corresponds to the sending subnode; And / or, through the sending subnode in the second node, via the subnode corresponding to the sending subnode in the first node in the second direction of the second node, and the subnode corresponding to the receiving subnode, all the second data to be sent are sent to the receiving subnode in the diagonal node of the second node; wherein the receiving subnode and the sending subnode do not correspond.

Citation Information

Patent Citations

  • Bandwidth reservation reuse in dynamically allocated ring protection and restoration technique

    CN1606850A