Data forwarding method, apparatus, and system
By adjusting the forwarding path of data flow, the path congestion and load imbalance problems caused by ECMP strategy are solved, and better network traffic load balancing and transmission performance are achieved.
Patent Information
- Application Number
- PCT/CN2025/084366
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-30
- Filing Date
- 2025-03-24
- Publication Date
- 2025-10-09
AI Technical Summary
ECMP policies may cause path congestion and load imbalance in the network, especially when the number of data flows is small. Hash algorithm routing may aggravate congestion and lead to resource waste.
The first device switches the port of the data flow according to the congestion condition of the path, and uses the mapping relationship to adjust the forwarding path of the data flow to avoid congested routing and achieve load balancing.
In scenarios with multiple concurrent data streams, data streams can be sent to uncongested forwarding paths, achieving better load balancing of network traffic and improving transmission performance and bandwidth utilization.
Smart Images

Figure CN2025084366_09102025_PF_FP_ABST
Abstract
Description
Data forwarding method, device and system
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 30, 2024, with application number 202410385662.9 and application name “Data Forwarding Method, Device and System”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a data forwarding method, device, and system. Background Art
[0003] Equal-cost multi-path (ECMP) is a load balancing strategy. When multiple equal-cost paths exist to the same destination, devices implementing ECMP can distribute data flows across these equal-cost paths. ECMP path selection can be implemented using a hash algorithm. For example, a device implementing ECMP can randomly select a transmission path for a data flow based on the hash value of the data flow's five-tuple information.
[0004] However, equal-cost paths for different data flows in the network may pass through the same forwarding node. The forwarding paths selected by different nodes based on ECMP policies may cause different data flows to be transmitted to the same node, causing congestion. Furthermore, for already congested paths, ECMP-based routing may exacerbate congestion. Summary of the Invention
[0005] The present application provides a data forwarding method, device and system, which can solve the problem that ECMP random routing may cause path congestion and lead to network load imbalance.
[0006] In a first aspect, a data forwarding method is provided, which can be performed by a first device. The first device can be a device, or the first device can be a component in the device, for example, the first device is a processor, a chip, or a chip system in the device. The method may include: the first device can receive a first message of a first data stream through a first port. Afterwards, the first device can send the first message of the first data stream to the second device through a second port based on a first mapping relationship. The first mapping relationship indicates that the first port and the second port correspond. The first device can also receive first indication information from the second device, and the first indication information is used to indicate that congestion occurs in the second device. Afterwards, the first device can determine a second mapping relationship based on the first indication information, and the second mapping relationship indicates that the first port corresponds to the third port. Further, the first device can send a second message of the first data stream to the third device through the third port based on the second mapping relationship.
[0007] In this solution, the first device can select the port for sending the data stream based on the mapping relationship between the ports. In addition, if the data stream is congested at the second device on the subsequent forwarding path, the second device can indicate the congestion condition to the first device. Afterwards, the first device can update the mapping relationship between the ports, thereby switching the port for sending the data stream so that the data stream leaves the forwarding path where the congestion occurs. Based on this, since the first device can switch the port for sending the data stream according to the congestion condition of the path, that is, the first device can switch the forwarding path of the data stream according to the congestion condition of the path, in a scenario where multiple data streams are concurrent, the first device can send the multiple data streams to multiple non-congested forwarding paths, which can better achieve load balancing of network traffic.
[0008] In combination with the above-mentioned first aspect, as a possible implementation manner, the first device determines the second mapping relationship according to the first indication information, which may specifically include: the first device updates the first mapping relationship to the second mapping relationship according to the first indication information.
[0009] In conjunction with the first aspect above, as a possible implementation, the bandwidth utilization of the third port is less than the first threshold. It should be understood that the first threshold is a threshold that measures the port idleness. This implementation also means that the first device can select a relatively idle egress port for forwarding the first data flow, which can improve subsequent transmission performance.
[0010] In conjunction with the first aspect above, as a possible implementation, the data forwarding method may further include: after receiving the first indication information, the first device further receiving second indication information from the second device. The second indication information is used to indicate that congestion has occurred in the second device. The first device determines the second mapping relationship based on the first indication information, which may specifically include: based on the time interval between the first device receiving the second indication information and the first indication information being greater than the first duration, the first device determines the second mapping relationship.
[0011] In combination with the above first aspect, as a possible implementation manner, the first indication information and the second indication information are carried in a PFC back pressure frame.
[0012] In combination with the above-mentioned first aspect, as a possible implementation manner, the first indication information may include information indicating the first data flow, and the first indication information may be carried in a layer-3 message.
[0013] In conjunction with the first aspect described above, as a possible implementation, before the first device determines the second mapping relationship, the data forwarding method may further include: the first device sending a first query message to a third device, the first query message being used to query whether the bandwidth utilization of the egress port corresponding to the first data flow in the third device is less than a second threshold. The first device receiving a first response message from the third device, the first response message being used to indicate that the bandwidth utilization of the egress port corresponding to the message of the first data flow in the third device is less than the second threshold.
[0014] In combination with the above-mentioned first aspect, as a possible implementation method, the first device is a leaf switch in a spine-leaf network architecture, and the second device is a spine switch in the spine-leaf network architecture.
[0015] In combination with the above first aspect, as a possible implementation manner, the first device is an access device, and the second device is a convergence device.
[0016] In combination with the above first aspect, as a possible implementation manner, the bandwidth of the second port is greater than or equal to the bandwidth of the first port, and the bandwidth of the third port is greater than or equal to the bandwidth of the first port.
[0017] In combination with the above-mentioned first aspect, as a possible implementation manner, the first data stream is a data stream of an AI business or an HPC business.
[0018] In a second aspect, a data forwarding method is provided, which can be performed by a second device. The first device can be a device, or the second device can be a component in the device, for example, the second device can be a processor, a chip, or a chip system in the device. The method may include: the second device receives a first message of a first data stream from the first device. And, the second device can send a first indication information to the first device. The first indication information is used to indicate that congestion occurs in the second device, and the first indication information is also used to enable the first device to determine a second mapping relationship, the second mapping relationship indicates that the first port corresponds to the third port, the first port is the port where the first device receives the first message of the first data stream, and the third port is the port where the first device sends the second message of the first data stream to the third device.
[0019] Based on this solution, when congestion occurs, the second device can indicate the congestion condition to the first device, causing the first device to switch the port used to transmit the data stream, thereby switching the data stream's forwarding path, thereby diverting the data stream away from the congested forwarding path. Because this data forwarding method can switch data stream forwarding paths based on congestion conditions, in scenarios with multiple concurrent data streams, multiple data streams can be routed to multiple, uncongested forwarding paths, achieving better load balancing for network traffic.
[0020] In combination with the above-mentioned second aspect, as a possible implementation method, the second device includes multiple output ports corresponding to the first data stream. Before the second device sends the first indication information to the first device, the data forwarding method may also include: the second device determines that the bandwidth utilization of the multiple output ports corresponding to the first data stream is greater than the third threshold. It should be understood that if the bandwidth utilization of the output ports corresponding to the first message of the first data stream is greater than the third threshold, then it can be considered that the output ports corresponding to the first data stream are not idle. Even if the second device switches the first data stream to other output ports in the second device, it cannot alleviate congestion. In this case, the second device needs to send the first indication information to the first device so that the first device cuts off the first data stream.
[0021] In combination with the above second aspect, as a possible implementation manner, the first indication information is carried in a PFC back pressure frame.
[0022] In combination with the above second aspect, as a possible implementation manner, the first indication information includes information indicating the first data flow, and the first indication information is carried in a layer-3 message.
[0023] In combination with the above second aspect, as a possible implementation method, the first device is a leaf switch in the spine-leaf network architecture, and the second device is a spine switch in the spine-leaf network architecture.
[0024] In combination with the first aspect above, as a possible implementation, the first device is an access device, and the second device is a convergence device.
[0025] In combination with the above second aspect, as a possible implementation manner, the bandwidth of the third port is greater than or equal to the bandwidth of the first port.
[0026] In combination with the above second aspect, as a possible implementation method, the first data stream is a data stream of an AI business or an HPC business.
[0027] In a third aspect, a communication device is provided for implementing the above method. The communication device includes modules, units, or means corresponding to the above method. The modules, units, or means can be implemented in hardware, software, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the above functions.
[0028] In a fourth aspect, a communication device is provided, comprising: a processor and a memory; the memory is used to store computer instructions, and when the device is running, the processor executes the computer instructions stored in the memory to enable the device to perform a data forwarding method as described in any one of the first or second aspects above.
[0029] In conjunction with the fourth aspect above, in one possible implementation, the apparatus further includes a communication interface; the communication interface is used for the apparatus to communicate with other devices. Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuits.
[0030] In a fifth aspect, a chip or chip system is provided, comprising: a processor; the processor executes program instructions so that the chip or chip system executes the data forwarding method as described in any one of the first or second aspects above.
[0031] In a sixth aspect, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer can execute the data forwarding method described in any one of the first or second aspects above.
[0032] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the data forwarding method described in any one of the first or second aspects above.
[0033] Among them, the technical effects brought about by any design method in the third to seventh aspects can refer to the technical effects brought about by different design methods in the first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] FIG1 is a schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0035] FIG2 is a schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0036] FIG3 is a schematic diagram of a flow chart of a data forwarding method provided in an embodiment of the present application;
[0037] FIG4 is a schematic diagram of congestion handling performed by a first device and a fourth device according to an embodiment of the present application;
[0038] FIG5 is a schematic diagram of data forwarding by a second device provided in an embodiment of the present application;
[0039] FIG6 is a schematic diagram of another second device performing data forwarding according to an embodiment of the present application;
[0040] FIG7 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0041] FIG8 is a schematic structural diagram of another communication device provided in an embodiment of the present application;
[0042] FIG9 is a schematic structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] To facilitate understanding, first, a brief introduction to the relevant technologies and technical terms involved in this application is given.
[0044] ECMP is a hop-by-hop, flow-based load balancing strategy. When a router discovers multiple equal-cost paths to the same destination, it adds the next hops corresponding to these equal-cost paths to its routing table. During data forwarding, the router can simultaneously utilize these multiple equal-cost paths. ECMP-based data transmission improves bandwidth utilization on network links and enhances network redundancy and reliability.
[0045] Currently, the path selection of the ECMP policy is implemented based on a hash algorithm. The device deploying the ECMP policy can randomly select a transmission path from multiple equal-cost paths for the data flow based on the hash value of the data flow's five-tuple information.
[0046] When there are a large number of data flows, ECMP policies can distribute multiple data flows across multiple equal-cost paths, achieving good load balancing on the network. However, when there are fewer data flows, the load balancing effect achieved by ECMP-based routing is limited. For example, if two data flows are sent from two different source devices to the same destination, these two source devices may forward these two data flows to the same switch using ECMP-based routing, causing congestion on that switch. However, these two source devices can still forward the data flows to the destination device through other switches, and these other switches are currently idle. This results in both congestion and the existence of idle equal-cost paths in the network, resulting in a lack of load balancing.
[0047] Furthermore, ECMP lacks a congestion-aware mechanism. For already congested paths, ECMP-based routing is likely to exacerbate congestion. Furthermore, hash collisions when using a hash algorithm for routing can also increase the likelihood of link congestion.
[0048] Based on the above problems, the present application proposes a data forwarding method, in which the first device can switch the port for sending data streams according to the congestion condition of the path, that is, the first device can switch the forwarding path of the data stream according to the congestion condition of the path. Therefore, in a scenario where multiple data streams are concurrent, the first device can send multiple data streams to multiple uncongested forwarding paths, which can better achieve load balancing of network traffic.
[0049] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship. For example, A / B can represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity or execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being preferred or advantageous over other embodiments or design. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner to facilitate understanding. In addition, the network architecture and service scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation of the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of network architecture and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0050] Before introducing the data forwarding method provided in the embodiment of the present application, the communication system to which the data forwarding method of the present application is applied is first introduced.
[0051] Figure 1 is a schematic structural diagram of a communication system provided by the present application. As shown in Figure 1, the communication system may include multiple first nodes (for example, the first node A1 and the first node A2 in Figure 1), multiple second nodes (for example, the second node B1, the second node B2, and the second node B3 in Figure 1), and multiple third nodes (for example, the third node C1, the third node C2, the third node C3, the third node C4, the third node C5, and the third node C6 in Figure 1). Each first node is connected to multiple second nodes, for example, the first node A1 is connected to the second node B1, the second node B2, and the second node B3, and the first node A2 is connected to the second node B1, the second node B2, and the second node B3. Each second node is connected to multiple first nodes, for example, the second node B1 is connected to the first node A1 and the first node A2, the second node B2 is connected to the first node A1 and the first node A2, and the second node B3 is connected to the first node A1 and the first node A2. Each second node is also connected to at least one third node. For example, the second node B1 can also be connected to the third node C1 and the third node C2, the second node B2 can also be connected to the third node C3 and the third node C4, and the second node B3 can also be connected to the third node C5 and the third node C6.
[0052] In addition, as shown in Figure 1, the first node A1 is connected to the second node B1 via port a11, the first node A1 is connected to the second node B2 via port a12, and the first node A1 is connected to the second node B3 via port a13. The first node A2 is connected to the second node B1 via port a21, the first node A2 is connected to the second node B2 via port a22, and the first node A2 is connected to the second node B3 via port a23. The second node B1 is connected to the third node C1 via port b11, the second node B1 is connected to the third node C2 via port b12, the second node B1 is connected to the first node A1 via port b13, and the second node B1 is connected to the first node A2 via port b14. The second node B2 is connected to the third node C3 via port b21, the second node B2 is connected to the third node C4 via port b22, the second node B2 is connected to the first node A1 via port b23, and the second node B2 is connected to the first node A2 via port b24. The second node B3 is connected to the third node C5 via port b31, the second node B3 is connected to the third node C6 via port b32, the second node B3 is connected to the first node A1 via port b33, and the second node B3 is connected to the first node A2 via port b34.
[0053] Figure 1 uses an example in which a first node and a second node are connected via a single line. In a specific implementation, the first node and the second node may also be connected via multiple lines. For example, Figure 2 is a schematic structural diagram of another communication system provided by the present application. As shown in Figure 2, the first node A1 and the second node B1, the second node B2, and the second node B3 may all be connected via two lines, and the first node A2 and the second node B1, the second node B2, and the second node B3 may all be connected via two lines. In addition, the connection relationship between the second node and the third node in Figure 2 may be the same as that in Figure 1 and will not be repeated here.
[0054] In a specific implementation, the first node A1 and the first node A2 in Figures 1 and 2 can be aggregation devices in a traditional three-layer network, such as an aggregation switch. The second node B1, the second node B2, and the second node B3 in Figures 1 and 2 can be access devices in a traditional three-layer network, such as an access switch. The third node C1, the third node C2, the third node C3, the third node C4, the third node C5, and the third node C6 in Figures 1 and 2 can be user-side devices, such as a user terminal, a server, a storage disk, a general-purpose central processing unit (CPU), a graphics processing unit (GPU), a network card, etc.
[0055] In a specific implementation, the communication system shown in Figures 1 and 2 can be a spine-leaf network architecture, the first node A1 and the first node A2 can be spine switches in the spine-leaf network architecture, the second node B1, the second node B2 and the second node B3 can be leaf switches in the spine-leaf network architecture, and the third node C1, the third node C2, the third node C3, the third node C4, the third node C5 and the third node C6 can be user-side devices, such as user terminals, servers, storage disks, CPUs, GPUs, network cards, etc.
[0056] In a specific implementation, the topology scenario of the communication system shown in Figures 1 and 2 can be a fat tree scenario, in which the bandwidth in the communication system is non-convergent. The sum of the bandwidth of the communication link between the second node B1 and the first node A1 and the bandwidth of the communication link between the second node B1 and the second node A2 is equal to the sum of the bandwidth of the communication link between the second node B1 and the third node C1 and the bandwidth of the communication link between the second node B1 and the third node C2. The sum of the bandwidth of the communication link between the second node B2 and the first node A1 and the bandwidth of the communication link between the second node B2 and the second node A2 is equal to the sum of the bandwidth of the communication link between the second node B2 and the third node C3 and the bandwidth of the communication link between the second node B2 and the third node C4. The sum of the bandwidth of the communication link between the second node B3 and the first node A1 and the bandwidth of the communication link between the second node B3 and the second node A2 is equal to the sum of the bandwidth of the communication link between the second node B3 and the third node C5 and the bandwidth of the communication link between the second node B3 and the third node C6.
[0057] It should be understood that the above examples of the network architecture / service scenarios of the communication systems shown in Figures 1 and 2, and the implementation methods of each node are schematic and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. The communication systems shown in Figures 1 and 2 can also be other types of network architectures / service scenarios, in which the first node, the second node, and the third node can also be other types of devices. It is known to those skilled in the art that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0058] The first node and the second node in Figure 1 and Figure 2 can execute the data forwarding method provided in this application. The specific implementation is detailed in the method embodiment below and will not be described in detail here.
[0059] The data forwarding method provided by the embodiment of the present application will be described below in conjunction with the communication system shown in Figure 1. The actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message names or parameter names in the embodiments of the present application are only examples, and other names can also be used in specific implementations without limitation.
[0060] FIG3 is a flow chart of a data forwarding method provided in an embodiment of the present application. As shown in FIG3 , the method may include the following steps S301 to S305 .
[0061] S301. A first device receives a first message of a first data stream through a first port.
[0062] For example, taking the communication system shown in FIG1 as an example, the first device may be the second node B1, the first port may be the port b11 of the second node B1, and the second node B1 may receive the first message of the first data stream sent by the third node C1.
[0063] S302: The first device sends a first message of a first data stream to the second device through the second port according to a first mapping relationship, wherein the first mapping relationship indicates that the first port corresponds to the second port.
[0064] In a specific implementation, the first device may query the first mapping relationship according to the first port for receiving the first message of the first data stream, thereby determining to use the second port to forward the first message of the first data stream.
[0065] For example, continuing with the communication system shown in Figure 1, the first device can be the second node B1, the source node of the first data flow can be the third node C1, and the destination node of the first data flow can be the third node C3. Thus, the first port can be port b11 of the second node B1. The first data flow from the second node B1 to the third node C3 can include two equivalent paths: second node B1 → first node A1 → second node B2 → third node C3, and second node B1 → first node A2 → second node B2 → third node C3. Based on this, the second device can be the first node A1, the second port can be port b13 of the second node B1, and the first mapping relationship indicates that port b11 of the second node B1 corresponds to port b13. Alternatively, the second device can be the first node A2, the second port can be port b14 of the second node B1, and the first mapping relationship indicates that port b11 of the second node B1 corresponds to port b14 of the second node B1.
[0066] In a specific implementation, multiple mapping relationships can be established between the multiple ports of the first device, each mapping relationship indicates a mapping relationship between two ports among the multiple ports of the first device, and the above-mentioned first mapping relationship is one of the multiple mapping relationships established between the multiple ports of the first device. In an embodiment of the present application, the multiple mapping relationships established between the multiple ports of the first device can be used to guide the forwarding of messages. Specifically, the first mapping relationship indicates that the first port and the second port correspond, indicating that the traffic received by the first device from the first port needs to be forwarded from the second port. For example, the first device can also receive a message of a second data stream from the first port, and the first device can forward the message of the second data stream from the second port according to the first mapping relationship.
[0067] In a specific implementation, the port of the first device in the embodiment of the present application can be divided into an uplink port and a downlink port. The port to which the first device is connected to its uplink device is called an uplink port, and the port to which the first device is connected to its downlink device is called a downlink port. The data received by the first device from the uplink port will be sent from the downlink port, and the data received by the first device from the downlink port will be sent from the uplink port. In this case, each of the multiple mapping relationships established between the multiple ports of the first device may include a corresponding relationship between any downlink port and any uplink port. In the embodiment of the present application, the second device may be an uplink device of the first device, the above-mentioned second port may be an uplink port of the first device, and the above-mentioned first port may be a downlink port of the first device.
[0068] For example, continuing with the communication system shown in FIG. 1 , the first device may be a second node B1, port b11 and port b12 of the second node B1 may be downlink ports, and port b13 and port b14 of the second node B1 may be uplink ports. Multiple mapping relationships may be established between the downlink ports and uplink ports of the second node B1. For example, port b11 of the second node B1 corresponds to port b13 of the second node B1, and port b12 of the second node B1 corresponds to port b14 of the second node B1. Alternatively, port b11 of the second node B1 corresponds to port b14 of the second node B1, and port b12 of the second node B1 corresponds to port b13 of the second node B1.
[0069] In one possible scenario, the number of uplink ports of the first device is equal to the number of downlink ports, and the bandwidth of each uplink port is equal to the bandwidth of each downlink port. In the multiple mapping relationships established between the multiple downlink ports and the multiple uplink ports of the first device, one downlink port corresponds to one uplink port, and different downlink ports correspond to different uplink ports, so that the bandwidths between the corresponding uplink ports and downlink ports are equal.
[0070] For example, continuing with the communication system shown in FIG1 , the first device may be a second node B1, and the bandwidth of ports b11, b12, b13, and b14 of the second node B1 may all be 100 megabits per second (Mbps). Port b11 of the second node B1 corresponds to port b13 of the second node B1, and port b12 of the second node B1 corresponds to port b14 of the second node B1. Alternatively, port b11 of the second node B1 corresponds to port b14 of the second node B1, and port b12 of the second node B1 corresponds to port b13 of the second node B1. In short, the bandwidths of the corresponding ports are equal.
[0071] In another possible scenario, the total bandwidth of the uplink ports and the total bandwidth of the downlink ports of the first device are equal, but the number of uplink ports and the number of downlink ports of the first device are unequal, and the bandwidth of one uplink port may be an integer multiple of the bandwidth of one downlink port. In the multiple mapping relationships established between the multiple downlink ports and the multiple uplink ports of the first device, multiple downlink ports may correspond to one uplink port, but the bandwidth of each uplink port is equal to the sum of the bandwidths of the multiple downlink ports to which it corresponds.
[0072] For example, continuing with the communication system shown in FIG1 , the first device may be a second node B1. Assume that the second node B1 is also connected to a third node C7 and a third node C8 (not shown in FIG1 ). The bandwidth of the four downlink ports of the second node B1 connecting to the third nodes C1, C2, C7, and C8 is 50 Mbps, and the bandwidth of the two uplink ports of the second node B1 connecting to the first nodes A1 and A2 is 100 Mbps. In this case, in the mapping relationship established between the uplink port and the downlink port of the second node B1, two 50 Mbps downlink ports correspond to one 100 Mbps uplink port.
[0073] In a specific implementation, if the bandwidth of an uplink port is an integer multiple of the bandwidth of a downlink port, the uplink port can be divided into multiple logical uplink ports, with the bandwidth of each logical uplink port being equal to the bandwidth of each downlink port. A one-to-one correspondence can be established between the multiple logical uplink ports and the multiple downlink ports. For example, assuming that the first device includes two 100 Mbps uplink ports and four 50 Mbps downlink ports, the two 100 Mbps uplink ports can be divided into four 50 Mbps logical uplink ports, and a one-to-one correspondence can be established between these four 50 Mbps logical uplink ports and the four 50 Mbps downlink ports.
[0074] S303: The second device sends first indication information to the first device, where the first indication information is used to indicate that congestion occurs in the second device.
[0075] In a specific implementation, the first indication information may further specifically indicate that congestion has occurred in the first data stream in the second device. Specifically, the first indication information may further specifically indicate that congestion has occurred in the priority queue of a port of the second device. For example, the second device supports priority-based flow control (PFC) technology, and the above-mentioned first indication information is carried in the PFC back pressure frame sent by the second device when congested. Alternatively, the first indication information may further specifically instruct the first device to switch the forwarding path of the first data stream. In this case, the first indication information may include information indicating the first data stream. As a possible implementation, the first indication information may include five-tuple information of the first data stream, and the first indication information may be carried in a three-layer message.
[0076] In a specific implementation, during the period from when the first device receives the first indication information to when the first device updates and completes the first mapping relationship, the first device may suspend sending the first message of the first data stream to the second device, or the first device may slow down the rate of sending the first message of the first data stream to the second device to alleviate the congestion in the second device.
[0077] S304: The first device determines a second mapping relationship according to the first indication information, where the second mapping relationship indicates that the first port corresponds to the third port.
[0078] For example, continuing with the communication system shown in Figure 1, the first device may be the second node B1, the first mapping relationship may indicate that the port b11 of the second node B1 corresponds to the port b13 of the second node B1, and the second mapping relationship may indicate that the port b11 of the second node B1 corresponds to the port b14 of the second node B1.
[0079] For example, a first data stream is sent from the first node C1 to the third node C5. After receiving the first data stream from b11 (the first port), the first device, i.e., the second node B1, queries the first mapping relationship based on the first port and sends the message of the first data stream from port b13 (the second port) to the second device, i.e., the first node A1. A second data stream is sent from the first node C1 to the third node C5. After receiving the second data stream from b11 (the first port), the first device, i.e., the second node B1, queries the first mapping relationship based on the first port and sends the message of the second data stream from port b13 to the second device, i.e., the first node A1. A third data stream is sent from the first node C3 to the third node C5. After receiving the third data stream from b21, the second node B2 queries the mapping relationship based on b21 and sends the message of the first data stream from port b23 to the first node A1. After receiving the first data stream and the second data stream from port a11 and the second data stream from port a12, the first node A1 forwards both data streams from port a13 to the second node B3, causing congestion on port a13. At this time, the first node A1 sends the first indication information to the second node B1, as described in S303.
[0080] When the first indication information specifically indicates that congestion has occurred in the priority queue of a port of the second device, such as when congestion has occurred in the priority queue of port a13 of the first node A1, the congestion is indicated, for example, via a PFC backpressure frame. Upon receiving the first indication information from port b13, the second node B1 determines that traffic sent by port b13 (the second port) will cause downstream congestion and needs to update the first mapping relationship to send traffic received by port b11 from a port other than port b13, thereby alleviating congestion on the downstream first node A1. Subsequently, the subsequent step of determining the second mapping relationship is performed.
[0081] When the first indication information specifically indicates that a certain data flow has been congested, such as when congestion has occurred in the priority queue of port a13 of the first node A1, the first node A1 selects any flow from the priority queue of port a13, such as the first data flow, and carries the five-tuple information of the first data flow in the first indication information, like the second node B1. After receiving this first indication information from port b13, the second node B1 determines that the first data flow sent by port b13 (the second port) will cause downstream congestion, and also updates the first mapping relationship to send the traffic received by port b11 from other non-b13 ports, thereby alleviating the congestion of the downstream first node A1, and then performs the subsequent step of determining the second mapping relationship.
[0082] It should be understood that if the second mapping relationship indicates the first port and the third port, all subsequent data streams received by the first device from the first port must be forwarded through the third port. For example, after the first device determines the second mapping relationship, the forwarding port for the first data stream received by the first device from the first port must be switched from the original second port to the third port. The forwarding port for the second data stream received by the first device from the first port must also be switched from the original second port to the third port.
[0083] As a possible implementation manner, the first device determines the second mapping relationship according to the first indication information, which may specifically include: the first device updates the first mapping relationship to the second mapping relationship according to the first indication information.
[0084] As a possible implementation, the second mapping relationship may also be a mapping relationship newly generated by the first device. In this case, after the second mapping relationship is generated, the first device may remove the first mapping relationship to avoid conflicts between different mapping relationships.
[0085] In one specific implementation, the multiple mapping relationships established between the multiple ports of the first device also include a third mapping relationship, where the third mapping relationship indicates that the fourth port corresponds to the third port, and the data stream received by the first device from the fourth port needs to be forwarded through the third port. The mapping relationships between the ports of the first device can be one-to-one. When the first device updates the first mapping relationship to the second mapping relationship, the first device can also update the third mapping relationship to a fourth mapping relationship, where the fourth mapping relationship indicates that the fourth port corresponds to the second port. Based on this, the port corresponding to the first port is equivalent to the port corresponding to the fourth port being swapped, thereby ensuring that the ports still have a one-to-one correspondence.
[0086] In a specific implementation, the third port originally has no traffic forwarding port, that is, the third port is an idle port, or the third port is a port with a bandwidth utilization rate less than a first threshold, which means that the third port has sufficient idle bandwidth to forward the first data flow.
[0087] In one specific implementation, after receiving the first indication information, the first device may also receive second indication information from the second device. The second indication information is used to indicate that congestion has occurred in the second device. The first device determines the second mapping relationship based on the first indication information. Specifically, the first device may determine the second mapping relationship based on the time interval between the first device receiving the second indication information and the first indication information being greater than the first duration.
[0088] It should be understood that the first duration can be considered the duration that the first device waits for congestion on the second device to be resolved. If the first device receives the second indication information after the first duration has elapsed since receiving the first indication information, the first device can determine that congestion on the second device has not been resolved. Therefore, the first device can determine the second mapping relationship and select a new forwarding path for the first data stream.
[0089] As a possible implementation, after receiving the first indication information, the first device may start a first timer, where the duration of the first timer is the first duration. If the first device receives the second indication information within a second duration (e.g., 1 second) after the first timer expires, the first device determines the second mapping relationship.
[0090] In one specific implementation, the first device continuously receives multiple second indication messages within a first time period after receiving the first indication message. The second indication messages are used to indicate that congestion has occurred in the second device. The specific method for indicating that congestion has occurred in the second device can be referenced with the relevant description of the first indication message and is not further described here. The first device determines the second mapping relationship based on the first indication message, which may specifically include: the first device determines the second mapping relationship based on the time interval between the reception of two adjacent second indication messages being less than the first interval.
[0091] It should be understood that if the first device continuously receives multiple second indication messages within a first time period after receiving the first indication message, and the time interval between the reception of two adjacent second indication messages is less than the first interval, the first device may determine that the congestion state of the second device has not been resolved within the first time period after receiving the first indication message. Based on this, the first device may determine the second mapping relationship and select a new forwarding path for the first data stream.
[0092] As a possible implementation, after receiving the first indication information, the first device may start a first timer, where the duration of the first timer is the first duration. If the first device continuously receives multiple second indication information during the timing of the first timer, and the time interval between the reception of two adjacent second indication information is less than the first interval, then the first device determines the second mapping relationship.
[0093] In a specific implementation, the second device supports priority-based flow control (PFC) technology, and the first indication information and the second indication information can be carried in a PFC back pressure frame sent by the second device when congested.
[0094] In a specific implementation, when the first indication information instructs the first device to switch the forwarding path of the first data stream, the first device can determine the second mapping relationship according to the first indication information without waiting for the first time period.
[0095] S305: The first device sends the second message of the first data stream to the third device through the third port according to the second mapping relationship.
[0096] For example, continuing with the communication system shown in Figure 1, the first device can be the second node B1, the second device can be the first node A1, the third device can be the first node A1, or the first node A2, and the second node B1 can send the second message of the first data stream to the first node A1 or the first node A2.
[0097] In one specific implementation, the bandwidth utilization of the third port is less than the first threshold of the outbound port, indicating that the third port has sufficient free bandwidth to forward the first data stream. Based on this, the first device forwards the second packet of the first data stream from the third port, thereby reducing the probability of congestion of the second packet of the first data stream.
[0098] In summary, the present application provides a data forwarding method, which enables the first device to select the port for sending the data stream message according to the mapping relationship between the ports. In addition, if the data stream is congested at the second device on the subsequent forwarding path, the second device can indicate the congestion condition to the first device. Afterwards, the first device can switch the correspondence between the ports according to the instruction of the second device, thereby switching the port for sending the data stream and making the data stream leave the forwarding path where the congestion occurs. Based on this, since the first device can switch the port for sending the data stream according to the congestion condition of the path, that is, the first device can switch the forwarding path of the data stream according to the congestion condition of the path, therefore, in a scenario where multiple data streams are concurrent, the first device can send the multiple data streams to multiple non-congested forwarding paths, which can better achieve load balancing of network traffic.
[0099] In a specific implementation, if congestion also occurs in the second packet of the first data stream at the third device, the third device may also send an instruction to the first device to cause the first device to switch the forwarding path of the first data stream again. In this case, the third device may perform the actions performed by the second device in the data forwarding method from S301 to S305 above.
[0100] In the embodiment of the present application, the bandwidth of the second port and the third port of the first device are both greater than or equal to the bandwidth of the first port, so that the first message of the first data flow will not be congested in the first device.
[0101] In a specific implementation, the first data stream can be a data stream for an artificial intelligence (AI) business or a high performance computing (HPC) business. Such data streams are characterized by a small number of streams and a large bandwidth. When the data forwarding method provided in this application is applied in AI or HPC business scenarios, multiple data streams can be allocated to multiple uncongested paths for transmission to ensure service quality.
[0102] In a specific implementation, the first device may be a leaf switch in a spine-leaf network architecture, and the second device and the third device may be spine switches in the spine-leaf network architecture.
[0103] In a specific implementation, the first device may be an access device, the second device and the third device may be aggregation devices.
[0104] In a specific implementation, before step S304, the data forwarding method may further include steps S306 and S307.
[0105] S306: The first device sends a first query message to the third device, where the first query message is used to query the bandwidth utilization of the egress port corresponding to the first data flow in the third device.
[0106] The first device sends the first query message to the third device to confirm whether the third device has sufficient idle bandwidth to forward the first data stream, thereby preventing congestion from occurring at the third device after the first device sends the second message of the first data stream to the third device.
[0107] S307: The third device sends a first response message to the first device, where the first response message is used to indicate that the bandwidth utilization of the egress port corresponding to the first data flow in the third device is less than a second threshold.
[0108] As an implementation manner, when the bandwidth utilization rate of the egress port corresponding to the first data flow in the third device is less than the second threshold, the first device may determine that there is sufficient idle bandwidth to forward the message of the first data flow through the third device.
[0109] Through the above steps S306 and S307, it is possible to avoid forwarding the second message of the first data flow to the third device when the third device does not have enough idle bandwidth to forward the second message of the first data flow, thereby preventing the first data flow from continuing to be congested.
[0110] In a specific implementation, the second device in the embodiment of the present application can also receive messages of the third data stream from the fourth device. The output port corresponding to the third data stream in the second device can be the same as the output port corresponding to the first data stream. The congestion of the second device can specifically be that the first data stream and the third data stream are congested at the same output port.
[0111] For example, continuing with the communication system shown in Figure 1, the first device may be the second node B1, the second device may be the first node A1, the source node of the first data flow may be the third node C1, and the destination node of the first data flow may be the third node C5. The fourth device may be the second node B2, the source node of the third data flow may be the third node C3, and the destination node of the third data flow may be the third node C6. Both the first and third data flows need to be forwarded through the first node A1 to the second node B3, so congestion may occur at port a13 of the first node A1 for the first and third data flows.
[0112] As a possible implementation, if congestion occurs at the same port on the second device for the first and third data streams, the second device may choose to continue forwarding the third data stream through the second device, while discontinuing forwarding of the first data stream through the second device. In this case, the second device may instruct the first device to switch the forwarding path for the first data stream. For this implementation, please refer to the description of the first instruction information instructing the first device to switch the forwarding path for the first data stream in S303 and S304 above.
[0113] As another possible implementation, if congestion occurs at the same port on the second device for the first and third data streams, the second device may send an indication to both the first and fourth devices, indicating the congestion. The first device then switches the forwarding path for the first data stream based on the indication, or the fourth device switches the forwarding path for the third data stream based on the indication. The above embodiments illustrate the case where the first device switches the forwarding path for the first data stream.
[0114] In one specific implementation, the fourth device may also receive third indication information from the second device, the third indication information being used to indicate that congestion has occurred on the second device. After receiving the third indication information, the fourth device may wait for a third duration before determining whether to switch the forwarding path for the third data stream. If, after the third duration, the fourth device still receives fourth indication information indicating that congestion has occurred on the second device, the fourth device may determine to switch the forwarding path for the third data stream.
[0115] In the embodiments of this application, the example of a first device switching the forwarding path for the first data stream is used for illustration. The third duration is greater than the first duration. After the first device switches the forwarding path for the first data stream, congestion at the second device is relieved. Consequently, after receiving the third indication message and waiting for the third duration, the fourth device will no longer receive the fourth indication message and will continue to send messages for the third data stream to the second device.
[0116] For example, after the second device sends a message indicating that the second device is congested to the first device and the fourth device, the processing flow of the first device and the fourth device can be as shown in Figure 4. Referring to Figure 4, after receiving the first indication information indicating that the second device is congested, the first device can start a first timer, and the duration of the first timer is 10 milliseconds (ms). After receiving the third indication information indicating that the second device is congested, the fourth device can start a second timer, and the duration of the second timer is 20ms. When the first timer expires (i.e., after 10ms), the congestion of the second device has not been relieved, so the first device switches the forwarding path of the first data stream. Since the first device cuts off the first data stream, the congestion of the second device has been relieved when the second timer expires (i.e., after 20ms), so the fourth device no longer needs to switch the forwarding path of the third data stream.
[0117] In a specific implementation, the second device may have multiple outbound ports corresponding to the first data stream. A mapping relationship may be established between different ports connected to different devices, and the second device may select a port to forward the first data stream based on the mapping relationship between the ports.
[0118] For example, the second device may be the first node A1 in FIG2 , and the first node A1 includes two ports connected to the second node B1, the second node B2, and the second node B3. A mapping relationship may be established between the ports connected to the first node A1 and different second nodes. For example, the two ports on the first node A1 connected to the second node B1 may correspond one-to-one with the two ports on the first node A1 connected to the second node B2, the two ports on the first node A1 connected to the second node B1 may correspond one-to-one with the two ports on the first node A1 connected to the second node B3, and the two ports on the first node A1 connected to the second node B2 may correspond one-to-one with the two ports on the first node A1 connected to the second node B3. The first node A1 may forward messages between different second nodes based on the mapping relationship between the ports connected to different second nodes.
[0119] As one possible implementation, if a second device has multiple egress ports corresponding to a first data flow, and congestion occurs within the second device, the second device can first determine whether any of the multiple egress ports corresponding to the first data flow has an egress port utilization rate less than a third threshold. If so, the second device can then send subsequent packets of the first data flow through the egress port with utilization rate less than the third threshold among the multiple egress ports corresponding to the first data flow. Based on this solution, when congestion occurs, the second device can prioritize switching between internal ports to alleviate congestion.
[0120] For example, taking the second device as the first node A1 in Figure 2 , Figure 5 shows a schematic diagram of data forwarding by the second device. As shown in Figure 5 , the two ports connecting the first node A1 to the second node B1 may be p11 and p12, the two ports connecting the first node A1 to the second node B2 may be p21 and p22, and the two ports connecting the first node A1 to the second node B3 may be p31 and p32. Currently, the first node A1 receives data stream 1 from the second node B1 via port p11 and sends data stream 1 to the second node B3 via port p31. Furthermore, the first node A1 receives data stream 2 from the second node B2 via port p21 and sends data stream 1 to the second node B3 via port p31. Data stream 1 and data stream 2 may be congested on port p31. In this case, the first node A1 may switch data stream 2 to port p32 for transmission.
[0121] As a possible implementation, if the second device includes multiple egress ports corresponding to the first data flow, before the second device sends the first indication information to the first device, the data forwarding method may further include: the second device determining that the bandwidth utilization of the multiple egress ports corresponding to the first data flow is greater than a third threshold. It should be understood that if the bandwidth utilization of the multiple egress ports corresponding to the first data flow is greater than the third threshold, it indicates that none of the multiple egress ports corresponding to the first data flow are idle. Only in this case will the second device instruct the first device to switch the forwarding path for the first data flow to avoid further congestion of the first data flow.
[0122] For example, taking the second device as the first node A1 in Figure 2 , Figure 6 shows a schematic diagram of data forwarding by the second device. As shown in Figure 6 , the two ports connecting the first node A1 to the second node B1 may be p11 and p12, the two ports connecting the first node A1 to the second node B2 may be p21 and p22, and the two ports connecting the first node A1 to the second node B3 may be p31 and p32. Currently, the first node A1 receives data stream 1 from the second node B1 via port p11 and sends data stream 1 to the second node B3 via port p31. Furthermore, the first node A1 receives data stream 2 from the second node B1 via port p12 and sends data stream 2 to the second node B3 via port p32. Furthermore, the first node A1 receives data stream 3 from the second node B2 via port p21 and sends data stream 3 to the second node B3 via port p32. Data streams 2 and 3 may be congested at port p32, while both ports connecting the first node A1 to the second node B3 are already in use. In this case, the first node A1 can instruct the second node B1 to cut off data flow 2 so that port p32 is no longer congested. Alternatively, the first node A1 can instruct the second node B2 to cut off data flow 3 so that port p32 is no longer congested.
[0123] The above-mentioned data forwarding method in the embodiment of the present application can be performed by a communication device. Among them, the communication device can be the first device in the above-mentioned method embodiment, or a device including the above-mentioned first device, or a component that can be used for the first device. Alternatively, the communication device can be the second device in the above-mentioned method embodiment, or a device including the above-mentioned second device, or a component that can be used for the second device. In order to realize the above-mentioned functions, the communication device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy for those skilled in the art to appreciate that, in combination with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0124] Figure 7 shows a schematic structural diagram of a communication device 70 provided in the present application. Referring to Figure 7, the communication device 70 may include a receiving unit 701, a sending unit 702, and a processing unit 703. The communication device 70 can be applied to the above-mentioned first device and can be used to implement all or part of the operations performed by the first device. Specifically, the receiving unit 701 can be used to receive a first message of a first data stream through a first port. The sending unit 702 can be used to send the first message of the first data stream to a second device through a second port based on a first mapping relationship. Specifically, the first mapping relationship indicates that the first port and the second port correspond. The receiving unit 701 can also be used to receive first indication information from the second device, the first indication information being used to indicate that congestion has occurred in the second device. The processing unit 703 can be used to determine a second mapping relationship based on the first indication information, the second mapping relationship indicating that the first port corresponds to a third port. The sending unit 702 can also be used to send a second message of the first data stream to a third device through a third port based on the second mapping relationship.
[0125] Optionally, the processing unit 703 determines the second mapping relationship according to the first indication information, which may specifically include: the processing unit 703 updates the first mapping relationship to the second mapping relationship according to the first indication information.
[0126] Optionally, the receiving unit 701 may be further configured to receive second indication information from a second device after receiving the first indication information. The second indication information may also be configured to indicate that congestion has occurred in the second device, and that the time interval between the first device receiving the second indication information and the first indication information is greater than a first duration. The processing unit 703 may determine the first mapping relationship based on the first indication information, which may specifically include: the processing unit 703 determining the second mapping relationship based on the time interval between the second indication information and the first indication information being received being greater than the first duration.
[0127] Optionally, the sending unit 702 may be further configured to send a first query message to the third device, the first query message being configured to query the bandwidth utilization of the egress port corresponding to the first data stream in the third device. The receiving unit 701 may be further configured to receive a first response message from the third device, the first response message being configured to indicate that the bandwidth utilization of the egress port corresponding to the first data stream in the third device is less than a second threshold.
[0128] Figure 8 shows a structural diagram of a communication device 80 provided in the present application. Referring to Figure 8, the communication device 80 may include a receiving unit 801 and a sending unit 802. The communication device 80 can be applied to the above-mentioned second device, and can be used to implement all or part of the operations performed by the second device. Among them, the receiving unit 801 can be used to receive a first message of a first data stream from a first device, and the sending unit 802 can be used to send a first indication information to the first device. Among them, the first indication information is used to indicate that congestion occurs in the second device, and the first indication information is also used to enable the first device to determine a second mapping relationship, the second mapping relationship indicates that the first port corresponds to the third port, the first port is the port for the first device to receive the first message of the first data stream, and the third port is the port for the first device to send the second message of the first data stream to the third device.
[0129] Optionally, the communication device 80 may further include a processing unit 803. The processing unit 803 may be configured to determine whether bandwidth utilization rates of multiple egress ports corresponding to the first data flow are all greater than a third threshold before the sending unit 802 sends the first indication information to the first device.
[0130] It should be noted that all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here. Since the communication device 70 or the communication device 80 provided in this embodiment can perform the above data forwarding method, the technical effects that can be obtained can be referred to the above method embodiment and will not be repeated here.
[0131] It should be understood that the module division in the embodiments of the present application is illustrative and merely represents a logical functional division. In actual implementation, other division methods may be employed. For example, two or more functions may be integrated into a single processing module. Furthermore, the integrated modules may be implemented in either hardware or software functional modules, and this application does not impose any limitations thereon.
[0132] In this embodiment, the communication device 70 or the communication device 80 is presented in the form of various functional modules divided in an integrated manner. The "module" here can refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and / or other devices that can provide the above functions.
[0133] In a specific implementation, the communication device 70 or the communication device 80 may take the form of the communication device 90 shown in Figure 9. As shown in Figure 9, the communication device 90 includes a processor 901, a communication line 902, and at least one communication interface 903. Among them, the processor 901 can be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. The communication line 902 may include a path for communication between different components, for example, the processor 901 and the communication interface 903 are connected via the communication line 902. The communication interface 903 can be a transceiver module for communicating with other devices, for example, it can be a device such as a transceiver or a transceiver.
[0134] In a specific implementation, the processor 901 performs processing-related functions in the data forwarding method provided in the embodiment of the present application, and the communication interface 903 is used to perform sending and receiving-related behaviors in the data forwarding method provided in the embodiment of the present application.
[0135] In a specific implementation, as shown in FIG9 , the communication device 90 may further include a memory 904 , which may be a device having a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 904 may be connected to the processor 901 via a communication line 902 .
[0136] In one specific implementation, memory 904 is used to store computer-executable instructions for executing the solution of the present application. Processor 901 is used to execute the computer-executable instructions stored in memory 904, thereby implementing the data forwarding method provided in the embodiments of the present application. The computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0137] As an embodiment, the processor 901 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 9 .
[0138] As an embodiment, the communication device 90 may include multiple processors, such as the processor 901 and the processor 907 in FIG9 . Each of these processors may be a single-core processor or a multi-core processor. The processors here may include, but are not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., and each computing device may include one or more cores for executing software instructions to perform calculations or processing.
[0139] As an embodiment, the communication device 90 may further include an output device 905 and an input device 906. The output device 905 communicates with the processor 901 and can display information in a variety of ways. For example, the output device 905 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 906 communicates with the processor 901 and can receive user input in a variety of ways. For example, the input device 906 can be a mouse, a keyboard, a touch screen device, or a sensor device.
[0140] Since the communication device 90 provided in this embodiment can execute the above-mentioned data forwarding method, the technical effects that can be obtained can refer to the above-mentioned method embodiments and will not be repeated here.
[0141] In the various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art will clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units described is merely a logical functional division. In actual implementation, other divisions may be employed. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through interfaces, or indirect coupling or communication connection between devices or units, which may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in a single location or distributed across multiple network units. Some or all of these units may be selected to achieve the objectives of the present embodiments as needed. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. In the above embodiments, all or part of the implementation may be achieved through software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the implementation may be in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)).
[0142] As used in this application, the terms "component", "module", "system" and the like are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program and / or a computer. As an example, both an application running on a computing device and the computing device can be a component. One or more components can exist in a process and / or thread in execution, and a component can be located in a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures thereon. These components can communicate in the form of local and / or remote processes, such as based on signals having one or more data packets (e.g., data from a component that interacts with another component in a local system, a distributed system and / or interacts with other systems in the form of signals over a network such as the Internet). This application presents various aspects, embodiments or features around a system that can include multiple devices, components, modules, etc. It is to be understood and appreciated that the various systems may include additional devices, components, modules, etc. and / or may not include all of the devices, components, modules, etc. discussed in connection with the figures. Furthermore, combinations of these aspects may also be used.
[0143] In addition, in the embodiments of the present application, the word "exemplary" is used to indicate an example, illustration or explanation. Any embodiment or design described in the present application as an "example" should not be interpreted as being more preferred or more advantageous than other embodiments or design. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete way. In the embodiments of the present application, information, signal, message, and channel are sometimes used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. "of", "corresponding, relevant" and "corresponding" are sometimes used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. "System" and "network" are sometimes used interchangeably. When the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, "communication network" also refers to "communication system". The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field will know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0144] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A data forwarding method, characterized in that: The method comprises: The first device receives a first message of a first data stream through a first port; The first device sends the first message of the first data stream to the second device through the second port according to the first mapping relationship; wherein the first mapping relationship indicates that the first port and the second port correspond; The first device receives first indication information sent by the second device, where the first indication information is used to indicate that congestion occurs in the second device; The first device determines a second mapping relationship according to the first indication information, where the second mapping relationship indicates that the first port corresponds to a third port; The first device sends the second message of the first data flow to the third device through the third port according to the second mapping relationship.
2. The method according to claim 1, characterized in that The first device determines a second mapping relationship according to the first indication information, including: The first device updates the first mapping relationship to the second mapping relationship according to the first indication information.
3. The method according to claim 1, characterized in that The bandwidth utilization of the third port is less than a first threshold.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: After receiving the first indication information, the first device further receives second indication information from the second device; wherein the second indication information is used to indicate that congestion occurs in the second device; The first device determining the second mapping relationship according to the first indication information includes: Based on the fact that the time interval between the first device receiving the second indication information and the first indication information is greater than the first duration, the first device determines the second mapping relationship.
5. The method according to claim 4, characterized in that The first indication information and the second indication information are carried in a priority-based flow control PFC back pressure frame.
6. The method according to any one of claims 1 to 3, characterized in that The first indication information includes information indicating the first data flow.
7. The method according to any one of claims 1 to 6, characterized in that Before the first device determines the second mapping relationship, the method further includes: The first device sends a first query message to the third device, where the first query message is used to query the bandwidth utilization of the egress port corresponding to the first data flow in the third device; The first device receives a first response message from the third device, where the first response message is used to indicate that a bandwidth utilization rate of an egress port corresponding to the first data flow in the third device is less than a second threshold.
8. The method according to any one of claims 1 to 7, characterized in that The first device is a leaf switch in a spine-leaf network architecture, and the second device is a spine switch in a spine-leaf network architecture.
9. The method according to any one of claims 1 to 7, characterized in that The first device is an access device, and the second device is a convergence device.
10. The method according to any one of claims 1 to 9, characterized in that The bandwidth of the second port is greater than or equal to the bandwidth of the first port, and the bandwidth of the third port is greater than or equal to the bandwidth of the first port.
11. The method according to any one of claims 1 to 10, characterized in that The first data stream is a data stream of an artificial intelligence (AI) business or a high-performance computing (HPC) business.
12. A data forwarding method, characterized in that: The method comprises: The second device receives the first message of the first data stream sent by the first device; The second device sends first indication information to the first device; wherein the first indication information is used to indicate that congestion occurs in the second device, and the first indication information is also used to enable the first device to determine a second mapping relationship, the second mapping relationship indicates that the first port corresponds to the third port, the first port is the port for the first device to receive the first message of the first data stream, and the third port is the port for the first device to send the second message of the first data stream to the third device.
13. The method according to claim 12, characterized in that The second device includes a plurality of outbound ports corresponding to the first data flow; and before the second device sends the first indication information to the first device, the method further includes: The second device determines that bandwidth utilization rates of multiple egress ports corresponding to the first data flow are all greater than a third threshold.
14. The method according to claim 12 or 13, characterized in that The first indication information is carried in a priority-based flow control PFC back pressure frame.
15. The method according to claim 12 or 13, characterized in that The first indication information includes information indicating the first data flow.
16. The method according to any one of claims 12 to 15, characterized in that: The first device is a leaf switch in a spine-leaf network architecture, and the second device is a spine switch in a spine-leaf network architecture.
17. The method according to any one of claims 12 to 15, characterized in that: The first device is an access device, and the second device is a convergence device.
18. The method according to any one of claims 12 to 17, characterized in that: The bandwidth of the third port is greater than or equal to the bandwidth of the first port.
19. The method according to any one of claims 12 to 18, characterized in that: The first data stream is a data stream of an artificial intelligence (AI) business or a high-performance computing (HPC) business.
20. A communication device, characterized in that: The communication device includes: a processor and a memory; The memory is used to store program instructions. When the processor executes the program instructions, the communication device executes the method according to any one of claims 1 to 11 or 12 to 19.
21. A communication system, characterized in that: The communication system includes a first device and a second device; wherein the first device executes the method according to any one of claims 1 to 11, and the second device executes the method according to any one of claims 12 to 19.
22. A computer-readable storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 11 or 12 to 19.
23. A computer program product, characterized in that The computer program product comprises computer instructions which, when executed on a processor, cause the processor to perform the method according to any one of claims 1 to 11 or 12 to 19.
Citation Information
Patent Citations
Congested flow processing method and equipment
CN114095448A
Method for sending data stream and related device
CN117376258A
Data transmission method and data transmission system
CN117793009A
Method for dynamic load balancing of network flows on LAG interfaces
US20140119193A1