Method for determining duration for stopping sending data and related device
By calculating the duration of the backpressure frame, the congestion level of the sending port can be accurately determined, solving the problem of inaccurate backpressure frame duration in existing technologies and improving network communication efficiency and data flow management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, flow control backpressure frames based on priority queues cannot accurately determine the true duration for which the sender stops transmitting data, resulting in a large error between the network detection results and the actual network state, which affects network communication efficiency.
By determining the times of receiving and sending backpressure frames, the backpressure duration is calculated to accurately reflect the port's congestion level, including the time of receiving the first backpressure frame and the time of resuming data transmission, and the duration of stopping data transmission is precisely calculated.
It improves the accuracy of network detection results, can truly reflect the network congestion status, enhance network planning and communication efficiency, and realize the optimized migration and routing adjustment of data flows.
Smart Images

Figure CN121644462A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and in particular to a method for determining a time length for stopping sending data and related apparatus. BACKGROUND
[0002] A data center or a cloud service provider can deploy remote direct memory access (RDMA) to make the network achieve the purpose of low latency, high throughput and low computing overhead. In the RDMA technology, RDMA over converged Ethernet (RoCE) is a commonly used technology, and RoCE adopts priority flow control (PFC) to provide lossless transmission of the network.
[0003] The working principle of PFC is as follows: when the buffer of any one priority queue in the receiving end reaches the back pressure threshold, the receiving end sends a PFC back pressure frame, which can also be referred to as a pause frame, a PFC back pressure packet, a pause packet, an XOFF frame or an XOFF signal, to the sending end for the priority queue. In response to the PFC back pressure frame, the sending end stops sending data of the priority queue to avoid data loss. When the buffer of the priority queue in the receiving end reaches the back pressure stop threshold, the receiving end sends a PFC back pressure stop frame, which can also be referred to as a pause stop frame, a PFC back pressure stop packet, a pause stop packet, an XON frame or an XOFF signal, to the sending end for the priority queue. In response to the PFC back pressure stop frame, the sending end resumes sending data of the priority queue. In order to prevent the sending end from pausing sending data for a long time in response to a single PFC back pressure frame, affecting normal communication, a corresponding data amount threshold is set for each PFC back pressure frame. When the sending end receives the PFC back pressure frame, it stops sending data of the priority queue corresponding to the PFC back pressure frame, and when the amount of stopped data reaches the data amount threshold, the sending end resumes sending data of the priority queue.
[0004] Currently, the sending end can determine the network detection result according to the number of received PFC backpressure frames and the data volume threshold corresponding to each PFC backpressure frame. However, after the sending end receives a PFC backpressure frame, if the sending end receives a PFC backpressure stop frame corresponding to the priority queue, the sending end immediately resumes sending data of the priority queue in response to the PFC backpressure stop frame. At this time, the data volume of the priority queue stopped sending may not reach the data volume threshold of the PFC backpressure frame. Therefore, the real stopped sending data volume cannot be determined based on the number of PFC backpressure frames. There is a large error between the network detection result determined based on the number of PFC backpressure frames and the real network state, and the network detection result cannot reflect the real network congestion state. SUMMARY
[0005] Embodiments of the present application provide a method for determining the duration of stopped sending data and related apparatuses. The method includes determining a first duration, which indicates the duration of the first port stopping sending data in response to a backpressure frame. Based on the first duration, the congestion degree of the first port can be truly reflected, and the node in the network that occurs congestion can be accurately identified, thereby improving the network planning effect and improving the communication efficiency.
[0006] In a first aspect, embodiments of the present application provide a method for determining the duration of stopped sending data. The method is applied to a first device, and includes determining a first time of receiving a first backpressure frame, the first backpressure frame being used to indicate the first port to stop sending data; determining a second time of receiving a second backpressure frame, the second backpressure frame being used to indicate the first port to resume sending data; and determining a first duration of the first port according to the first time and the second time, wherein the first duration of the first port indicates the duration of the first port stopping sending data in response to the first backpressure frame.
[0007] The first device can determine the first time in the following manner:
[0008] In a possible implementation manner, when the first device receives the first backpressure frame, the first device records the time when the first backpressure frame arrives at the first port as the first time.
[0009] In another possible implementation manner, the first device determines the first time by detecting whether the first port is in a stopped sending data state. The first device records the time when the first port changes from a sending data state to the stopped sending data state as the first time. In an example, the first device determines the first time by scanning whether the first port stops sending data.
[0010] The first device can determine the second time in the following manner:
[0011] In a possible implementation manner, when the first device receives the second backpressure frame, the first device records the time when the second backpressure frame arrives at the first port as the second time.
[0012] In another possible implementation, the first device detects whether the first port is in a data sending state to determine the second time. The first device takes the time when the first port changes from the data stopping sending state to the data sending state as the second time. In an example, the first device determines the second time by scanning whether the first port sends data.
[0013] In the method, the first device determines the first duration according to the first time and the second time, and the first duration indicates a duration in which the first port stops sending data in response to the first back pressure frame. The first duration can also be referred to as a flow stopping duration or a back pressure duration. Compared with determining an amount of data that a port stops sending according to a number of back pressure frames, the above technical solution has the characteristic of high accuracy, and the high-accuracy first duration can reflect a real network congestion state of the first port.
[0014] With reference to the first aspect, in a possible implementation of the first aspect, the first back pressure frame and the second back pressure frame are pause frames.
[0015] A pause frame is a special Ethernet frame and is mainly used for flow control. When a receiving port needs to pause data transmission, the receiving port can send a pause frame to an upstream sending port. The sending port stops sending data for a duration in response to the pause frame to relieve the pressure of the receiving port.
[0016] With reference to the first aspect, in a possible implementation of the first aspect, the first back pressure frame is a priority-based flow control (PFC) back pressure frame, and the second back pressure frame is a PFC back pressure stop frame.
[0017] In a possible implementation, the first port enables PFC back pressure, the back pressure frame corresponding to the PFC back pressure includes the first back pressure frame, and the first device determines that the first back pressure frame is a back pressure frame for the first port. The first device takes a time when the first device receives the first back pressure frame as the first time. For example, the first device determines the first time according to a field of the first back pressure frame, and the field of the first back pressure frame indicates the first time.
[0018] In a possible implementation, the first port enables PFC back pressure, the back pressure frame corresponding to the PFC back pressure includes the first back pressure frame, and the first device determines that the first back pressure frame is a back pressure frame for the first port. The first device takes a time when the first device receives the first back pressure frame as the first time. For example, the first device determines the first time according to a field of the first back pressure frame, and the field of the first back pressure frame indicates the first time.
[0019] In conjunction with the first aspect, in one possible implementation of the first aspect, the method further includes: obtaining a second duration of the first port, the second duration of the first port indicating the duration for which the first port sends data; determining a network detection result of the first port based on the first duration and the second duration of the first port, the network detection result of the first port indicating the degree of congestion of the first port.
[0020] In the above technical solution, the second duration can also be referred to as the flow duration. The first device determines the network detection result of the first port based on the first duration and the second duration of the first port. The network detection result obtained based on the first duration also has high accuracy; therefore, this network detection result can accurately reflect the congestion level of the first port. Based on this network detection result, nodes experiencing congestion in the network can be accurately identified, improving network planning effectiveness and communication efficiency.
[0021] In conjunction with the first aspect, in one possible implementation of the first aspect, the method further includes: when the network detection result of the first port meets the first condition, determining the second port, wherein the congestion level of the second port is lower than that of the first port, and the priority of the second port is equal to that of the first port; migrating the data stream carried by the first port to the second port, and then transmitting the data stream by the second port after migration.
[0022] In the above technical solution, after the first device determines whether the first port is a heavily loaded port or a congested port based on the network detection results of the first port, the first device can migrate the data stream carried by the first port to other lightly loaded ports or uncongested ports for transmission, so as to improve communication efficiency.
[0023] In conjunction with the first aspect, in one possible implementation of the first aspect, obtaining the second duration of the first port includes: obtaining the bandwidth value of the first port; obtaining the amount of data transmitted by the first port; and determining the second duration of the first port based on the amount of data transmitted by the first port and the bandwidth value of the first port.
[0024] In the above technical solution, the first device can determine the second duration of the first port based on the bandwidth value and the amount of data transmitted by the first port. The first device can determine the second duration of the first port by detecting the duration of data transmission by the first port. The embodiments of this application do not limit the method for determining the second duration.
[0025] In conjunction with the first aspect, in one possible implementation of the first aspect, the detection duration for determining the first duration of the first port is the same as the detection duration for determining the second duration of the first port.
[0026] In conjunction with the first aspect, in one possible implementation of the first aspect, obtaining the transmission data volume of the first port includes: obtaining a first data volume of the first port, wherein the first data volume of the first port is the transmission data volume of the first port at the start of the detection duration; obtaining a second data volume of the first port, wherein the second data volume of the first port is the transmission data volume of the first port at the end of the detection duration; and determining the transmission data volume of the first port by subtracting the first data volume from the second data volume.
[0027] Optionally, the amount of data transmitted on the first port can be replaced with the data stream traffic on the first port.
[0028] In conjunction with the first aspect, in one possible implementation of the first aspect, the first duration body is used to indicate the duration for which the first priority queue of the first port stops sending data in response to the first backpressure frame.
[0029] In the above technical solution, the first duration can also be a priority granularity. The first duration of the first priority queue indicates the duration for which the first priority queue stops sending data in response to the first anti-pressure frame.
[0030] In conjunction with the first aspect, in one possible implementation of the first aspect, the first duration is also used to indicate the duration from the first time point to the second time point. The first duration can also be referred to as the pause duration in response to the first backpressure frame.
[0031] In conjunction with the first aspect, in one possible implementation of the first aspect, the method further includes: obtaining the second duration of the first priority queue, the second duration of the first priority queue indicating the duration for which the first priority queue sends data; determining the network detection result of the first priority queue based on the first duration and the second duration of the first priority queue, the network detection result of the first priority queue indicating the congestion level of the first priority queue.
[0032] Specifically, the first backpressure frame can be used not only to instruct the first port to stop transmitting data, but also to instruct the first priority queue included in the first port to stop transmitting data. The first port includes one or more priority queues, and the first priority queue in these priority queues enables PFC backpressure. Upon receiving the first backpressure frame, the first device stops transmitting data from the first priority queue in response to the first backpressure frame. Upon receiving the second backpressure frame, the first device resumes transmitting data from the first priority queue in response to the second backpressure frame. Therefore, the first device can also determine the first duration of the first priority queue based on the first time and the second time of the first priority queue. Furthermore, based on the first duration and the second duration of the first priority queue, the network detection result of the first priority queue is determined. Through the above method, the first device can determine the network detection result at the priority queue granularity to determine the network congestion level at the priority queue granularity, improving the granularity of the network detection result and enhancing network planning performance.
[0033] In conjunction with the first aspect, in one possible implementation of the first aspect, the method further includes: when the network detection result of the first priority queue meets the second condition, determining the second priority queue, the congestion level of the second priority queue being lower than that of the first priority queue; migrating the data stream carried by the first priority queue to the second priority queue, and then transmitting the data stream by the second priority queue after migration.
[0034] Optionally, the priority of the second priority queue is equal to the priority of the first priority queue.
[0035] It should be noted that the second priority queue can be the priority queue of the first port or the priority queue of other ports; this application embodiment does not impose any restrictions.
[0036] In the above technical solution, after the first device determines whether the first priority queue is a heavily loaded priority queue or a congested priority queue based on the network detection results of the first priority queue, the first device can migrate the data stream carried by the first priority queue to other lightly loaded priority queues or non-congested priority queues for transmission, so as to improve communication efficiency.
[0037] In conjunction with the first aspect, in one possible implementation of the first aspect, obtaining the second duration of the first priority queue includes: obtaining the bandwidth value of the first priority queue; obtaining the amount of data transmitted by the first priority queue; and determining the second duration of the first priority queue based on the amount of data transmitted by the first priority queue and the bandwidth value of the first priority queue.
[0038] In conjunction with the first aspect, in one possible implementation of the first aspect, the network detection result includes one or more of the following: the ratio of a first duration to a second duration; a first difference, the first difference being: the difference between the first duration determined within the second detection duration and the first duration determined within the first detection duration, wherein the second detection duration is later than the first detection duration; or, the ratio of the first difference to a second difference, the second difference being: the start time of the second detection duration minus the end time of the first detection duration.
[0039] In the above technical solutions, network detection results can be represented in multiple ways, which improves the flexibility of the solution implementation.
[0040] In conjunction with the first aspect, in one possible implementation of the first aspect, the method further includes: sending indication information based on the first duration of the first port, the indication information being used to adjust the routing and forwarding strategy of the data stream carried by the first port.
[0041] In the above technical solution, the first device can also instruct other nodes in the network to adjust the routing and forwarding strategy of the data stream carried by the first port in order to alleviate congestion of the first port and improve communication efficiency.
[0042] In conjunction with the first aspect, in one possible implementation of the first aspect, the method further includes: sending indication information based on the network detection results of the first port, the indication information being used to adjust the routing and forwarding strategy of the data stream carried by the first port.
[0043] Optionally, the first device may also send indication information based on the first duration of the first port. For example, if the first duration of the first port is greater than or equal to a first threshold, the first device sends indication information.
[0044] In conjunction with the first aspect, in one possible implementation of the first aspect, the instruction information is specifically used to instruct the data flow carried by the first forwarding path to migrate to the second forwarding path, the first forwarding path passing through the first port, and the congestion level of the second forwarding path being lower than that of the first forwarding path.
[0045] Optionally, the second forwarding path does not pass through the first port.
[0046] For example, in graceful adaptive routing applications, a spine node determines that a local port is congested based on network detection results for each port (e.g., the first and second durations of each port). The spine node then sends an announcement message to the upstream leaf node, carrying indication information. In response to this indication information, the upstream leaf node migrates the data flow carried by the first forwarding path to the second forwarding path.
[0047] In conjunction with the first aspect, in one possible implementation of the first aspect, the instruction information is specifically used to indicate that the data flow performing load balancing based on the first port group is adjusted to perform load balancing based on the second port group, the first port group including the upstream port of the first port, and the traffic of the first port when performing load balancing based on the second port group is less than the traffic of the first port when performing load balancing based on the first port group.
[0048] Optionally, the second port group does not include the upstream port of the first port.
[0049] For example, in a load balancing application scenario, when a Spine node determines that a local port is congested based on network detection results of its local ports, it sends an announcement message to the upstream Leaf node, carrying indication information. The upstream Leaf node responds to this indication information by avoiding the congested port (the first port). For instance, if there are two equivalent ports between the Leaf node and the Spine node: port 1 and port 2, and port 2 receives the indication information from the Spine node, the Spine node will update the port group on which load balancing is based from ports 1, 2, 3, and 4 to ports 1, 3, 5, and 7. This avoids the downstream path where port 2 is congested. Optionally, the traffic distribution ratio of each port in the port group can also be adjusted to alleviate congestion on the downstream path of port 2.
[0050] Secondly, embodiments of this application propose a method for determining the duration of data transmission cessation. The method is applied to a second device and includes: receiving indication information from a first device, the indication information being used to adjust the routing and forwarding strategy of a data stream carried by a first port of the first device, the indication information being obtained based on a first duration of the first port, or the indication information being obtained based on a network detection result of the first port, the first duration of the first port indicating the duration for which the first port stops transmitting data in response to a first anti-pressure frame, and the network detection result of the first port indicating the congestion level of the first port; and adjusting the routing and forwarding strategy of the data stream carried by the first port according to the indication information.
[0051] In the above technical solution, the second device can also adjust the routing and forwarding strategy of the data stream carried by the first port according to the instruction information of the first device, so as to alleviate congestion of the first port and improve communication efficiency. Since the instruction information is obtained based on the first duration of the first port, the instruction information has the characteristic of high accuracy.
[0052] In conjunction with the second aspect, in one possible implementation of the second aspect, the routing and forwarding strategy of the data flow carried by the first port is adjusted according to the instruction information, including: determining the congestion level of the first forwarding path according to the instruction information, the first forwarding path passing through the first port; forwarding the data flow carried by the first forwarding path through the second forwarding path, the congestion level of the second forwarding path being lower than that of the first forwarding path.
[0053] Optionally, the second forwarding path does not pass through the first port.
[0054] Optionally, the second device can also determine the congestion level of the first forwarding path based on the network detection results local to the second device. The local network detection results of the second device can indicate the port-level congestion level, such as the congestion level of the ports traversed by the first forwarding path in the second device; they can also indicate the queue-level congestion level, such as the congestion level of the priority queue corresponding to the first forwarding path in the second device; or they can simply indicate the node-level congestion level, such as the congestion level of the second device itself. This embodiment of the application does not limit this. Furthermore, the second device can also determine the congestion level of the first forwarding path based on a first time event local to the second device.
[0055] For example, in a graceful adaptive routing application scenario, a Spine node determines that its local port is congested based on network detection results for each port (e.g., the first and second durations of each port). The Spine node then sends an announcement message to the upstream Leaf node, carrying indication information. The upstream Leaf node responds to this indication information by migrating the data flow carried by the first forwarding path to the second forwarding path.
[0056] In conjunction with the second aspect, in one possible implementation of the second aspect, adjusting the routing and forwarding strategy of the data flow carried by the first port according to the instruction information includes: determining the congestion level of the first port group according to the instruction information, the first port group including one or more ports, the first port group including the upstream port of the first port, the first port group being used to perform load balancing of the first data flow, the first data flow including the data flow carried by the first port, the ingress port of the first data flow in the second device being the third port, and the first port group and the third port having a mapping relationship when performing load balancing of the first data flow based on the first port group; determining a second port group, the second port group including one or more ports, the congestion level of the second port group being lower than that of the first port group; using the second port group to perform load balancing of the first data flow, and the second port group and the third port having a mapping relationship when performing load balancing of the first data flow based on the second port group.
[0057] Optionally, the second port group does not include the upstream port of the first port.
[0058] For example, in a load balancing application scenario, when a Spine node determines that a local port is congested based on network detection results of its local ports, it sends an announcement message to the upstream Leaf node, carrying indication information. The upstream Leaf node responds to this indication information by avoiding the congested port (the first port). For instance, there might be two equivalent ports between the Leaf node and the Spine node: port 1 and port 2. Port 2 receives the indication information from the Spine node. The Spine node updates the port group on which load balancing is based from ports 1, 2, 3, and 4 to ports 1, 3, 5, and 7. Before updating the port group, the Spine node's ingress port is port A. The mapping between ingress and egress ports is: port A is mapped to the port group {port 1, port 2, port 3, and port 4}. Traffic received at port A is forwarded through the port group {port 1, port 2, port 3, and port 4}. After the update, the mapping relationship between the ingress and egress ports of the Spine node is as follows: Port A is mapped to the port group {Port 1, Port 3, Port 5, and Port 7}. Traffic received by Port A is forwarded through the port group {Port 1, Port 3, Port 5, and Port 7}. This method avoids the downstream path congestion on Port 2. Optionally, the traffic distribution ratio of each port in the port group can be adjusted to alleviate congestion on the downstream path of Port 2. For example, before the update, the traffic ratio of the port group {Port 1, Port 2, Port 3, and Port 4} was 1:1:1:1; after the update, the traffic ratio of the port group {Port 1, Port 2, Port 3, and Port 4} is 1:1:5:5. This method reduces the traffic pressure on the upstream ports (Port 1 and Port 2) of the first port, thereby reducing the traffic pressure on the first port and alleviating network congestion.
[0059] In conjunction with the second aspect, in one possible implementation of the second aspect, the second port group does not include the upstream port of the first port; or, the second port group includes the upstream port of the first port, and the traffic proportion of the upstream port of the first port in the second port group is less than the traffic proportion of the upstream port of the first port in the first port group.
[0060] In conjunction with the second aspect, in one possible implementation of the second aspect, the second device is the upstream node of the first device.
[0061] Thirdly, embodiments of this application propose a method for determining the duration of stopping data transmission. The method is applied to a third device and includes: obtaining a first duration of one or more first ports, wherein the first duration of the first port indicates the duration for which the first port stops transmitting data in response to a first backpressure frame; and determining a routing and forwarding strategy based on the first duration of one or more first ports.
[0062] For example, the third device is a network manager (or network controller) that manages the first device and / or the second device.
[0063] In one example scenario, the third device queries network topology and computation task information to perform network-wide routing orchestration, obtaining multiple routing results (or routing and forwarding strategies). Combining this with the initial time interval reported by the first device, the optimal solution can be determined from these multiple routing results. For example, the optimal routing result indicates the lowest level of congestion in the network.
[0064] In another example scenario, the third device updates the routing and forwarding strategy based on the first duration reported by the first device, in order to reduce network congestion and improve communication efficiency.
[0065] In conjunction with the third aspect, in one possible implementation of the third aspect, the method further includes:
[0066] Obtain network topology information that indicates the connection relationships between one or more communication devices;
[0067] Obtain communication relationship information of the second data stream, which indicates the source address and destination address of the second data stream, the second data stream including one or more data streams;
[0068] Based on the network topology information and the communication relationship information of the second data stream, a routing and forwarding strategy is determined.
[0069] For example, the one or more communication devices forward the second data stream according to the routing forwarding policy.
[0070] For example, the one or more communication devices may include a first device.
[0071] For example, the one or more communication devices may include a second device.
[0072] In one example scenario, after acquiring network topology information and communication relationship information of the second data stream, the third device determines a routing and forwarding strategy for the second data stream. The third device then distributes the routing and forwarding strategy for the second data stream to one or more communication devices in the network. These one or more communication devices forward the second data stream according to the routing and forwarding strategy. During the data stream forwarding process, the one or more communication devices execute the method performed by the first device in the first aspect described above. For example, the one or more communication devices, acting as the first device, report a first duration or a network detection result determined based on the first duration to the third device. Based on the first duration or the network detection result determined based on the first duration, the third device determines the priority queue, port, or communication device experiencing congestion. Then, the third device updates the routing and forwarding strategy for the second data stream. The updated routing and forwarding strategy can instruct the second data stream to bypass the congested priority queue, port, or communication device, thereby improving communication efficiency.
[0073] In conjunction with the third aspect, in one possible implementation of the third aspect, the second data stream corresponds to one or more artificial intelligence (AI) aggregate communication tasks.
[0074] In conjunction with the third aspect, in one possible implementation of the third aspect, the method further includes:
[0075] Acquire communication domain information, which indicates the communication domain used to perform the communication task of the one or more AI ensembles, the communication domain including one or more communication devices and computing devices corresponding to the one or more communication devices;
[0076] Based on the communication domain information, determine the routing and forwarding strategy.
[0077] In conjunction with the third aspect, in one possible implementation of the third aspect, determining the routing and forwarding strategy based on the first duration of one or more first ports includes: obtaining the second duration of one or more first ports, the second duration of the first ports indicating the duration for which the first ports send data; determining the network detection results of one or more first ports based on the first duration of one or more first ports and the second duration of one or more first ports, the network detection results of the first ports indicating the congestion level of the first ports; and determining the routing and forwarding strategy based on the network detection results of the first ports.
[0078] In the above technical solution, the third device can also determine the network detection result based on the first duration and the second duration reported by the first device, which improves the flexibility of the solution.
[0079] In conjunction with the third aspect, in one possible implementation of the third aspect, the method further includes: updating the routing and forwarding policy when the first duration of any one or more of the first ports meets the third condition.
[0080] In conjunction with the third aspect, in one possible implementation of the third aspect, the method further includes: updating the routing and forwarding policy when the network detection result of any one or more of the first ports meets the first condition.
[0081] In the above technical solution, the third device can trigger the update of the routing and forwarding policy under various conditions, which improves the flexibility of the solution implementation.
[0082] Fourthly, embodiments of this application provide a communication device including a processing unit and a transceiver unit, which is used to perform the methods of the first aspect and any one thereof.
[0083] Fifthly, embodiments of this application provide a communication device including a processing unit and a transceiver unit, the communication device being used to perform the methods of the second aspect and any one thereof described above.
[0084] In a sixth aspect, embodiments of this application provide a communication device including a processing unit and a transceiver unit, the communication device being used to perform the methods of the aforementioned third aspect and any one of the third aspects.
[0085] In a seventh aspect, embodiments of this application provide a chip including an interface circuit and a processing circuit, which are interconnected by a line. The processing circuit is used to run a computer program or instructions to perform the methods of the first aspect, the second aspect, or the third aspect.
[0086] Optionally, the chip includes at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being used to run computer programs or instructions to perform the methods of the first aspect, the second aspect, or the third aspect.
[0087] Optionally, the communication interface of the chip can be an input / output interface, pins, or circuits.
[0088] In conjunction with the seventh aspect, in one implementation of the seventh aspect of the present application, the chip described above further includes at least one memory, which stores instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0089] In an eighth aspect, embodiments of this application provide a computing device including at least one processor coupled to a memory; the memory is used to store a program or instructions; the at least one processor is used to execute the program or instructions to enable the device to implement any one of the possible implementations of the first, second, or third aspects described above.
[0090] In a ninth aspect, embodiments of this application provide a computing device, including a communication interface for inputting and / or outputting signaling or data; and a processor for executing a computer-executable program to enable the device to implement any one of the possible implementations of the first, second, or third aspects described above.
[0091] In a tenth aspect, embodiments of this application provide a computing device including at least one logic circuit and an input / output interface; the input / output interface is used to input or output information; the logic circuit is used to execute any one of the possible implementations of the first, second, or third aspects described above.
[0092] In the eleventh aspect, this application provides a communication system, including the communication device as described in the fourth aspect, the communication device as described in the fifth aspect, and / or the communication device as described in the sixth aspect.
[0093] In a twelfth aspect, this application provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the methods described in the first, second, or third aspects.
[0094] In a thirteenth aspect, this application provides a computer program product that, when run on a computer, causes the computer to perform the methods described in the first, second, or third aspects.
[0095] In a fourteenth aspect, this application provides a communication system including a communication device, wherein the communication device is used to perform the method as described in any one of the first, second, or third aspects above. Attached Figure Description
[0096] Figure 1 This is a network topology diagram for RDMA;
[0097] Figure 2 This is a schematic diagram of a PFC scenario;
[0098] Figure 3 This is a schematic diagram of a communication scenario involved in an embodiment of this application;
[0099] Figure 4a This is a schematic diagram of a communication system proposed in an embodiment of this application;
[0100] Figure 4b This is a schematic diagram of a communication system proposed in an embodiment of this application;
[0101] Figure 5 This is a schematic diagram of another communication system proposed in an embodiment of this application;
[0102] Figure 6 This is a schematic diagram of another communication system proposed in an embodiment of this application;
[0103] Figure 7 This is a schematic diagram of another communication system proposed in an embodiment of this application;
[0104] Figure 8 This is a schematic diagram of a scenario for PFC anti-compression frames;
[0105] Figure 9 This is a schematic diagram of another scenario for PFC anti-compression frames;
[0106] Figure 10 This is a flowchart illustrating an embodiment of the method for determining the duration of data transmission cessation in this application.
[0107] Figure 11 This is a schematic diagram of a PFC backpressure scenario involved in an embodiment of this application;
[0108] Figure 12 This is a schematic diagram of an application scenario in the embodiments of this application;
[0109] Figure 13 This is a schematic diagram illustrating yet another application scenario in the embodiments of this application;
[0110] Figure 14 This is a schematic diagram illustrating yet another application scenario in the embodiments of this application;
[0111] Figure 15 This is a schematic diagram of the structure of a communication device 1500 provided in an embodiment of this application;
[0112] Figure 16 This is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of this application;
[0113] Figure 17 This is a schematic diagram of the structure of a communication device 1700 provided in an embodiment of this application;
[0114] Figure 18 This is a schematic diagram of a communication system 1800 proposed in an embodiment of this application. Detailed Implementation
[0115] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0116] First, let's introduce some concepts involved in the embodiments of this application.
[0117] 1. Remote Direct Memory Access (RDMA).
[0118] To meet the increasingly complex computing demands of artificial intelligence (AI), data centers often contain numerous distributed computing clusters. However, in these clusters, communication latency from a large number of parallel programs can impact computational efficiency. To reduce network latency and improve computational efficiency, Remote Memory Access (RDMA) technology was developed. RDMA allows applications to directly read and write to remote memory, thus bypassing the kernel to write data directly to the network card without processor intervention, achieving high throughput, ultra-low latency, and low processor overhead.
[0119] For easier understanding, please refer to Figure 1 , Figure 1 This is a network topology diagram for RDMA. The network includes: backbone node (Spine) 1, Spine 2, leaf node (Leaf) 1, Leaf 2, Leaf 3, host cluster 1, host cluster 2, and host cluster 3. Spine 1 establishes connections with Leaf 1, Leaf 2, and Leaf 3 respectively. Spine 2 establishes connections with Leaf 1, Leaf 2, and Leaf 3 respectively. Leaf 1 is connected to one or more hosts in host cluster 1, Leaf 8 is connected to one or more hosts in host cluster 8, and Leaf 3 is connected to one or more hosts in host cluster 3.
[0120] 2. Priority-based flow control (PFC).
[0121] The PFC (Priority Controller) mechanism works as follows: When the buffer of any priority queue in the receiver reaches the backpressure threshold, the receiver sends a PFC backpressure frame (pause frame, XOFF) to the sender for that priority queue. In response to this PFC backpressure frame, the sender stops sending data for that priority queue to prevent data loss. When the buffer of that priority queue in the receiver reaches the backpressure stop threshold, the receiver sends a PFC backpressure stop frame (pause stop frame, XON) to the sender for that priority queue. In response to this PFC backpressure stop frame, the sender resumes sending data for that priority queue. To prevent the sender from pausing data transmission for an extended period in response to a single PFC backpressure frame, thus affecting normal communication, each PFC backpressure frame has a corresponding data volume threshold. When the sender receives a PFC backpressure frame, it stops sending data for the priority queue corresponding to that PFC backpressure frame. When the amount of data that has been stopped reaches the data volume threshold, the sender resumes sending data for that priority queue.
[0122] For easier understanding, please refer to Figure 2 , Figure 2 This is a schematic diagram of a PFC scenario. An Ethernet link is established between device A and device B, with device A acting as the transmitter and device B as the receiver. Device A's transmitter interface is divided into 8 priority queues, and device B's receiver interface includes 8 corresponding receiver buffers, with a one-to-one correspondence. When congestion occurs in any receiver buffer on device B's receiver interface, a backpressure signal "STOP" is sent to device A, and device A then stops transmitting traffic from the corresponding priority queue.
[0123] If frequent data transmission pauses in response to PFC backpressure frames occur in the network, it will lead to a decrease in the overall transmission efficiency of the network, thereby affecting the efficiency of the computing tasks performed by the network, such as the training efficiency of AI neural network models. To improve the transmission efficiency of the network, it is necessary to identify the congestion level of each node in the network and adjust the data forwarding path in the network. For networks using PFC, the congestion level of the sender is determined based on the amount of data that the sender stops transmitting in response to PFC backpressure frames.
[0124] Currently, the sending end can determine the amount of data it needs to send in response to a PFC backpressure frame by based on the number of received PFC backpressure frames and the data volume threshold corresponding to each PFC backpressure frame. For example... Figure 8 As shown, Figure 8 This is a schematic diagram of a scenario for PFC inverse compression frames. Figure 8In the illustrated scenario 1, device B continuously sends three XOFF backpressure frames to device A. Device A responds to each XOFF backpressure frame by ceasing to send X bits of data, where X is a positive integer. Therefore, in scenario 1, device A determines that it has stopped sending a total of 3X bits of data by counting the number of PFC frames (3). Figure 8 Scenario 1 is an ideal scenario, in which device A stops sending at most X bits of data in response to an XOFF backpressure frame.
[0125] However, after receiving a PFC backpressure frame, if the sending end also receives a PFC backpressure stop frame corresponding to that priority queue, the sending end immediately resumes transmitting data for that priority queue in response to the PFC backpressure stop frame. For example... Figure 8 As shown in Scenario 2, after device B sends the first XOFF backpressure frame, and device A stops sending data in response to this first XOFF backpressure frame, device B sends an XON backpressure frame. At this time, the amount of data that device A stopped sending in response to the first XOFF backpressure frame has not yet reached x bits, and device A immediately resumes sending data in response to the XON backpressure frame. Then, device B sends a second XOFF backpressure frame to device A, and device A stops sending data in response to this second XOFF backpressure frame. Even though device A receives three PFC backpressure frames in both Scenario 1 and Scenario 2, the amount of data that device A stops sending in response to the XOFF backpressure frame in Scenario 2 is still less than the amount of data that device A stops sending in response to the XOFF backpressure frame in Scenario 1. Therefore, based on the number of PFC backpressure frames received by the sending end, it is impossible to determine the actual amount of data that the sending end stopped sending.
[0126] Furthermore, based solely on the number of XOFF and XON anti-pressure frames received by the sender, it is still impossible to determine the actual amount of data that the sender has stopped transmitting. For example... Figure 9 As shown, Figure 9 This is a schematic diagram of another scenario for PFC anti-compression frames.
[0127] Figure 9 Scenario 2 as shown Figure 8 Similar to scenario 2, after device B sends the first XOFF anti-pressure frame to device A, device B waits for a time T1 before sending an XON anti-pressure frame to device A. Therefore, device A stops sending X1 bits of data in response to the first XOFF anti-pressure frame, where T1 and X1 are both positive integers, and X1 is less than X. In response to this XON anti-pressure frame, device A unblocks the transmission and resumes sending data. Then, device B sends a second XOFF anti-pressure frame to device A, and device A stops sending X bits of data in response to the second XOFF anti-pressure frame. Figure 9 In the illustrated scenario 2, the amount of data that device A stops sending in response to the PFC anti-pressure frame is X1+X bits.
[0128] Figure 9 In the illustrated scenario 3, after device B sends the first XOFF anti-pressure frame to device A, device B waits for a duration T2 before sending an XON anti-pressure frame to device A. Therefore, device A stops sending X2 bits of data in response to the first XOFF anti-pressure frame, where T2 and X2 are both positive integers, T2 is greater than T1, and X2 is less than X but greater than X1. In response to this XON anti-pressure frame, device A unblocks the transmission and resumes sending data. Then, device B sends a second XOFF anti-pressure frame to device A, and device A stops sending X bits of data in response to the second XOFF anti-pressure frame. Figure 9 In the illustrated scenario 3, the amount of data that device A stops sending in response to the PFC anti-pressure frame is X2+X bits. Figure 9 In both scenarios 2 and 3, device A receives two XOFF anti-pressure frames and one XON anti-pressure frame. However, the amount of data that device A stops transmitting in scenario 2 is less than the amount of data that device A stops transmitting in scenario 3. Therefore, based on the number of XOFF and XON anti-pressure frames received by the transmitter, it is impossible to determine the actual amount of data that the transmitter stops transmitting.
[0129] In summary, the network detection results determined based on the number of PFC anti-pressure frames have a large error compared to the actual network state, and these network detection results cannot reflect the true network congestion status.
[0130] Based on this, this application proposes a method and related apparatus for determining the duration of data transmission cessation. The first apparatus can determine the first duration of data transmission actually stopped by the first port in response to the PFC backpressure frame, and then determine the amount of data that the first port actually stopped transmitting in response to the PFC backpressure frame based on the first duration. This provides a highly accurate quantitative indicator to accurately identify congested nodes in the network, improve network planning effectiveness, and enhance communication efficiency.
[0131] The following describes some communication scenarios involved in the embodiments of this application. Please refer to... Figure 3 , Figure 3This is a schematic diagram of a communication scenario according to an embodiment of this application. The communication scenario involved in this embodiment includes a head node, intermediate nodes, a tail node, and a network controller. The network controller is used to control and manage the head node, intermediate nodes, and tail node; the network controller can also be called a network manager. Multiple paths exist between the head node and the tail node. These multiple paths may include paths passing through intermediate nodes, and may also include direct connections between the head node and the tail node. It should be noted that this communication scenario also includes end-side devices (not shown in the figure) connected to the head node or tail node. The end-side device connected to the head node can also be called an ingress port device, and the end-side device connected to the tail node can also be called an egress port device. For example, the network controller can be a vertical business place (VBP).
[0132] The communication system proposed in the embodiments of this application includes a first device, a second device, and / or a third device.
[0133] For example Figure 4a As shown, Figure 4a This is a schematic diagram of a communication system proposed in an embodiment of this application. In one possible implementation, the first device is an intermediate node, the second device is a head node, and the third device is a network controller.
[0134] Or, such as Figure 4b As shown, Figure 4b This is a schematic diagram of a communication system proposed in an embodiment of this application. Figure 4b In this context, both the first device and the second device are intermediate nodes, and the second device is the upstream node of the first device.
[0135] For example Figure 5 As shown, Figure 5 This is a schematic diagram of another communication system proposed in an embodiment of this application. In another possible implementation, the first device is a head node and / or an intermediate node, and the third device is a network controller.
[0136] For example Figure 6 As shown, Figure 6 This is a schematic diagram of another communication system proposed in an embodiment of this application. In another possible implementation, the second device is a head node and / or an intermediate node, the first device is an intermediate node, the first device is a downstream node of the second device, and the third device is a network controller.
[0137] For example Figure 7 As shown, Figure 7This is a schematic diagram of another communication system proposed in an embodiment of this application. In another possible implementation, the first device is a head node and / or an intermediate node, and the communication system further includes a network analyzer. A network analyzer is a device used to monitor, analyze, and diagnose a network. The network analyzer analyzes the data packets transmitted in the network to obtain the analysis results of the network, which include, but are not limited to: the network's transmission protocol, the network's traffic characteristics, the network's congestion status, the network's fault diagnosis, and / or, the network's security threats. In this embodiment of the application, the network analyzer determines the network status by obtaining a first duration or network detection results reported by the first device, and the network status indicates whether congestion has occurred at each node in the network.
[0138] The head node, intermediate node, or tail node in the embodiments of this application include, but are not limited to: routers, switches, access network devices, access points, gateways, network interface cards, firewalls, or service process units (SPUs).
[0139] The end-side devices in this application embodiment include, but are not limited to, devices such as: host, terminal, server, virtual machine, network card, Layer 3 switch, or gateway. The server can also be a cloud server deployed in the cloud, and this application embodiment does not limit this.
[0140] Exemplary examples show that the host in this application embodiment can be implemented in various ways, including but not limited to: computing devices, computing units, cloud devices, virtual machines, or physical machines. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, laptop computer, or smartphone. The server can be a server cluster composed of multiple servers, or a cloud computing service center. The cloud computing service center deploys a large amount of basic resources owned by the cloud service provider. For example, the cloud computing service center deploys a large amount of basic resources such as computing resources, storage resources, and network resources. The cloud computing service center can utilize these large amounts of basic resources to implement the methods provided in this application embodiment, and to implement more services.
[0141] For example, a terminal device can also be called user equipment (UE), mobile station (MS), or mobile terminal (MT). For instance, a terminal device can be a mobile phone, tablet computer, or computer with wireless transceiver capabilities. It can also be a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in autonomous driving, a wireless terminal in telemedicine, a wireless terminal in a smart grid, a wireless terminal in a smart city, a wireless terminal in a smart home, an in-vehicle terminal, a vehicle with vehicle-to-vehicle (V2V) communication capabilities, an intelligent connected vehicle, a drone with drone-to-drone (UAV-to-UAV (U2U)) communication capabilities, etc., without limitation.
[0142] For example, this access network equipment may also be referred to as a radio access network (RAN) node, radio access network equipment, or base station. Currently, some examples of RAN equipment include: base station, evolved NodeB (eNodeB), gNB (gNodeB) in a 5G communication system, transmission reception point (TRP), evolved Node B (eNB), radio network controller (RNC), Node B (NB), home base station (e.g., home-evolved Node B, or home Node B, HNB), base band unit (BBU), or wireless fidelity (Wi-Fi) access point (AP), etc. Additionally, in a network architecture, network equipment may include centralized unit (CU) nodes, distributed unit (DU) nodes, or RAN equipment including both CU and DU nodes.
[0143] Optionally, the access network equipment can also be a macro base station, micro base station, indoor station, relay node, donor node, or a radio controller in a cloud radio access network (CRAN) scenario. RAN nodes can also be servers, wearable devices, vehicles, or in-vehicle equipment. For example, the access network equipment in vehicle-to-everything (V2X) technology can be a roadside unit (RSU).
[0144] The embodiments of this application will now be described with reference to the accompanying drawings. Please refer to the accompanying drawings. Figure 10 , Figure 10 This is a flowchart illustrating an embodiment of the method for determining the duration of data transmission cessation in this application. The method for determining the duration of data transmission cessation proposed in this application includes:
[0145] S1. Determine the first moment of receiving the first reverse pressure frame. The first reverse pressure frame is used to instruct the first port to stop sending data.
[0146] In step S1, the first device can determine the first moment of receiving the first reverse pressure frame, which is used to instruct the first port to stop sending data.
[0147] In one possible implementation, the first port enables the reverse pressure function. The first device determines that the first reverse pressure frame is a reverse pressure frame for the first port. The first device uses the time when it receives the first reverse pressure frame as the first time. For example, the first device determines the first time based on a field of the first reverse pressure frame that indicates the first time.
[0148] In another possible implementation, the first device determines the first moment by detecting whether the first port is in a stopped data transmission state. The first device takes the moment when the first port changes from a data transmission state to a stopped data transmission state as the first moment. In one example, the first device determines the first moment by scanning whether the first port has stopped transmitting data.
[0149] Furthermore, besides instructing the first port to stop transmitting data, the first backpressure frame can also correspond to the first priority queue of the first port, specifically instructing the first priority queue included in the first port to stop transmitting data. The first port includes one or more priority queues, and the first priority queue among these one or more priority queues enables PFC backpressure. Upon receiving the first backpressure frame, the first device stops transmitting data from the first priority queue in response to the first backpressure frame.
[0150] It should be noted that any number of priority queues included in the first port can enable PFC backpressure. In other words, the multiple priority queues included in the first port can stop transmitting data in response to an XOFF backpressure frame. These multiple priority queues can stop transmitting data in response to the same XOFF backpressure frame, or they can stop transmitting data in response to different XOFF backpressure frames.
[0151] At this time, the first device determines the first moment by detecting whether the first port is in a stopped data transmission state. This can be understood as the first device determining the first moment by detecting whether the first priority queue of the first port is in a stopped data transmission state.
[0152] When the first backpressure frame corresponds to the first port, the first backpressure frame is a pause frame. When the first backpressure frame corresponds to the first priority queue of the first port, the first backpressure frame is a PFC backpressure frame, for example, the first backpressure frame is an XOFF backpressure stop frame.
[0153] Alternatively, the statement that the first port includes the first priority queue can be replaced with: the first port carries the first priority queue.
[0154] S2. Determine the second moment for receiving the second reverse pressure frame. The second reverse pressure frame is used to instruct the first port to resume transmitting data.
[0155] In step S2, the first device can determine the second time of receiving the second reverse pressure frame, which is used to instruct the first port to resume transmitting data. The second time is later than the first time.
[0156] In one possible implementation, the first port enables reverse pressure functionality, and the first device determines that the second reverse pressure frame is a reverse pressure frame for the first port. The first device uses the time when it receives the second reverse pressure frame as the second time. For example, the first device determines the second time based on fields in the second reverse pressure frame that indicate the second time.
[0157] In another possible implementation, the first device detects whether the first port is in a data transmission state to determine the second moment. The first device takes the moment when the first port changes from a stopped data transmission state to a data transmission state as the second moment. In one example, the first device determines the second moment by scanning whether the first port is transmitting data.
[0158] Similar to step S1, the second backpressure frame can be used not only to instruct the first port to resume data transmission, but also to instruct the first priority queue included in the first port to resume data transmission. The first port includes one or more priority queues, and the first priority queue in the one or more priority queues enables PFC backpressure. Upon receiving the second backpressure frame, the first device resumes transmission of data from the first priority queue in response to the second backpressure frame.
[0159] At this time, the first device determines the second moment by detecting whether the first port is in the data transmission state. This can be understood as the first device determining the second moment by detecting whether the first priority queue of the first port is in the data transmission state.
[0160] When the second backpressure frame corresponds to the first port, the second backpressure frame is a pause frame. When the second backpressure frame corresponds to the first priority queue of the first port, the second backpressure frame is a PFC backpressure frame, for example, the second backpressure frame is an XON backpressure recovery frame.
[0161] It should be noted that any number of priority queues included in the first port can enable PFC backpressure. In other words, the multiple priority queues included in the first port can resume data transmission in response to XON backpressure frames. These multiple priority queues can resume data transmission in response to the same XON backpressure frame, or they can resume data transmission in response to different XON backpressure frames.
[0162] For easier understanding, please refer to Table 1, which shows the ports or priority queues that enable PFC backpressure.
[0163] Table 1
[0164]
[0165] Referring to Table 1, the first device includes ports #1, #2, and #3. Port #1 includes one or more priority queues, among which priority queue #1-1 enables PFC backpressure. Upon receiving an XOFF backpressure frame #1, the first device stops transmitting data from priority queue #1-1; upon receiving an XON backpressure frame #1, the first device resumes transmitting data from priority queue #1-1. Port #2 includes one or more priority queues, among which priority queues #2-1 and #2-2 enable PFC backpressure. Upon receiving an XOFF backpressure frame #2, the first device stops transmitting data from priority queues #2-1 and #2-2; upon receiving an XON backpressure frame #2, the first device resumes transmitting data from priority queues #2-1 and #2-2. Port #3 includes one or more priority queues, among which priority queues #3-1, #3-2, and #3-3 enable PFC backpressure. The first device receives an XOFF reverse pressure frame #3-1 and stops transmitting data in priority queue #3-1. The first device receives an XON reverse pressure frame #3-1 and resumes transmitting data in priority queue #3-1. The first device receives an XOFF reverse pressure frame #3-2 and stops transmitting data in priority queue #3-2. The first device receives an XON reverse pressure frame #3-2 and resumes transmitting data in priority queue #3-2. The first device receives an XOFF reverse pressure frame #3-3 and stops transmitting data in priority queue #3-3. The first device receives an XON reverse pressure frame #3-3 and resumes transmitting data in priority queue #3-3.
[0166] S3. Determine the first duration of the first port based on the first time and the second time. The first duration of the first port indicates the duration for which the first port stops sending data in response to the first backpressure frame.
[0167] In step S3, after the first device determines the first time and the second time of the first port, it can determine the first duration of the first port. The first duration of the first port indicates the duration for which the first port stops transmitting data in response to the first backpressure frame. The first duration of the first port can also be called the backpressure duration of the first port or the stop duration of the first port.
[0168] In one possible implementation, the first duration is the difference between the second moment and the first moment. Alternatively, the first duration is the time from the first moment to the second moment.
[0169] Further, the first device determines a first duration of the first priority queue based on a first time point and a second time point of the first priority queue. This first duration indicates the duration for which the first priority queue stops transmitting data in response to the first anti-pressure frame.
[0170] Optionally, after determining the first duration of the first port (or the first duration of the first priority queue), the first device may also send indication information to other nodes, which instructs the other nodes to adjust the routing and forwarding strategies of the data flow carried by the first port. These other nodes include upstream nodes of the first device, such as the second device.
[0171] Optionally, if the first device sends an indication message to other nodes when the first duration of the first port (or the first duration of the first priority queue) exceeds a set threshold.
[0172] After step S3, steps S4 to S5 can be executed. Steps S4 and S5 are optional.
[0173] S4. The first device determines the network detection result of the first port based on the first duration and the second duration.
[0174] In step S4, the first device can further determine a second duration for the first port, which indicates the duration for which the first port transmits data. Then, the first device determines the network detection result of the first port based on the first duration and the second duration of the first port, which indicates the congestion level of the first port.
[0175] First, the first device acquires the bandwidth value of the first port and the amount of data transmitted at the first port. Then, the first device determines a second duration for the first port based on the bandwidth value and the amount of data transmitted at the first port. For example, the second duration is the ratio of the amount of data transmitted at the first port to the bandwidth value of the first port. Optionally, the second duration can also be referred to as the streaming duration.
[0176] Specifically, the first device acquires the amount of data transmitted at the first port, including: acquiring a first data volume at the first port, where the first data volume is the amount of data transmitted at the start of the detection period; acquiring a second data volume at the first port, where the second data volume is the amount of data transmitted at the end of the detection period; and determining the amount of data transmitted at the first port by subtracting the first data volume from the second data volume. Optionally, the amount of data transmitted at the first port can be replaced by the data flow rate of the first port.
[0177] It should be noted that the detection duration determined by the first device for the first duration is the same as the detection duration determined by the first device for the second duration. In other words, the first device determines the network detection result of the first port by statistically analyzing the first and second durations within the same time frame.
[0178] In this embodiment, the network detection result includes one or more of the following: the ratio of a first duration to a second duration, a first difference, or the ratio of a first difference to a second difference. The first difference is the difference between a first duration determined within the second detection duration and a first duration determined within the first detection duration, wherein the second detection duration is later than the first detection duration. The ratio of the first difference to the second difference is the second difference, where the second difference is the start time of the second detection duration minus the end time of the first detection duration. The first difference reflects the increase in the first duration, and the ratio of the first difference to the second difference reflects the increase ratio of the first duration.
[0179] In one example, the first duration is 3 seconds and the second duration is 5 seconds. When the network detection result is the ratio of the first duration to the second duration, the network detection result is 3 / 5.
[0180] In another example, within the first detection duration, the first duration is 3 seconds and the second duration is 5 seconds; within the second detection duration, the first duration is 4 seconds and the second duration is 4 seconds. When the network detection result is the first difference, the network detection result is 1 second.
[0181] In another example, within the first detection duration, the first duration is 3 seconds and the second duration is 5 seconds; within the second detection duration, the first duration is 4 seconds and the second duration is 4 seconds, with a second difference of 10 seconds. When the network detection result is the ratio of the first difference to the second difference, the network detection result is 1 / 10.
[0182] Optionally, the granularity of the network detection result can be at the port level, the priority queue level, or the node level. When the granularity is at the priority queue level, the network detection result indicates the congestion level of one or more priority queues in the first port; for example, the network detection result indicates the congestion level of the first priority queue in the first port. When the granularity is at the node level, the network detection result indicates the congestion level of the node; for example, the network detection result indicates the congestion level of the first device. The network detection result can also indicate the congestion level of one or more ports in a node; for example, the network detection result indicates the congestion level of the first ports included in the first device.
[0183] Taking the determination of the network detection result of the first priority queue as an example, the specific method for determining the network detection result of the first priority queue is similar to the method for determining the network detection result of the first port, and will not be elaborated here.
[0184] For example, determining the network detection result of the first priority queue includes: obtaining the second duration of the first priority queue, the second duration of the first priority queue indicating the duration of data transmission by the first priority queue; and determining the network detection result of the first priority queue based on the first duration and the second duration of the first priority queue, the network detection result of the first priority queue indicating the congestion level of the first priority queue.
[0185] S5. Based on the network detection results of the first port, adjust the routing and forwarding strategy of the data stream carried by the first port.
[0186] In step S5, after the first device determines the network detection result of the first port, the first device can adjust the routing and forwarding strategy of the data flow carried by the first port according to the network detection result of the first port. This routing and forwarding strategy can also be called: routing policy, forwarding policy, routing rule, forwarding rule, or forwarding path, and this application embodiment does not limit it in this way.
[0187] In one possible implementation, when the network detection result of the first port meets a first condition, a second port is determined. The congestion level of the second port is lower than that of the first port, and the priority of the second port is equal to that of the first port. For example, taking the network detection result as the ratio of a first duration to a second duration, the first condition is that the network detection result is greater than or equal to 50%. When the network detection result is greater than or equal to 50%, the first device adjusts the routing and forwarding strategy of the data stream carried by the first port; when the network detection result is less than 50%, the first device does not adjust the routing and forwarding strategy of the data stream carried by the first port. In other words, after the first device determines that the first port is an overloaded port or a congested port, the first device can migrate the data stream carried by the first port to other lightly loaded ports or uncongested ports for transmission.
[0188] In another possible implementation, the first device can also adjust the routing and forwarding strategy of the data stream carried by the first priority queue based on the network detection results of the first priority queue. For example, when the network detection results of the first priority queue meet the second condition, a second priority queue is determined, and the congestion level of the second priority queue is lower than that of the first priority queue; the data stream carried by the first priority queue is migrated to the second priority queue, and the data stream is then transmitted by the second priority queue. The second condition is similar to the first condition and will not be elaborated here.
[0189] In another possible implementation, the first device includes a mapping between ingress and egress ports. Packets received from an ingress port are forwarded from the corresponding egress port. In this case, the first port is the egress port of the packet, or the first priority queue is the priority queue of the egress port. The first device adjusts the mapping between ingress and egress ports based on the network detection results of the first port or the first priority queue of the first port. For example, if the network detection result corresponding to the first port does not meet a first condition, or if the network detection result corresponding to the first priority queue of the first port does not meet a second condition, the mapping between ingress and egress ports in the first device becomes a mapping between the second port and the first port. That is, data streams received from the second port are forwarded from the first port. If the network detection result corresponding to the first port meets the first condition, or if the network detection result corresponding to the first priority queue of the first port meets the second condition, the mapping between ingress and egress ports in the first device is updated to a mapping between the second port and the third port. That is, data streams received from the second port are forwarded from the third port, and the congestion level of the third port is less than that of the first port. Optionally, the first condition and / or the second condition mentioned above can be configured by the first device itself, or by the network manager or network analyzer. This application embodiment does not limit this.
[0190] Optionally, the network detection result of the first port may also include the first duration of the first port within a certain time period, or the sum of the first durations of the first port within a certain time period. For example... Figure 11 As shown, Figure 11 This is a schematic diagram of a PFC backpressure scenario according to an embodiment of this application. In one example, the network detection result of the first port includes: a first duration 1, a first duration 2, and a first duration 3, wherein the first duration 1 corresponds to XOFF backpressure frame 1 and XON backpressure frame 1, the first duration 2 corresponds to XOFF backpressure frame 2 and XON backpressure frame 2, and the first duration 3 corresponds to XOFF backpressure frame 3 and XON backpressure frame 3. In another example, the network detection result of the first port includes: the sum of the first duration 1, the first duration 2, and the first duration 3.
[0191] Optionally, after determining the network detection result of the first port (or the network detection result of the first priority queue), the first device may also send indication information to other nodes. This indication information is used to instruct the other nodes to adjust the routing and forwarding strategy of the data flow carried by the first port. These other nodes include the upstream nodes of the first device, such as the second device.
[0192] In one possible implementation, the data flow carried by the first port is forwarded based on a first forwarding path, meaning the first forwarding path passes through the first port. The first device sends an indication message to the second device, specifically instructing the data flow carried by the first forwarding path to migrate to a second forwarding path, where the congestion level of the second forwarding path is lower than that of the first forwarding path. The first device can calculate the second forwarding path itself and then notify the second device of the second forwarding path using the indication message. Alternatively, the first device can use the indication message to notify the second device that a second forwarding path with lower congestion needs to be re-determined and used to send the data flow carried by the first forwarding path.
[0193] In another possible implementation, the second device is an upstream node of the first device. The second device performs load balancing based on a first port group, which includes one or more ports and their upstream ports (e.g., the first port is port 1 of the first device, its upstream port is port 2 of the second device, and port 2 of the second device is the upstream port of port 1 of the first device). For example, the second device performs Equal-Cost Multi-Path hash (ECMP hash) routing based on the one or more ports included in the first port group to perform load balancing (or load distribution) on the data flow. The second device determines the proportion of data flow forwarded by each port in the first port group and forwards the data flow through the first port group to achieve load balancing. Since the network detection result of the first port indicates that the first port is congested, the second device determines a second port group, which includes one or more ports. When the second device performs load balancing based on the second port group, the traffic of the first port is less than when the load balancing is performed based on the first port group itself. In one example, the second port group does not include the upstream port of the first port, meaning the second device avoids the forwarding path of the congested first port and performs load balancing. In another example, the second port group includes the same ports as the first port group, but the traffic proportion of each port in the second port group is different from that in the first port group; the traffic proportion of the upstream port of the first port in the second port group is reduced.
[0194] Of course, after receiving the instruction information, the second device can also adjust the routing and forwarding strategy of the data flow in the same way as the first device adjusts the correspondence between the input and output ports, which will not be elaborated here.
[0195] Optionally, the first device may also report the first duration of the first port, the second duration of the first port, and / or the network detection results of the first port to the third device (network manager), so that the third device can determine the routing and forwarding strategy.
[0196] Optionally, the first device may also report the network detection result of the first port to the third device when the network detection result of the first port meets the first condition, so that the third device can update the routing and forwarding policy according to the network detection result of the first port.
[0197] Optionally, the first device may also report the first duration of the first priority queue, the second duration of the first priority queue, and / or the network detection results of the first priority queue to the third device (network manager), so that the third device can determine the routing and forwarding strategy.
[0198] Optionally, the first device may also report the network detection results of the first priority queue to the third device when the network detection results of the first priority queue meet the first condition, so that the third device can update the routing and forwarding policy according to the network detection results of the first priority queue.
[0199] In this embodiment, the first device can determine the first duration for which the first port actually stops transmitting data in response to a PFC backpressure frame, providing a new quantitative indicator to accurately identify congested nodes in the network, improving network planning effectiveness and communication efficiency. Based on the first duration, the amount of data that the first port actually stops transmitting in response to a PFC backpressure frame can be determined to accurately identify the congestion level of the first port. Furthermore, the first device can adjust the routing and forwarding strategy of the first port based on the first duration or the network detection results of the first port obtained based on the first duration, adjusting the data routing and forwarding strategy based on highly accurate network congestion results to improve communication performance.
[0200] Based on the foregoing embodiments, the following describes some application scenarios involved in the embodiments of this application. Please refer to... Figure 12 , Figure 12 This is a schematic diagram of an application scenario proposed in this application embodiment. One application scenario proposed in this application embodiment includes: Leaf node 2 acts as a first device. The data stream carried by the first port of Leaf node 2 is forwarded via the following path: Leaf node 2 → Spine node 1 → Leaf node 3. Leaf node 2 adjusts its routing and forwarding strategy based on the first port's first duration (or the network detection result of the first port): when Leaf node 2 determines that the first port's first duration exceeds a threshold, or when the network detection result of the first port meets a first condition, Leaf node 2 switches the data stream to a second port for transmission. After the switch, the data stream is forwarded via the following path: Leaf node 2 → Spine node 2 → Leaf node 3.
[0201] Please see Figure 13 , Figure 13This is a schematic diagram of another application scenario proposed in this application embodiment. Another application scenario proposed in this application embodiment includes: Spine node 2 as the first device, Leaf node 1 as the second device, and Leaf node 1 being the upstream node of Spine node 2. The data flow carried by the first port of Spine node 2 is forwarded via the forwarding path: Leaf node 1 → Spine node 2 → Leaf node 3. Spine node 2 determines that the first port is congested based on the first port's first duration (or the network detection result of the first port). Spine node 2 sends an indication message to Leaf node 1, which instructs Leaf node 1 to adjust the routing and forwarding strategy of the data flow. Leaf node 1 uses the forwarding path: Leaf node 1 → Spine node 2 → Leaf node 3 as the first forwarding path. Since the indication message indicates that the first port of Spine node 2 is congested, Leaf node 1 determines to use a second forwarding path to forward the data flow: Leaf node 1 → Spine node 1 → Leaf node 3. Leaf node 1 determines the second forwarding path based on the indication message, and the second forwarding path bypasses the congested Spine node 2.
[0202] Please see Figure 14 , Figure 14 This is a schematic diagram illustrating another application scenario in an embodiment of this application. Another application scenario proposed in this application includes: a network manager acting as a third device, the network manager managing N nodes from node 1 to node N, where N is a positive integer, and node 1 to node N acting as a first device. The method flow corresponding to this application scenario is as follows:
[0203] D1. The first device reports the first duration, the second duration, and / or the network detection results to the third device.
[0204] In step D1, after nodes 1 to N determine the first duration, the second duration, and / or the network detection result, they report the above information to the third device. The first duration, the second duration, and / or the network detection result can be at the port granularity, the priority queue granularity, or the node granularity; this embodiment of the application does not limit this.
[0205] D2. The third device determines the routing and forwarding strategy based on the first duration, the second duration, and / or the network detection results.
[0206] In step D2, the third device determines a routing and forwarding strategy based on the network detection results reported by the first device. If the first device reports a first duration and a second duration, the third device determines the network detection results based on the first and second durations, and then determines the routing and forwarding strategy based on those results. Alternatively, the third device determines the routing and forwarding strategy based on the first duration.
[0207] Taking network detection results at the port granularity level as an example, the third device can determine which ports in a node are congested based on the port-granularity network detection results reported by the node. Similarly, taking network detection results at the priority queue granularity level as an example, the third device can determine which priority queue on which port in a node is congested based on the priority queue granularity network detection results reported by the node.
[0208] The third device can determine the routing and forwarding strategy for data flows in the network based on the network detection results of nodes 1 to N. For example, it can perform migration on the data flows to bypass ports or nodes that are in a congested state. Alternatively, it can perform migration on the data flows to use priority queues that are not in a congested state for forwarding the data flows. Optionally, the routing and forwarding strategy can instruct the data flows to migrate between priority queues of the same priority.
[0209] In one possible implementation, a third device acquires the first duration of one or more first ports. When the first duration of any one or more of the first ports satisfies a third condition, the routing and forwarding policy is updated. The third condition is, for example, that the first duration is greater than or equal to a first threshold.
[0210] In another possible implementation, the third device acquires the first duration of one or more first ports. When the number of first ports satisfying the third condition is greater than or equal to the second threshold, or when the proportion of first ports satisfying the third condition is greater than or equal to the third threshold, it means that the current network congestion is relatively severe, and the data forwarding path needs to be replanned. The third device then triggers an update to the routing and forwarding policy.
[0211] In another possible implementation, the third device acquires network detection results from one or more first ports. When the network detection result of any one or more of the first ports meets the first condition, the routing and forwarding policy is updated.
[0212] In another possible implementation, the third device acquires network detection results from one or more first ports. When the number of first ports satisfying the first condition is greater than or equal to the fourth threshold, or the proportion of first ports satisfying the first condition is greater than or equal to the fifth threshold, it means that the current network congestion is relatively severe, and the data forwarding path needs to be replanned. The third device then triggers an update to the routing and forwarding strategy.
[0213] The updated routing and forwarding policy instructs data flows to bypass congested nodes, ports, or priority queues. Alternatively, the updated routing and forwarding policy minimizes overall network congestion.
[0214] For example, the third device counts the first port duration or network detection results for each node in the network. It then determines which ports or nodes are congested. The third device obtains the data streams carried by the congested ports, for example, it obtains the packet characteristic information (five-tuple information) of the data stream. The third device re-executes path planning for this data stream, and the updated routing and forwarding policy instructs the data stream to migrate to a non-congested port for forwarding.
[0215] In step D2, one possible implementation is as follows: The third device acquires network topology information, which indicates the connection relationships between one or more communication devices. The third device acquires communication relationship information of a second data stream, which indicates the source and destination addresses of the second data stream, and the second data stream includes one or more data streams. The third device determines a routing and forwarding strategy based on the network topology information and the communication relationship information of the second data stream. During the process of determining or updating the routing and forwarding strategy, the third device may also acquire a first duration, a second duration, and / or network detection results of the one or more communication devices. The third device determines or updates the routing and forwarding strategy based on the first duration, second duration, and / or network detection results of the one or more communication devices.
[0216] For example, the second data stream corresponds to one or more AI ensemble communication tasks, such as a computing cluster performing a training task for a neural network model, or a model inference task for a neural network model.
[0217] Optionally, during the process of the third device determining or updating the routing and forwarding strategy, the third device may also determine or update the routing and forwarding strategy based on the communication domain information. The communication domain information indicates the communication domain used to perform the one or more AI aggregate communication tasks. Each communication domain includes one or more communication devices and corresponding computing devices. For example, communication domain 1 includes switch 1, switch 2, and switch 3, where switch 3 acts as a spine node, switch 1 acts as a leaf node, and switch 2 acts as a leaf node. Switch 1 and the interactive device 2 are respectively connected to switch 3. Switch 1 is connected to host cluster 1, and switch 2 is connected to host cluster 2. Host cluster 1 includes one or more computing devices, and host cluster 2 includes one or more computing devices.
[0218] D3. The third device sends a routing and forwarding policy to the first device.
[0219] Using the above method, the third device can continuously acquire the first device's first duration or network detection results, which reflect whether the first device is in a congested state. Then, based on the first duration or network detection results, the routing and forwarding strategy is updated to achieve the optimization goal of minimizing overall network congestion, reducing network congestion, improving overall network transmission efficiency, and enhancing network performance.
[0220] The following describes a communication device according to an embodiment of this application. The communication device described below has any of the functions of the first device, the second device, or the third device in the above method embodiments.
[0221] Figure 15 This is a schematic diagram of the structure of a communication device 1500 provided in an embodiment of this application, as shown below. Figure 15 As shown, the communication device 1500 includes: a processing module 1502, used to execute steps S1 to S5; a transceiver module 1501, used to execute step D1 or step D3; and the processing module 1502, used to execute step D2.
[0222] In one example, the communication device 1500 is applied to the first device, and the communication device 1500 includes:
[0223] Processing module 1502 is used to determine the first moment of receiving the first backpressure frame, the first backpressure frame being used to instruct the first port to stop sending data;
[0224] The processing module 1502 is further configured to determine a second moment of receiving the second backpressure frame, the second backpressure frame being used to instruct the first port to resume transmitting data;
[0225] The processing module 1502 is further configured to determine a first duration of the first port based on the first time and the second time, wherein the first duration of the first port indicates the duration for which the first port stops sending data in response to the first backpressure frame.
[0226] In one possible implementation, the first and second anti-pressure frames are pause frames.
[0227] In one possible implementation, the first backpressure frame is a priority-based flow control (PFC) backpressure frame; the second backpressure frame is a PFC backpressure stop frame.
[0228] In one possible implementation, the processing module 1502 is further configured to obtain a second duration of the first port, wherein the second duration of the first port indicates the duration for which the first port sends data;
[0229] The processing module 1502 is further configured to determine the network detection result of the first port based on the first duration and the second duration of the first port, wherein the network detection result of the first port indicates the degree of congestion of the first port.
[0230] In one possible implementation, the processing module 1502 is further configured to determine a second port when the network detection result of the first port meets the first condition, wherein the congestion level of the second port is lower than that of the first port and the priority of the second port is equal to that of the first port;
[0231] The processing module 1502 is further configured to migrate the data stream carried by the first port to the second port, and then transmit the data stream through the second port after migration.
[0232] In one possible implementation, the processing module 1502 is further configured to obtain the bandwidth value of the first port;
[0233] The processing module 1502 is also used to obtain the amount of data transmitted at the first port;
[0234] The processing module 1502 is further configured to determine the second duration of the first port based on the amount of data transmitted by the first port and the bandwidth value of the first port.
[0235] In one possible implementation, the detection duration for determining the first duration of the first port is the same as the detection duration for determining the second duration of the first port.
[0236] In one possible implementation, the processing module 1502 is further configured to obtain the first data volume of the first port, wherein the first data volume of the first port is the amount of data transmitted by the first port at the start of the detection duration.
[0237] The processing module 1502 is further configured to obtain the second data volume of the first port, wherein the second data volume of the first port is the amount of data transmitted by the first port at the end of the detection duration;
[0238] The processing module 1502 is further configured to determine the amount of data transmitted at the first port by subtracting the first data amount from the second data amount.
[0239] In one possible implementation, the first duration body is used to indicate the duration for which the first priority queue of the first port stops sending data in response to the first backpressure frame.
[0240] In one possible implementation, the first duration is also used to indicate the duration from the first moment to the second moment.
[0241] In one possible implementation, the processing module 1502 is further configured to obtain a second duration of the first priority queue, wherein the second duration of the first priority queue indicates the duration for which the first priority queue sends data;
[0242] The processing module 1502 is further configured to determine the network detection result of the first priority queue based on the first duration of the first priority queue and the second duration of the first priority queue, wherein the network detection result of the first priority queue indicates the congestion level of the first priority queue.
[0243] In one possible implementation, the processing module 1502 is further configured to determine a second priority queue when the network detection result of the first priority queue meets the second condition, wherein the congestion level of the second priority queue is lower than that of the first priority queue, and the priority of the second priority queue is equal to that of the first priority queue.
[0244] Processing module 1502 is further configured to migrate the data stream carried by the first priority queue to the second priority queue, and then transmit the data stream by the second priority queue after migration.
[0245] In one possible implementation, the processing module 1502 is further configured to obtain the bandwidth value of the first priority queue;
[0246] The processing module 1502 is also used to obtain the amount of data transmitted in the first priority queue;
[0247] The processing module 1502 is further configured to determine the second duration of the first priority queue based on the amount of data transmitted in the first priority queue and the bandwidth value of the first priority queue.
[0248] In one possible implementation, the network detection result includes one or more of the following:
[0249] The ratio of the first duration to the second duration;
[0250] The first difference is the difference between the first duration determined within the second detection duration and the first duration determined within the first detection duration, wherein the second detection duration is later than the first detection duration.
[0251] Alternatively, the ratio of the first difference to the second difference, where the second difference is the start time of the second detection duration minus the end time of the first detection duration.
[0252] In one possible implementation, the transceiver module 1501 is configured to send indication information based on the first duration of the first port, the indication information being used to adjust the routing and forwarding strategy of the data stream carried by the first port.
[0253] In one possible implementation, the transceiver module 1501 is further configured to send indication information based on the network detection result of the first port, the indication information being used to adjust the routing and forwarding strategy of the data stream carried by the first port.
[0254] In one possible implementation, the indication information is specifically used to instruct the data flow carried by the first forwarding path to migrate to the second forwarding path, wherein the first forwarding path passes through the first port, and the congestion level of the second forwarding path is lower than that of the first forwarding path.
[0255] In one possible implementation, the indication information is specifically used to indicate that the data flow performing load balancing based on a first port group is adjusted to perform load balancing based on a second port group, the first port group including the upstream port of the first port, and the traffic of the first port when performing load balancing based on the second port group is less than the traffic of the first port when performing load balancing based on the first port group.
[0256] In yet another example, the communication device 1500 is applied to the second device, and the communication device 1500 includes:
[0257] The transceiver module 1501 is used to receive indication information from the first device. The indication information is used to adjust the routing and forwarding strategy of the data stream carried by the first port. The indication information is obtained based on a first duration of the first port, or the indication information is obtained based on the network detection result of the first port. The first duration of the first port indicates the duration for which the first port stops sending data in response to a first backpressure frame. The network detection result of the first port indicates the congestion level of the first port.
[0258] The processing module 1502 is used to adjust the routing and forwarding strategy of the data stream carried by the first port according to the instruction information.
[0259] In one possible implementation, the processing module 1502 is further configured to determine the congestion level of the first forwarding path based on the indication information, wherein the first forwarding path passes through the first port;
[0260] The processing module 1502 is also used to forward the data stream carried by the first forwarding path through the second forwarding path, wherein the congestion level of the second forwarding path is lower than that of the first forwarding path.
[0261] In one possible implementation, the processing module 1502 is further configured to determine the congestion level of the first port group according to the indication information. The first port group includes one or more ports, and the first port group includes an upstream port of the first port. The first port group is used to perform load balancing of the first data stream. The first data stream includes the data stream carried by the first port. The inlet port of the first data stream in the second device is a third port. When performing load balancing of the first data stream based on the first port group, the first port group and the third port have a mapping relationship.
[0262] The processing module 1502 is further configured to determine a second port group, the second port group including one or more ports, the congestion level of the second port group being lower than that of the first port group;
[0263] The processing module 1502 is further configured to perform load balancing of the first data stream using the second port group, wherein the second port group and the third port have a mapping relationship when performing load balancing of the first data stream based on the second port group.
[0264] In one possible implementation, the second port group does not include the upstream port of the first port;
[0265] Alternatively, the second port group includes the upstream port of the first port, and the traffic proportion of the upstream port of the first port in the second port group is less than the traffic proportion of the upstream port of the first port in the first port group.
[0266] In one possible implementation, the second device is an upstream node of the first device.
[0267] In yet another example, the communication device 1500 is applied to a third device, and the communication device 1500 includes:
[0268] Processing module 1502 is configured to acquire a first duration of one or more first ports, wherein the first duration of the first port indicates the duration during which the first port stops sending data in response to a first backpressure frame;
[0269] The processing module 1502 is further configured to determine a routing and forwarding strategy based on the first duration of the one or more first ports.
[0270] In one possible implementation, the processing module 1502 is further configured to obtain a second duration of the one or more first ports, wherein the second duration of the first port indicates the duration for which the first port sends data;
[0271] The processing module 1502 is further configured to determine the network detection result of the one or more first ports based on the first duration of the one or more first ports and the second duration of the one or more first ports, wherein the network detection result of the first port indicates the congestion level of the first port;
[0272] The processing module 1502 is further configured to determine the routing and forwarding strategy based on the network detection result of the first port.
[0273] In one possible implementation, the processing module 1502 is further configured to update the routing and forwarding policy when the first duration of any one or more of the first ports meets the third condition.
[0274] In one possible implementation, the processing module 1502 is further configured to update the routing and forwarding policy when the network detection result of any one or more of the first ports meets the first condition.
[0275] In one possible implementation, the third device is a network manager that manages the first device.
[0276] The communication device 1500 may correspond to the first device, the second device, or the third device in the above method embodiments. Each unit in the communication device 1500 and the other operations and / or functions described above are for implementing various steps and methods implemented by the first device, the second device, or the third device in the method embodiments. For specific details, please refer to the above method embodiments. For the sake of brevity, they will not be repeated here.
[0277] The communication device 1500's processing of messages is illustrated using the above-described functional module division as an example. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the communication device 1500 can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the communication device 1500 provided in the above embodiment is similar to the one described above... Figures 10-14 The corresponding implementation methods belong to the same concept, and their specific implementation process can be found in the above method implementations, which will not be repeated here.
[0278] To implement the above embodiments, this application also provides a communication device. See also... Figure 16 , Figure 16 This is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of this application.
[0279] Figure 16Although the communication device 1600 shown has certain specific features, those skilled in the art will realize from the embodiments of this application that, for the sake of brevity, Figure 16 Various other features are not shown to avoid obscuring more relevant aspects of the implementation methods disclosed in this application. Therefore, as an example, in some implementations, the communication device 1600 includes one or more processing units (e.g., CPU) 1601, a network interface 1602, a programming interface 1603, a memory 1604, and one or more communication buses 1605 for interconnecting various components. In other implementations, the communication device 1600 may omit or add some functional components or units based on the above examples.
[0280] In some implementations, network interface 1602 is used to connect to one or more other communication devices / servers in a communication system. In some implementations, communication bus 1605 includes circuitry for interconnecting and controlling communication between system components. Memory 1604 may include non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Memory 1604 may also include volatile memory, which may be random access memory (RAM) used as an external cache.
[0281] In some implementations, memory 1604 or a non-transitory computer-readable storage medium of memory 1604 stores programs, modules and data structures, or subsets thereof, including, for example, a transceiver unit (not shown), an acquisition unit 16041 and a processing unit 16042.
[0282] In one possible embodiment, the communication device 1600 may have the above-described features. Figures 10-14 Any function of the first device, second device, or third device in the corresponding method embodiment.
[0283] It should be understood that the communication device 1600 corresponds to the first device, second device, or third device in the above method embodiments. The modules in the communication device 1600 and the other operations and / or functions described above are respectively for implementing various steps and methods performed by the first device, second device, or third device in the above method embodiments. For specific details, please refer to the above... Figures 10-14 For the sake of brevity, the corresponding method implementations will not be described in detail here.
[0284] It should be understood that the data transmission and reception operations in this application can be performed by the network interface 1602 on the communication device 1600, or the processor can call the program code in the memory and cooperate with the network interface 1602 to realize the function of the transceiver unit when needed.
[0285] In various implementations, the communication device 1600 is used to execute the methods provided in the embodiments of this application, such as the methods described above. Figures 10-14 The method corresponding to the illustrated embodiment.
[0286] This application Figure 16 The specific structure of the communication device can be as follows: Figure 17 As shown.
[0287] Figure 17 This is a schematic diagram of the structure of a communication device 1700 provided in an embodiment of this application.
[0288] The communication device 1700 includes a main control board 1710 and an interface board 1730.
[0289] The main control board 1710, also known as the main processing unit (MPU) or route processor, is used to control and manage the various components in the communication device 1700, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 1710 includes a central processing unit 1711 and a memory 1712.
[0290] Interface board 1730 is also known as a line processing unit (LPU), linecard, or service board. Interface board 1730 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc. Interface board 1730 includes: a central processing unit 1731, a network processor 1732, a forwarding table entry memory 1734, and a physical interface card (PIC) 1733.
[0291] The central processing unit 1731 on the interface board 1730 is used to control and manage the interface board 1730 and communicate with the central processing unit 1711 on the main control board 1710.
[0292] The network processor 1732 is used to implement packet forwarding. The network processor 1732 can be in the form of a forwarding chip.
[0293] Physical interface card 1733 is used to implement physical layer interfacing functions. Raw traffic enters interface board 1730 through this card, and processed packets are sent out from the physical interface card 1733. Physical interface card 1733 includes at least one physical interface, also called a physical port, which can be a Flexible Ethernet (FlexE) physical interface. Physical interface card 1733, also called a daughter card, can be installed on interface board 1730 and is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to network processor 1732 for processing. In some embodiments, the central processing unit 1731 of interface board 1730 can also perform the functions of network processor 1732, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for network processor 1732 in interface board 1730.
[0294] Optionally, the communication device 1700 includes multiple interface boards. For example, the communication device 1700 also includes an interface board 1740, which includes a central processing unit 1741, a network processor 1742, a forwarding table entry memory 1744, and a physical interface card 1743.
[0295] Optionally, the communication device 1700 also includes a switching fabric board 1716. The switching fabric board 1716 can also be referred to as a switch fabric unit (SFU). When the communication device has multiple interface boards 1730, the switching fabric board 1716 is used to complete data exchange between the interface boards. For example, interface boards 1730 and 1740 can communicate via the switching fabric board 1716.
[0296] The main control board 1710 and the interface board are coupled. For example, the main control board 1710, interface boards 1730 and 1740, and the switching network board 1716 are interconnected via a system bus and / or a system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1710 and the interface board 1730, and the main control board 1710 and the interface board 1730 communicate with each other through the IPC channel.
[0297] Logically, the communication device 1700 includes a control plane and a forwarding plane. The control plane includes a main control board 1710 and a central processing unit 1731, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 1734, a physical interface card 1733, and a network processor 1732. The control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1732 forwards messages received by the physical interface card 1733 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1734. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0298] It should be understood that the transceiver unit in the communication device 1600 can be equivalent to the physical interface card 1733 or the physical interface card 1743 in the communication device 1700; the acquisition unit 16041 and the processing unit 16042 in the communication device 1600 can be equivalent to the central processing unit 1711 or the central processing unit 1731 in the communication device 1700, or they can be equivalent to the program code or instructions stored in the memory 1712.
[0299] It should be understood that the operation on interface board 1740 in this embodiment is consistent with the operation on interface board 1730, and will not be described again for the sake of brevity. It should be understood that the communication device 1700 in this embodiment can correspond to the first device, second device or third device in the above-described method embodiments. The main control board 1710, interface board 1730 and / or interface board 1740 in the communication device 1700 can realize the functions and / or various steps implemented by the first device, second device or third device in the above-described method embodiments, and will not be described again for the sake of brevity.
[0300] It's worth noting that there may be one or more main control boards, including a primary and a backup main control board. There may also be one or more interface boards; the stronger the data processing capability of the communication device, the more interface boards it provides. Each interface board may also have one or more physical interface cards. There may be no switching network board, or one or more; multiple boards can share the load for redundancy and backup. In a centralized forwarding architecture, the communication device may not need a switching network board, with the interface boards handling the entire system's business data processing. In a distributed forwarding architecture, the communication device can have at least one switching network board, enabling data exchange between multiple interface boards and providing high-capacity data exchange and processing capabilities. Optionally, the communication device can also consist of only one board, without a switching network board, integrating the functions of the interface boards and the main control board onto this single board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU, executing the combined functions of both. The specific architecture adopted depends on the specific network deployment scenario and is not a single, definitive choice.
[0301] In some possible embodiments, the first, second, or third device described above can be implemented as a virtualization device. A virtualization device can be a virtual machine (VM) running a program for sending messages, a virtual router, or a virtual switch. The virtualization device is deployed on hardware (e.g., a physical server). For example, the first, second, or third device can be implemented based on a general-purpose physical server combined with network functions virtualization (NFV) technology.
[0302] It should be understood that the communication devices of the various product forms described above have any of the functions of the first device, the second device, or the third device in the above method embodiments, which will not be elaborated here.
[0303] This application also provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to control a computing device to perform any of the implementations shown in the foregoing method embodiments.
[0304] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the implementation methods shown in the foregoing method embodiments.
[0305] Furthermore, embodiments of this application also provide a computer program product that, when run on a communication device, causes the communication device to perform the aforementioned... Figures 10-14The method executed by the first device, the second device, or the third device in the corresponding method embodiment.
[0306] This application also provides a chip system, including a processor and an interface circuit. The interface circuit is used to receive instructions and transmit them to the processor. The processor is used to implement the methods in any of the above method embodiments.
[0307] Optionally, the chip system also includes a memory, and the chip system can have one or more processors. The processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that implements the methods in any of the above method embodiments by reading software code stored in the memory.
[0308] Optionally, the chip system may contain one or more memories. These memories may be integrated with the processor or separated from it; this application does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.
[0309] Please see Figure 18 , Figure 18 This is a schematic diagram of a communication system 1800 according to an embodiment of this application. The communication system 1800 includes a first device 1801, a second device 1802, and a third device 1803. The first device 1801 and the second device 1802 can be physical devices such as routers, switches, or gateways, or virtual devices that support route publishing and packet forwarding. This embodiment does not limit the specific types of the first device 1801 and the second device 1802. The third device 1803 can be a server or computing device that manages the first device 1801 and the second device 1802. Optionally, the first device 1801 can be a communication device 1500, a communication device 1600, or a communication device 1700. Optionally, the second device 1802 can be a communication device 1500, a communication device 1600, or a communication device 1700. Optionally, the third device 1803 can be a communication device 1500, a communication device 1600, or a communication device 1700.
[0310] The embodiments of this application have been described in detail above. The steps in the method of the embodiments of this application can be scheduled, merged or deleted in sequence according to actual needs; the modules in the device of the embodiments of this application can be divided, merged or deleted according to actual needs.
[0311] It should be understood that the phrase "an embodiment" or "one embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in one embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence number of the above-described processes does not imply a sequential order of execution; the execution order 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 this application.
[0312] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0313] It should be understood that in the embodiments of this application, "B corresponding to A" means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.
[0314] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0315] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0316] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0317] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
Claims
1. A method of determining a length of time to stop transmitting data, characterized by, The method is applied to a first device, and the method comprises: determining a first time point for receiving a first back pressure frame, the first back pressure frame being used to instruct a first port to stop sending data; determining a second time point for receiving a second back pressure frame, the second back pressure frame being used to instruct the first port to resume sending data; determining a first duration of the first port according to the first time point and the second time point, wherein the first duration of the first port indicates a duration for which the first port stops sending data in response to the first back pressure frame.
2. The method of claim 1, wherein, The method further comprises: obtaining a second duration of the first port, the second duration of the first port indicating a duration for which the first port sends data; determining a network detection result of the first port according to the first duration of the first port and the second duration of the first port, the network detection result of the first port indicating a congestion degree of the first port.
3. The method of claim 2, wherein, The obtaining of the second duration of the first port comprises: obtaining a bandwidth value of the first port; obtaining a data transmission amount of the first port; determining the second duration of the first port according to the data transmission amount of the first port and the bandwidth value of the first port.
4. The method of claim 1, wherein the first duration is specifically used to indicate a duration for which a first priority queue of the first port stops sending data in response to the first back pressure frame.
5. The method of claim 4, wherein, The method further comprises: obtaining a second duration of the first priority queue, the second duration of the first priority queue indicating a duration for which the first priority queue sends data; determining a network detection result of the first priority queue according to the first duration of the first priority queue and the second duration of the first priority queue, the network detection result of the first priority queue indicating a congestion degree of the first priority queue.
6. The method of claim 5, wherein, The method further comprises: when the network detection result of the first priority queue satisfies a second condition, determining a second priority queue, the congestion degree of the second priority queue being lower than that of the first priority queue; migrating a data stream carried by the first priority queue to the second priority queue, and transmitting the data stream by the second priority queue after the migration.
7. The method according to claim 5 or 6, characterized in that, The obtaining of the second duration of the first priority queue comprises: obtaining a bandwidth value of the first priority queue; obtaining a data transmission amount of the first priority queue; determining the second duration of the first priority queue according to the data transmission amount of the first priority queue and the bandwidth value of the first priority queue.
8. The method of any one of claims 2 or 3, or 5-7, wherein, The network detection result comprises one or more of the following: a ratio of the first duration to the second duration; a first difference, the first difference being a difference between a first duration determined in a second detection duration and a first duration determined in a first detection duration, the second detection duration being later than the first detection duration; or, a ratio of the first difference to a second difference, the second difference being a difference between a start time point of the second detection duration and an end time point of the first detection duration.
9. The method according to any one of claims 1-8, characterized in that, The first back pressure frame and the second back pressure frame are pause frames.
10. The method according to any one of claims 1-8, characterized in that, The first back pressure frame is a priority-based flow control (PFC) back pressure frame. The second back pressure frame is a PFC back pressure stop frame.
11. The method according to any one of claims 1-10, characterized in that, The method further comprises: sending indication information according to the first duration of the first port, the indication information being used to adjust a routing and forwarding strategy of a data flow carried by the first port.
12. The method according to any one of claims 4-10, characterized in that, The method further comprises: sending indication information according to the network detection result of the first port, the indication information being used to adjust a routing and forwarding strategy of a data flow carried by the first port.
13. The method of claim 11 or 12, wherein the indication information is specifically used to instruct a data flow carried by a first forwarding path to migrate to a second forwarding path, the first forwarding path passing through the first port, and a congestion degree of the second forwarding path being lower than a congestion degree of the first forwarding path.
14. The method of claim 11 or 12, wherein the indication information is specifically used to instruct a data flow to be adjusted from being load shared based on a first port group to being load shared based on a second port group, the first port group including an upstream port of the first port, and a traffic of the first port being smaller when the data flow is load shared based on the second port group than when the data flow is load shared based on the first port group. The method is applied to a second device, and the method comprises: receiving indication information from a first device, the indication information being used to adjust a routing and forwarding strategy of a data flow carried by a first port of the first device, the indication information being obtained based on a first duration of the first port, the first duration of the first port indicating a duration during which the first port stops sending data in response to a first back pressure frame; 15. A method of determining a length of time to stop transmitting data, characterized by, adjusting the routing and forwarding strategy of the data flow carried by the first port according to the indication information. Adjusting the routing and forwarding strategy of the data flow carried by the first port according to the indication information comprises: determining a congestion degree of a first forwarding path passing through the first port according to the indication information; 16. The method of claim 15, wherein, forwarding the data flow carried by the first forwarding path through a second forwarding path, a congestion degree of the second forwarding path being lower than the congestion degree of the first forwarding path. Adjusting the routing and forwarding strategy of the data flow carried by the first port according to the indication information comprises: determining a congestion degree of a first port group according to the indication information, the first port group including one or more ports, the first port group including an upstream port of the first port, the first port group being used to perform load sharing of a first data flow, the first data flow including the data flow carried by the first port, the first data flow being a third port at an ingress port of the second device, a traffic of the first port group being smaller when the first data flow is load shared based on the first port group than when the first data flow is load shared based on the first port group; 17. The method of claim 15, wherein, determining a second port group, the second port group including one or more ports, a congestion degree of the second port group being lower than the congestion degree of the first port group; The second port group is used to perform load sharing of the first data flow, and the second port group has a mapping relationship with the third port when the second port group is used to perform load sharing of the first data flow.
18. The method of claim 17, wherein, The second port group does not include the upstream port of the first port. Alternatively, the second port group includes the upstream port of the first port, and a traffic proportion of the upstream port of the first port in the second port group is less than a traffic proportion of the upstream port of the first port in the first port group.
19. The method according to any one of claims 15-18, characterized by, The second device is an upstream node of the first device.
20. A method of determining a length of time to stop transmitting data, the method comprising: The method is applied to a third device, and the method comprises: obtaining a first duration of one or more first ports, the first duration of the first port indicating a duration in which the first port stops sending data in response to a first back pressure frame; determining a routing and forwarding strategy according to the first duration of the one or more first ports.
21. The method of claim 20, wherein, The determining of the routing and forwarding strategy according to the first duration of the one or more first ports comprises: obtaining a second duration of the one or more first ports, the second duration of the first port indicating a duration in which the first port sends data; determining a network detection result of the one or more first ports according to the first duration of the one or more first ports and the second duration of the one or more first ports, the network detection result of the first port indicating a congestion degree of the first port; determining the routing and forwarding strategy according to the network detection result of the first port.
22. The method of claim 20 or 21, wherein, The method further comprises: updating the routing and forwarding strategy when the first duration of any one or more of the one or more first ports satisfies a third condition.
23. The method of claim 21 or 22, wherein, The method further comprises: updating the routing and forwarding strategy when the network detection result of any one or more of the one or more first ports satisfies a first condition.
24. The method of any of claims 20-23, wherein, The third device is a network manager that manages the first device.
25. A communications device, characterized by The device comprises a plurality of functional modules that interact to implement the method of any of claims 1-24.
26. A communication system, characterized by The communication system comprises the first device configured to perform the method of any of claims 1-14, the second device configured to perform the method of any of claims 15-19, and / or the third device configured to perform the method of any of claims 20-24.
27. A communication device comprising a processor and a memory, the memory being configured to store program code, and the processor being configured to invoke the program code in the memory to cause the communication device to perform the method of any of claims 1-24.
28. A computer readable storage medium storing instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-24.
29. A computer program product, characterised in that, including program code which, when executed on a computer, causes the computer to perform the method of any one of claims 1-24.