Flow control method and communication device
Patent Information
- Application Number
- CN202510457415.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本申请提供一种流量控制方法及通信装置,以解决应用逐包喷洒和CBFC的网络中与拥塞数据流共用链路的其他数据流也会因为头阻问题被同等反压,导致网络整体数据传输效率下降的问题
[0043]第十方面,提供一种计算机程序产品,包括指令,当该指令被在处理器上运行时,实现如第一方面至第三方面或第一方面至第三方面任一可能的实现方式所述的流量控制方法。
Smart Images

Figure BDA0005356208540000071 
Figure BDA0005356208540000091 
Figure BDA0005356208540000101
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a flow control method and communication device. Background Technology
[0002] Credit-based flow control (CBFC) is a link-layer hop-by-hop flow control technique used to avoid network packet loss. For adjacent sender and receiver ends on the same link, CBFC performs flow control based on a "producer-consumer" model. The sender acts as the producer, and the receiver acts as the consumer. When the sender sends data to the receiver, it needs to control the data transmission behavior based on the credit transmitted by the receiver to the sender, thus achieving flow control.
[0003] Packet spraying performs load balancing at the data packet level. For each data packet, the network device forwards the data packet to the appropriate path according to a certain strategy, so as to achieve the effect of a data stream being evenly distributed across multiple paths in the network.
[0004] However, when congested nodes occur in networks using packet spraying and CBFC, backpressure is applied hop-by-hop upstream to the congested data stream. This means that downstream receivers, due to congestion, cannot process their buffered data streams in time, resulting in insufficient buffer space to send data back to the upstream sender. Consequently, the upstream sender runs out of credit and stops transmitting the data stream. Combined with packet spraying load balancing, all nodes on the path forwarding packets of this data stream will be backpressured, leading to header blocking. Other data streams sharing the same link with this data stream will also be backpressured equally due to header blocking, resulting in a decrease in overall network data transmission efficiency. Summary of the Invention
[0005] This application provides a flow control method and communication device to solve the problem that in networks using packet spraying and CBFC, other data flows sharing the link with the congested data flow will also be subjected to equal back pressure due to head resistance, resulting in a decrease in the overall data transmission efficiency of the network.
[0006] Firstly, a flow control method is provided. This method is applied to a network system, which includes a first communication device, a second communication device, and a third communication device. The method is executed by the first communication device and includes: receiving a first flow, wherein the first flow experiences congestion at the first communication device; obtaining a first notification message when the first flow experiences congestion at the first communication device; and sending the first notification message to the second communication device. The first notification message includes an identifier indicating a first virtual lane (VL) corresponding to the first flow. The first notification message instructs the second communication device to send a first credit message to the third communication device. The first credit message includes a credit reduction identifier, which instructs the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL. The reduced credit of the first VL is used to instruct the third network device to perform flow control.
[0007] Based on the above flow control method, when the first communication device senses congestion in the first flow, it sends a first notification message to the second communication device. This allows the second communication device to identify congestion in adjacent or remote communication devices based on the first notification message when applying CBFC. Consequently, it can apply precise backpressure to the flow corresponding to the first VL at the source node of the first flow causing congestion, such as the third communication device. Compared to the stepwise backpressure process in the CBFC scenario, this method applies equal backpressure to other communication devices in the network system that share the first VL and forward data, except for the source node of the first flow. This avoids the head-blocking problem caused by other communication devices being unable to send other data flows that share the link with the first flow due to backpressure, thus improving the overall data transmission efficiency of the network.
[0008] As one possible implementation, the first notification message also includes a backpressure duration, and the first credit message also includes a backpressure duration and an identifier of the first VL. The backpressure duration is used to indicate the duration for which the third communication device stops sending the stream corresponding to the first VL.
[0009] In this way, the second communication device can instruct the third communication device to sense whether the first flow is congested in real time according to the back pressure duration through the first credit message, so as to perform precise back pressure on the flow corresponding to the first VL based on the first flow, thereby avoiding continuous back pressure when the first flow is not congested.
[0010] As one possible implementation, the first announcement message also includes a protocol identifier. The protocol identifier is used to indicate that the first announcement message indicates that the first flow corresponding to the first VL is causing congestion.
[0011] In this way, the second communication device can identify the message used to notify congestion based on the protocol identifier, thereby enabling the second communication device to have remote congestion awareness capability without affecting the normal data forwarding of the second communication device.
[0012] As one possible implementation, the first communication device and the second communication device are connected to each other through one or more other communication devices.
[0013] Secondly, a flow control method is provided. This method is applied to a network system, which includes a first communication device, a second communication device, and a third communication device. The method is executed by the second communication device and includes: receiving a first notification message sent by the first communication device and sending a first credit message to the third communication device. The first notification message includes an identifier indicating a first variable level (VL), and the first notification message is used to instruct the second communication device to send the first credit message to the third communication device. The first credit message includes a credit reduction identifier, and the credit reduction identifier is used to instruct the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL.
[0014] Based on the aforementioned flow control method, when the second communication device receives the first notification message sent by the first communication device, it detects remote congestion and sends a first credit message including a credit reduction identifier. This enables the receiving end, such as the second communication device, to report the credit reduction amount and proactively deduct the local idle credit of the sending end, such as the third communication device, achieving a backpressure effect. Thus, CBFC enables the sending end of a congested flow to detect remote congestion and to accurately backpressure the congested flow at the sending end. This avoids backpressure on the congested flow hop-by-hop upstream to other data flows sharing the link with the congested flow, thereby improving the overall data transmission efficiency of the network.
[0015] As one possible implementation, the first notification message also includes a backpressure duration, and the first credit message also includes a backpressure duration and an identifier of the first VL. The backpressure duration is used to instruct the third communication device to stop transmitting the stream corresponding to the first VL for a specified duration. The second communication device sends the first credit message to the third communication device, including: sending the first credit message to the third communication device before reaching the backpressure end time of the first VL; the backpressure end time of reaching the stream corresponding to the first VL is determined based on the backpressure duration.
[0016] Thus, the second communication device determines whether to send a first credit message to the third communication device based on the backpressure end time indicating the end of congestion. It can continuously respond to the first notification message and send the first credit message to the third communication device during the congestion phase, thereby achieving continuous and accurate backpressure on the flow corresponding to the first VL at the sending end of the first flow, i.e., the third communication device, when the first flow is in a congested state.
[0017] As one possible implementation, the second communication device includes a source-end suppression table, which includes a first entry that corresponds to the identifier of a first VL. The first entry includes a backpressure end time. Before reaching the backpressure end time of the flow corresponding to the first VL, the sum of the time when the second communication device receives the first notification message and the backpressure duration is less than or equal to the backpressure end time.
[0018] In this way, the second communication device can perform precise backpressure on the flow corresponding to the first VL indicated by the received first notification message according to the source suppression table, ensuring that the backpressure duration of the second communication device on the flow corresponding to the first VL is consistent with the congestion state of the first flow, and can continuously perform backpressure when the first flow is in a congested state, while precisely ending the backpressure when the first flow is not in a congested state.
[0019] As one possible implementation, the flow control method further includes: not sending the credit of the first VL to the third communication device before the end of the back pressure of the flow corresponding to the first VL.
[0020] As one possible implementation, the flow control method further includes: determining the accumulated credit of the second communication device during the backpressure period; the backpressure period includes the backpressure start time to the end time, and the accumulated credit is the credit of the first VL that the second communication device did not send to the third communication device during the backpressure period; and sending the accumulated credit to the third communication device after the backpressure end time of the flow corresponding to the first VL is reached.
[0021] Thus, after the second communication device reaches the end of the back pressure period, it sends the credit of the first VL accumulated during the back pressure period to the third communication device, so that the third communication device can forward the first flow normally to the second communication device after the first flow is no longer congested, thus ensuring the stability of data transmission.
[0022] As one possible implementation, the first entry of the source suppression table also includes a credit mask. Not sending the credit of the first VL to the third communication device before the backpressure end time of the flow corresponding to the first VL includes: sending the product of the local credit and the credit mask to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 0 before the backpressure end time of the flow corresponding to the first VL.
[0023] As one possible implementation, after the backpressure end time of the flow corresponding to the first VL is reached, the accumulated credit is sent to the third communication device, including: sending the product of local credit and credit mask to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 1 after the backpressure end time of the flow corresponding to the first VL is reached.
[0024] In this way, the second communication device can adjust whether to return the credit corresponding to the first VL to the third communication device based on the credit mask corresponding to the first-level congestion state. In the case of remote congestion, the credit return to the third communication device is suspended, and the credit return to the third communication device is performed normally when there is no remote congestion, thus realizing the response and processing of remote congestion in the CBFC scenario.
[0025] Thirdly, a flow control method is provided. This method is applied to a network system, which includes a first communication device, a second communication device, and a third communication device. The method is executed by the third communication device and includes: receiving a first credit message sent by the second communication device, the first credit message including a credit reduction identifier and a first VL identifier, the credit reduction identifier being used to instruct the third communication device to reduce the credit of the first VL indicated by the first VL identifier; and reducing the credit of the first VL according to the credit reduction identifier.
[0026] Fourthly, a flow control device is provided, including a transceiver module and a processing module. The transceiver module is used to receive a first flow, where congestion occurs in a first communication device. The processing module is used to obtain a first notification message when congestion occurs in the first flow at the first communication device. The first notification message includes an identifier indicating a first Virtual Level (VL) corresponding to the first flow. The transceiver module is also used to send the first notification message to a second communication device. The first notification message instructs the second communication device to send a first credit message to a third communication device. The first credit message includes a credit reduction identifier, which instructs the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL. The reduced credit of the first VL is used to instruct the third network device to perform flow control.
[0027] As one possible implementation, the first notification message also includes a backpressure duration, and the first credit message also includes a backpressure duration and an identifier of the first VL. The backpressure duration is used to indicate the duration for which the third communication device stops sending the stream corresponding to the first VL; the stream corresponding to the first VL includes the first stream.
[0028] As one possible implementation, the first notification message also includes a protocol identifier, which indicates that the first notification message indicates that the first flow corresponding to the first VL is causing congestion.
[0029] As one possible implementation, the first communication device and the second communication device are connected to each other through one or more other communication devices.
[0030] For the beneficial effects of any possible implementation of the fourth aspect of this application, please refer to the description of the beneficial effects of any possible implementation of the first aspect above, which will not be repeated here.
[0031] Fifthly, a flow control device is provided, including a transceiver module. The transceiver module is configured to receive a first notification message sent by a first communication device, the first notification message including an identifier indicating a first VL (Variable Limit), and the first notification message instructing a second communication device to send a first credit message to a third communication device. The transceiver module is further configured to send the first credit message to the third communication device; the first credit message includes a credit reduction identifier, the credit reduction identifier instructing the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL.
[0032] As one possible implementation, the first notification message also includes a backpressure duration, and the first credit message also includes a backpressure duration and an identifier for the first VL. The backpressure duration is used to indicate the duration for which the third communication device stops sending the stream corresponding to the first VL. Specifically, the transceiver module is used to: send the first credit message to the third communication device before the backpressure end time of the stream corresponding to the first VL is reached; whether the backpressure end time of the stream corresponding to the first VL is reached is determined based on the backpressure duration.
[0033] As one possible implementation, the second communication device includes a source-end suppression table, which includes a first entry that corresponds to the identifier of a first VL. The first entry includes a backpressure end time. Before reaching the backpressure end time of the flow corresponding to the first VL, the sum of the time when the second communication device receives the first notification message and the backpressure duration is less than or equal to the backpressure end time.
[0034] As one possible implementation, the transceiver module is also used to: not send the credit of the first VL to the third communication device before the end time of the back pressure of the stream corresponding to the first VL.
[0035] As one possible implementation, the processing module is further configured to determine the accumulated credit of the second communication device during the backpressure period; the backpressure period includes the backpressure start time to the end time, and the accumulated credit is the credit of the first VL that the second communication device did not send to the third communication device during the backpressure period. The transceiver module is further configured to: after reaching the backpressure end time of the stream corresponding to the first VL, send the accumulated credit to the third communication device.
[0036] As one possible implementation, the first entry also includes a credit mask. Specifically, the transceiver module is used to: send the product of the local credit and the credit mask to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 0 before the end of the backpressure of the flow corresponding to the first VL.
[0037] As one possible implementation, the transceiver module is specifically used to: send the product of local credit and credit mask to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 1 after the backpressure end time of the stream corresponding to the first VL.
[0038] For the beneficial effects of any possible implementation of the fifth aspect of this application, please refer to the description of the beneficial effects of any possible implementation of the second aspect above, which will not be repeated here.
[0039] A sixth aspect provides a flow control device, including a transceiver module and a processing module. The transceiver module is used to receive a first credit message sent by a second communication device. The first credit message includes a credit reduction identifier and a first VL identifier. The credit reduction identifier is used to instruct a third communication device to reduce the credit of the first VL indicated by the first VL identifier. The processing module is used to reduce the credit of the first VL according to the credit reduction identifier.
[0040] In a seventh aspect, a chip is provided, including a processing circuit and an interface circuit, the interface circuit being used for transmitting and receiving data, and the processing circuit being used for performing a flow control method as described in the first to third aspects or any possible implementation thereof.
[0041] Eighthly, a communication device is provided, the communication device including a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the communication device to perform the flow control method as described in the first to third aspects or any possible implementation thereof.
[0042] A ninth aspect provides a network system including at least one communication device for performing the flow control method as described in the first to third aspects or any possible implementation thereof.
[0043] In a tenth aspect, a computer program product is provided, including instructions that, when executed on a processor, implement the flow control method as described in the first to third aspects or any possible implementation thereof.
[0044] Eleventhly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a communication device, enable the communication device to perform the flow control method as described in the first to third aspects or any possible implementation thereof.
[0045] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0046] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description
[0047] Figure 1A schematic diagram of back pressure for a network using CBFC and package-by-package spraying provided in this application embodiment;
[0048] Figure 2 A schematic diagram of the structure of a network system provided in an embodiment of this application;
[0049] Figure 3 A flowchart illustrating a flow control method provided in an embodiment of this application;
[0050] Figure 4 A schematic diagram of the structure of a first credit message provided in an embodiment of this application;
[0051] Figure 5 A schematic flowchart illustrating a credit processing step based on a source-end suppression table, provided for an embodiment of this application;
[0052] Figure 6 This is a schematic diagram of the structure of a flow control device provided in an embodiment of this application;
[0053] Figure 7 A schematic diagram of the structure of a communication device provided in this application embodiment. Figure 1 ;
[0054] Figure 8 A schematic diagram of the structure of a communication device provided in this application embodiment. Figure 2 ;
[0055] Figure 9 This is a schematic diagram of the structure of a communication system provided in an embodiment of this application. Detailed Implementation
[0056] This application provides a flow control method applied to a communication device in a network system. The network system includes a first communication device, a second communication device, and a third communication device. The first communication device receives a first flow, and congestion occurs in the first flow within the first communication device. When congestion occurs in the first flow, the first communication device receives a first notification message and sends the first notification message to the second communication device. The first notification message includes an identifier of a first flow level (VL) corresponding to the first flow. In response to receiving the first notification message, the second communication device sends a first credit message to the third communication device. The first credit message includes a credit reduction identifier and an identifier of the first VL. The credit reduction identifier instructs the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL. In response to receiving the first credit message, the third communication device reduces the credit of the first VL according to the credit reduction identifier in the first credit message.
[0057] Based on the aforementioned flow control method, when the second communication device receives the first notification message sent by the first communication device, it detects remote congestion and sends a first credit message including a credit reduction identifier. This enables the second communication device to proactively deduct the local idle credit of the sending end, such as the third communication device, to achieve a backpressure effect. In this way, precise backpressure is applied to the flow corresponding to the first VL at the first-level source node causing congestion, such as the third communication device. Compared to the step-by-step backpressure process in the CBFC scenario, applying equal backpressure based on the first VL to other communication devices in the network system besides the first-level source node that forwards data containing the first VL avoids the head-blocking problem caused by other communication devices being unable to send other data flows sharing the link with the first flow due to backpressure, thus improving the overall data transmission efficiency of the network.
[0058] The technical solutions involved in this application may be applied not only to current communication technologies or communication devices, but also to future communication technologies or communication devices, or to communication systems and network systems that include communication devices. The terminology used in the embodiments section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. A brief introduction to some concepts that may be involved in this application is given below.
[0059] Congestion refers to a phenomenon in network communication where the number of data packets (such as data packets and messages) arriving at a certain part of the communication subnet is too large, causing that part of the network to be unable to process them, thus leading to a decline in network performance.
[0060] CBFC (Flow Control Controller) is a network flow control mechanism that assigns a certain amount of credit to each device in the network to control the sending and receiving of data. In CBFC, before sending data, the sender must confirm the credit with the receiver. Credit typically represents the amount of data the receiver can process. The sender can only continue sending data after receiving an updated credit from the receiver. Credit is dynamically updated, usually adjusted based on the receiver's remaining buffer space and processing capacity. Credit can also be referred to as a credit value or letter of credit.
[0061] CBFC maintains credits (essentially a counter) at the sending end to control data transmission. During link initialization between the receiver and sender, the receiver quantifies its local available buffer space into credits and synchronizes this information with the sender. Subsequently, for each data packet sent, the sender decrements its credits by a corresponding amount (e.g., 1). When the receiver retrieves a data packet from its buffer, generating a spare credit, it returns the corresponding amount (e.g., 1) of credits to the sender via a credit message, and the sender's credits are incremented by 1. Each time the sender transmits a data packet, it checks whether the remaining credits are greater than a preset value (e.g., 0) to determine whether to continue transmitting data packets.
[0062] Packet spraying is a traffic distribution and load balancing technique used to optimize data transmission paths and bandwidth utilization. The basic idea of packet spraying is to send multiple data packets of a data stream onto different network paths during data transmission, similar to "spraying" each data packet, rather than having all packets travel along the same path. For example, the sender breaks down a data stream into multiple small data packets and, based on the network topology and routing algorithm, selects different paths (different routers or links) for each packet's transmission. The receiver, upon receiving these scattered data packets, reassembles them into the original data stream in the correct order based on sequence numbers or other identifying information within the packets.
[0063] Backpressure is used to notify the data source (e.g., the sender) to slow down or pause data transmission when data traffic is too high, thereby preventing packet loss or buffer overflows at the receiving end due to limited processing capacity. For example, backpressure typically occurs at the receiving end; when the receiving end's processing capacity cannot keep up with the rate of data reception, it sends a backpressure signal to the sender. This signal can be any form of "pause" instruction, indicating that the receiving end cannot continue processing data temporarily, or requesting the sender to reduce its transmission rate. In some network protocols or data transmission systems, backpressure can be implemented through various means, including the Transmission Control Protocol (TCP) using a sliding window mechanism, application-layer backpressure, and backpressure from network devices (e.g., switches, routers).
[0064] VL identifiers are used to identify different virtual channels. Each virtual channel has a unique VL identifier, which allows network devices to distinguish traffic in different virtual channels, ensuring that data is transmitted according to predetermined priorities and paths. In traffic control, VL identifiers play the following roles: traffic isolation, bandwidth management, and traffic scheduling.
[0065] When there are high requirements for lossless network data transmission and high network bandwidth utilization, the network can adopt CBFC (Concurrent Packet Load Balancing) to achieve network losslessness, while employing a packet-by-packet spraying load balancing strategy to improve network bandwidth utilization. Network losslessness means that during network transmission, data packets are not lost or out of order, and the integrity and sequence of data are guaranteed. In networks applying CBFC and packet-by-packet spraying, various types of congestion may occur due to differences in the processing efficiency of nodes. For example, in artificial intelligence (AI) computing networks, congestion within processing nodes can cause the receiving and processing rate to be lower than the port bandwidth, resulting in congestion (also known as slow node congestion), or congestion can occur because multiple instantaneous data streams converge on the same interface of a network node (also known as incast congestion). Figure 1 As shown, when congestion occurs, CBFC will apply backpressure hop-by-hop along the transmission path of the congested flow causing the congestion. Combined with packet-by-packet load balancing, the congestion will spread from slow nodes or interfaces where multiple data flows converge to the entire network. At this time, innocent flows sharing the same path as the congested traffic will be unfairly backpressured due to header resistance issues, leading to throughput degradation.
[0066] in, Figure 1 Each network node can be a switch or router, and the processing node can be a graphics processing unit (GPU). The solid arrow from the network node to the processing node represents the data flow sent to the processing node, and the dashed arrow from the processing node to the network node and the dashed arrow from the network node to the network node both represent the back pressure from the downstream node to the upstream node.
[0067] The flow control method provided in this application can solve the problem. Figure 1 To address the issues raised, the following section, in conjunction with the accompanying drawings, will first describe the application scenarios of the embodiments of this application.
[0068] Figure 2 This is a schematic diagram of a network system provided in an embodiment of this application. The network system can belong to a data center network topology, an interconnection between multiple data centers, or a wide area network (WAN). The service scenarios of the network system can be high-performance service scenarios such as distributed machine learning training, distributed storage, high-performance computing, and containerization. The communication protocol of the network system can be a remote direct memory access (RDMA) protocol, a transmission control protocol (TCP), such as infinite bandwidth and RoCEv2 (RDMA over converged ethernet version 2).
[0069] For example, network system 200 includes multiple servers and multiple network devices.
[0070] Multiple servers are used to support high-performance services with different communication requirements, such as AI training, AI inference, and storage. Figure 2 As shown, network system 200 includes multiple server groups ( Figure 2 Only server groups 201, 202, 203, and 204 are shown, but the number of server groups is not limited to four. Each server group includes one or more servers. Figure 2(Only three servers are shown, but it is not limited to three servers). The servers in each server group are connected to network devices via network interface cards (NICs). The NICs are used to send and receive data and have the capability to receive packets out of order.
[0071] Multiple network devices can be routers, switches, gateways, and other devices with data exchange and transmission functions, possessing capabilities such as link quality identification, generating / sending / processing announcement messages, modifying message fields, and adjusting the path of each packet. For example... Figure 2 As shown, network system 200 includes multiple network devices ( Figure 2 Only network devices 205, 206, 207, 208, 209, 210, 211, 212, 213, and 214 are shown, but the number is not limited to 10. These network devices can be located at different layers within network system 200. For example, if network system 200 is a spine-leaf network architecture, network devices 205, 206, 207, and 208 can be leaf switches in the access layer; network devices 209, 210, 211, and 212 can be spine switches in the aggregation layer; and network devices 213 and 214 can be core switches in the core layer.
[0072] For example, in network system 200, each server in server group 201 communicates with network device 205 via a network interface card (NIC), each server in server group 202 communicates with network device 206 via a NIC, each server in server group 203 communicates with network device 207 via a NIC, and each server in server group 204 communicates with network device 208 via a NIC. Network device 205 communicates with network devices 209 and 210, network device 206 communicates with network devices 209 and 210, network device 207 communicates with network devices 211 and 212, and network device 208 communicates with network devices 211 and 212. Network device 213 communicates with network devices 209, 210, 211, and 212, and network device 214 communicates with network devices 209, 210, 211, and 212.
[0073] In the embodiments of this application, both the network devices and servers in the network system 200 described above can be referred to as communication devices. A communication device can also be a processor in a server (such as a neural network processing unit (NPU), central processing unit (CPU), GPU, etc.), a network interface card (NIC) in a server, a switching chip in a network device, or a CPU in a network device, etc., and this application does not limit it to these specific types.
[0074] It should be understood that Figure 2 This is a simplified diagram for ease of understanding only. The network system 200 may also include other network devices, servers, and / or other devices, and the connection relationships between nodes may also vary. Figure 2 It was not drawn in the middle.
[0075] It should be understood that Figure 2 This embodiment only illustrates a network architecture with three-layer network devices. This application can also be applied to network architectures with two-layer network devices. In this case, network devices 209, 210, 211, and 212 can be considered non-existent. Network devices 205, 206, 207, and 208 are directly connected to network devices 213 and 214, respectively. In this case, network devices 205, 206, 207, and 208 are leaf switches at the access layer, and network devices 213 and 214 are spine switches at the aggregation layer. This application embodiment can also be applied to network architectures with four-layer, five-layer, or any other layer of network devices, which will not be elaborated upon here.
[0076] Next, the flow control method provided in the embodiments of this application will be described in detail with reference to the accompanying drawings. Here, we will refer to... Figure 2 Taking the network device in the network system 200 as an example to illustrate the specific steps of the flow control method.
[0077] Figure 3 This is a flowchart illustrating a flow control method provided in an embodiment of this application. Please refer to... Figure 3 The method may include the following steps S301-S307.
[0078] S301, The first communication device receives the first stream.
[0079] The first stream can be a data stream sent from a third communication device to a second communication device, and then forwarded by the second communication device to the first communication device via other communication devices between the second and first communication devices. The first communication device can be directly connected to the second communication device, or it can communicate with the second communication device through other communication devices, which can be one or more communication devices. The destination device of this data stream can be a communication device connected to the first communication device. In this embodiment, flow control between the second and third communication devices is based on CBFC (Circuit Flow Control Function). Flow control between other communication devices in the network system 200 can also be based on CBFC.
[0080] Congestion occurs at the first communication device in the first flow. This congestion can be incast congestion or slow node congestion.
[0081] by Figure 2 In the network system 200 shown, the first communication device is network device 207, the second communication device is network device 205, and the third communication device is server group 201. Taking server group 203 as the destination device of the data stream as an example, server group 201 sends the first stream to server group 203, and network device 205 forwards the first stream to network device 207 through other communication devices, namely network device 209, network device 213, and network device 211.
[0082] S302, In the event of congestion in the first communication device, the first communication device receives a first notification message.
[0083] The first communication device determines that congestion has occurred in the first flow and generates a first notification message based on the information from the first flow. The first notification message can also be called a remote congestion notification (RCN) message.
[0084] The first notification message includes the identifier of the first VL causing the congestion.
[0085] As one possible implementation, the first communication device identifies the first flow causing congestion by determining congestion packets from ports whose port queue depth exceeds a threshold.
[0086] Optionally, the first communication device obtains the port queue depth of all downlink ports of the first communication device. The first communication device determines whether the port queue depth of all downlink ports exceeds a threshold. If the port queue depth of any downlink port of the first communication device exceeds the threshold, subsequent packets arriving at that downlink port are extracted as congestion packets.
[0087] The above threshold can be called Q. throttle .
[0088] For example, the first communication device can use a network virtual terminal (NVT) to obtain the port queue depth of all downlink ports of the first communication device. The first communication device can determine whether the port queue depth of all downlink ports exceeds a threshold through its processor (such as a switch processor). Subsequent packets arriving at that downlink port can be copied and sent to the processor of the first communication device as congestion packets.
[0089] Port queue depth refers to the amount of buffered data in the queue of data packets waiting to be transmitted on the port of a network device (such as a switch, router, or network interface card). A port queue depth exceeding a threshold usually indicates that the port's data processing speed cannot match its data receiving speed, causing data packets to accumulate at the port, which can be considered congested. The threshold for port queue depth can be flexibly adjusted according to changes in the port's data receiving and processing speeds; a specific value for the threshold is not limited here.
[0090] Optionally, the first communication device extracts the source address (SA) and destination address (SA) from the congestion message and determines that the data stream indicated by the source address and destination address of the congestion message is the first stream in which congestion occurs at the first communication device.
[0091] As one possible implementation, the first notification message is generated based on the first stream of information extracted from the congestion message.
[0092] The first communication device extracts first-stream information from the congestion message, such as the source address, destination address, and identifier of the first VL. The source address of the first notification message is the destination address of the congestion message, and the destination address of the first notification message is the source address of the congestion message.
[0093] For example, the first notification message may also include information such as backpressure duration and protocol identifier. The specific content of the first notification message will be illustrated below with reference to Table 1.
[0094] Table 1
[0095]
[0096] In the data structure example of the first notification message shown in Table 1 above, the VL field is used to carry the identifier of the VL, which is the same as the identifier of the VL in the congestion message.
[0097] The `protocol` field is a protocol identifier field used to indicate that the flow corresponding to the VL indicated by the packet is causing congestion; that is, the packet is an announcement packet for congestion notification to a remote end. For example, when the `protocol` field is 0x109, it indicates that the packet is an announcement packet. This application does not limit the value of the `protocol` field corresponding to the announcement packet.
[0098] The payload field represents the effective payload, which carries the backpressure duration. The backpressure duration indicates the duration for which backpressure is applied to the stream corresponding to the VL indicated by the VL representation; that is, the duration for which backpressure is applied to the stream corresponding to the VL, causing the sender of the stream corresponding to the VL to stop transmitting. One VL can correspond to one or more streams, and one stream has only one VL. Therefore, in this embodiment, the stream corresponding to the first VL can include one or more streams, including the first stream.
[0099] The aforementioned back pressure duration can be referred to as T. halt The backpressure duration is calculated based on the port queue depth of ports whose port queue depth exceeds the threshold. For details on how to calculate this, please refer to the specific determination method of backpressure duration in CBFC or Priority-based Flow Control (PFC). It will not be elaborated here.
[0100] The DGUID field is the destination GUID field, and the SGUID field is the source GUID field. GUID stands for source globally unique identifier. The DGUID field identifies the destination device or node in data communication, i.e., the receiver of the data packet, while the SGUID identifies the source device or node in data communication, i.e., the sender of the data packet. The DGUID and SGUID in the first announcement message can be considered as routing information, equivalent to the address and port of the corresponding communication device or equipment in the forwarding path of the first announcement message. The DGUID and SGUID in the first announcement message can be obtained from the DGUID and SGUID carried in the congestion message.
[0101] The CRD field, or credit field, indicates the credit of the remaining data or traffic that the sender can send, or the credit of the remaining data that the receiver can receive. The ACK field, or acknowledgment field, indicates that the received data has been acknowledged. The CRD_VL field indicates the credit of the maximum data or remaining traffic that the receiver can receive for a given virtual channel. The CFG field, or configuration field, carries information related to network device configuration, or transmits hardware configuration settings, or transmits configuration information related to transmission rate, queue management, traffic priority, etc. The Plength field, or payload length field, indicates the length of the payload.
[0102] The structure of the first notification message shown in Table 1 above is only an example. The first notification message may also include field content specified by relevant protocols such as CBFC and packet spraying. For example, the first communication device may also encapsulate the content shown in Table 1, encapsulating fields such as source address and destination address into the message header.
[0103] by Figure 2 In the network system 200 shown, server group 201 sends a data stream to server group 203. Taking network device 207 as the first communication device, network device 207 obtains the port queue depth of all downlink ports and determines whether the port queue depth of all downlink ports exceeds a threshold. If the port queue depth of any downlink port exceeds the threshold, subsequent packets arriving at that downlink port are extracted as congestion packets. Network device 207 extracts the source address, destination address, and first VL identifier from the congestion packet and generates a first announcement packet based on them, filling the backpressure duration into the payload field of the first announcement packet. For example, the source address of the first announcement packet is the destination address of the congestion packet, and the destination address of the first announcement packet is the source address of the congestion packet.
[0104] In this context, the downlink port of network device 207 refers to the port that receives data streams and forwards them to server group 203.
[0105] S303, The first communication device sends a first notification message to the second communication device.
[0106] After generating a first announcement message based on the first flow, the first communication device sends the first announcement message to the access node on the source node side of the first flow, i.e., the second communication device. The first communication device communicates with the second communication device through other communication devices.
[0107] As one possible implementation, the first communication device sends a first notification message to the second communication device based on the original path. Here, the original path is the reverse forwarding path of the forwarding path from the second communication device to the first communication device for the congestion message.
[0108] Optionally, the first announcement message includes a DGUID field and a SGUID field. The first communication device and other communication devices on the reverse forwarding path determine the port corresponding to the reverse forwarding path based on the DGUID field and the SGUID field, so as to enable the first announcement message to return along the original path of the congestion message.
[0109] by Figure 2 In the network system 200 shown, server group 201 sends a data stream to server group 203, with network device 207 as the first communication device and network device 205 as the second communication device. Network device 207 determines the reverse forwarding path as network device 207 → network device 211 → network device 213 → network device 209 → network device 205 based on the DGUID and SGUID fields. Network device 207 sends a first announcement message to network device 211, causing network device 211 to forward the first announcement message to network device 213, network device 213 to forward the first announcement message to network device 209, and network device 209 to forward the first announcement message to network device 207.
[0110] S304. The second communication device receives the first notification message sent by the first communication device.
[0111] After receiving the first notification message, the second communication device parses the first notification message to obtain the source address and destination address of the first notification message in order to locate the first-level sender, namely the third communication device.
[0112] As one possible implementation, when the second communication device parses the first announcement message and finds the protocol identifier used to indicate the announcement message, it continues to parse the first announcement message to locate the sender of the first-order flow, i.e., the source node, such as the third communication device. For example, the second communication device queries the local flow table for the corresponding first-order flow and the port receiving the first-order flow based on the source address and destination address of the first announcement message.
[0113] S305, The second communication device sends the first credit message to the third communication device.
[0114] The first credit message includes a credit reduction flag. The credit reduction flag is used to instruct the third communication device to reduce the credit of the first VL indicated by the first VL's flag.
[0115] The first VL can correspond to one or more flows, which include the first flow and share the credit of the first VL.
[0116] As one possible implementation, the first credit message can be obtained by adding credit increment / decrement flags to a credit-based flow control message.
[0117] For example, such as Figure 4 As shown, credit-based flow control messages include a credit field, a VL field, etc., with the first credit message adding a credit increment / decrement field. The credit increment / decrement field can be 1 bit or other lengths. Credit-based flow control messages may also include fields carried in the regular message header, such as source address and destination address. Figure 4 It is not shown in the image and will not be described further here.
[0118] The Credit field indicates the amount of spare credit available to the receiver, such as a second communication device, i.e., the amount of data the receiver can still accept. The VL field indicates which VL the credit applies to. There is a direct correlation between the amount of spare credit and the amount of data the receiver can still accept; the specific ratio can be flexibly adjusted according to requirements, and will not be elaborated further here.
[0119] If the value of the credit increase / decrease field is used to indicate a credit increase, then the credit field and the credit increase / decrease field can be combined into a credit increase identifier. The first credit message is used to instruct the third communication device to increase the credit of the first VL indicated by the first VL identifier, and the amount of credit increase is equal to the amount of idle credit indicated by the credit field. If the value of the credit increase / decrease field is used to indicate a credit decrease, then the credit field and the credit increase / decrease field can be combined into a credit decrease identifier. The first credit message is used to instruct the third communication device to decrease the credit of the first VL indicated by the first VL identifier, and the amount of credit decrease is equal to the amount of idle credit indicated by the credit field.
[0120] For example, a value of 0 in the credit increase / decrease field indicates an increase in credit, and a value of 1 indicates a decrease in credit. Similarly, a value of 1 in the credit increase / decrease field indicates an increase in credit, and a value of 0 indicates a decrease in credit.
[0121] The embodiments of this application do not limit the specific way in which the first credit message carries the credit increase / decrease field. For example, the first credit message may use any reserved field in the credit-based flow control message as the credit increase / decrease field.
[0122] In one possible implementation, the second communication device receives the first notification message and sends a first credit message to the third communication device before the end time of the back pressure of the flow corresponding to the first VL indicated by the identifier of the first VL.
[0123] As one possible implementation, before the end of the first-level backpressure, the second communication device does not send the credit of the first VL indicated by the first VL identifier to the third communication device. Thus, the second communication device does not return any spare credits to the third communication device before the backpressure ends; the third communication device only reduces credits according to the credit reduction identifier, thereby reducing the number of data packets (including the first stream) corresponding to the first VL that the third communication device continues to send to the second communication device.
[0124] As one possible implementation, after the backpressure ends at the point corresponding to the first VL, the second communication device sends accumulated credits to the third communication device. The accumulated credits are the idle credits accumulated by the second communication device during the backpressure period, specifically the credits of the first VL indicated by the identifier of the first VL sent by the second communication device to the third communication device during the backpressure period. The backpressure period includes the time from the start to the end of the backpressure. Thus, by sending the accumulated credits to the third communication device after the backpressure ends, the second communication device can determine the actual idle credits of the second communication device, i.e., the acceptable amount of data.
[0125] This application does not limit the specific implementation methods of the second communication device in determining whether the back pressure end time of the flow corresponding to the first VL has been reached, or how the second communication device should not return idle credits to the third communication device and record accumulated credits before the back pressure end time, or how it should return accumulated credits to the third communication device after the back pressure end time. As a possible example, the second communication device can implement back pressure end time determination and credit processing based on a source-end suppression table. For specific examples, please refer to the source-end suppression table shown in Table 2. Figure 5 The relevant steps shown will not be repeated here.
[0126] by Figure 2 In the network system 200 shown, server group 201 sends a data stream to server group 203. The first communication device is network device 207, the second communication device is network device 205 (for example), and the third communication device can be server group 201. After receiving the first announcement message sent by network device 207, network device 205 sends a first credit message to server group 201.
[0127] S306. The third communication device receives the first credit message sent by the second communication device.
[0128] S307, the third communication device reduces the credit of the first VL indicated by the VL identifier of the first credit message according to the credit reduction identifier of the first credit message.
[0129] When the third communication device receives the first credit message sent by the second communication device, it parses the credit reduction identifier and the identifier of the first VL in the first credit message, and reduces the credit of the first VL indicated by the identifier of the first VL according to the credit reduction identifier.
[0130] As one possible implementation, the credit reduction flag can be carried in the credit increment / decrement field of the first credit message. When the third communication device receives the first credit message, if the credit increment / decrement field contains a credit reduction flag, it reduces the credit of the first VL indicated by the first VL flag carried in the first credit message. The amount of credit reduction can be fixed; for example, when the third communication device receives a first credit message carrying a credit reduction flag, it decrements the credit of the first VL indicated by the VL flag by 1, and when it receives the next first credit message carrying a credit reduction flag, it decrements the credit of the first VL indicated by the VL flag by 1 again. The amount of credit reduction of 1 is merely an example; in other possible implementations, it can be any value.
[0131] In a possible embodiment of this application, when the first communication device continuously senses congestion, it will continuously send a first notification message to the second communication device. In response to each first notification message, the second communication device will continuously send a first credit message to the third communication device to continuously reduce the credit of the third communication device until the credit of the third communication device is reduced to 0, thereby achieving continuous back pressure on the third communication device.
[0132] In possible embodiments of this application, the specific locations of the first, second, and third communication devices in the network are not limited. The above embodiment uses the example of server group 201 sending a data stream to server group 203 in network system 200. Assuming the first communication device is network device 207, the second communication device is network device 205, and the third communication device is server group 201, the flow control method is explained for a scenario where the first communication device is a destination node-side access communication device (or network device), and the second communication device is a source node-side access communication device (or network device). In possible embodiments, the second communication device is a source node-side access communication device (or network device), and the first communication device can also be any communication device (or network device) connected to the second communication device, which will not be elaborated further here. The access communication device can be a top-of-rack (ToR) switch.
[0133] Based on the aforementioned flow control method, when the second communication device receives the first notification message sent by the first communication device, it detects remote congestion and sends a first credit message including a credit reduction identifier. This enables the receiving end, such as the second communication device, to report the credit reduction amount and proactively deduct the local idle credit of the sending end, such as the third communication device, achieving a backpressure effect. In this way, precise backpressure is applied to the flow corresponding to the first VL at the first-level source node causing congestion, such as the third communication device. Compared to the step-by-step backpressure process in the CBFC scenario, applying equal backpressure based on the first VL to other communication devices in the network system besides the first-level source node that forwards data containing the first VL avoids the head-blocking problem caused by other communication devices being unable to send other data flows sharing the link with the first flow due to backpressure, thus improving the overall data transmission efficiency of the network.
[0134] The above text combined Figure 3 and Figure 4 The flow control method provided in this application has been described in general. The following section will refer to Table 2 and... Figure 5 This paper provides a detailed explanation of how to implement operations such as recording accumulated credit and returning credit in the flow control method based on the source-end suppression table.
[0135] The source suppression table includes one or more of the following: VL, backpressure end time, credit mask, and accumulated credit. Each port of the second communication device can be configured with a source suppression table. When the second communication device receives the first announcement message, it determines the source suppression table of the corresponding port based on the source address carried in the first announcement message, and queries the corresponding entry in the source suppression table based on the identifier of the first VL in the first announcement message.
[0136] The source suppression table will be explained next with reference to Table 2.
[0137] Table 2
[0138]
[0139]
[0140] The VL value indicates the port or virtual channel corresponding to the data stream; one VL corresponds to one entry in the source suppression table. The backpressure end time, also known as aging_time, is expressed in VL. i For example, the end time of the back pressure is equal to T. cur_i +T halt_i T cur_i This indicates that the second communication device receives VL. i The local (current) time of the corresponding first notification message, T halt_i This indicates that the VL carried in the first notification message received by the second communication device i The corresponding back pressure duration.
[0141] The second communication device determines T cur_i +T halt_i Is it greater than the recorded back pressure end time? If yes, it indicates that the back pressure end time has been reached, and the second communication device updates the back pressure end time to T. cur_i +T halt_i If not, it indicates that the reverse pressure end time has not been reached, and the second communication device sends one or more first credit messages to the third communication device.
[0142] Before the reverse pressure end time is reached, the second communication device sets the credit mask to 0. After the reverse pressure end time is reached, the second communication device sets the credit mask to 1. During the period when the credit is 0, the idle credit generated corresponding to VL is accumulated in the accumulated credit.
[0143] Figure 5 This is a flowchart illustrating a credit processing step based on a source-end suppression table, provided as an embodiment of this application. Please refer to... Figure 5 This step may include the following steps S501-S506. For example, the second communication device in S501-S506 may be... Figure 2 The network device 205 shown, the third communication device can be Figure 2 The server group shown is 201.
[0144] S501, the second communication device determines the port based on the source address and destination address of the first notification message.
[0145] The second communication device can be configured with a flow table containing a mapping relationship between source address, destination address and port. The second communication device locates the corresponding port based on the source address and destination address.
[0146] For example, the second communication device is a network device 205. The second communication device locates the port from the server group 201 to receive the first-level port in the flow table based on the source address and destination address.
[0147] The first notification message includes the identifier of the first VL and the backpressure duration.
[0148] S502, the second communication device determines the corresponding entry in the source suppression table based on the identifier of the first VL.
[0149] The second communication device queries the source suppression table based on the identifier of the first VL, that is, it queries whether there is a first entry in the source suppression table that has the same identifier as the first VL of the first announcement message.
[0150] If no first entry with the same identifier as the first VL exists in the source suppression table, then the first entry is created. The value of the VL in this first entry is the identifier of the first VL carried in the first announcement message, and the backpressure end time is T. cur +T halt T halt The backpressure duration carried in the first notification message, and the credit mask of the first entry is configured to 0.
[0151] S503, the second communication device in T cur +T halt If the time exceeds the back pressure end time, update the back pressure end time.
[0152] The second communication device is in T cur +T halt If the time exceeds the back pressure end time, update the recorded back pressure end time to T. cur +T halt .
[0153] S504, the second communication device in T cur +T halt When the time is less than or equal to the end of the reverse pressure, the first credit message is sent to the third communication device.
[0154] The second communication device is in T cur +T halt When the time is less than or equal to the end of the reverse pressure, one or more first credit messages are sent to the third communication device.
[0155] In this context, the value of the credit field in the first credit message is equal to the product of the local credit and the credit mask. The local credit is the credit of the VL indicated by the identifier of the first VL in the second communication device. The credit mask of the first entry corresponding to the identifier of the first VL is 0 before the end of the backpressure of the flow corresponding to the VL indicated by the identifier of the first VL, i.e., at T... cur +T halt When the value is less than or equal to the end time of the back pressure, it is 0. Thus, the value of the credit field in the first credit message is 0, and the second communication device... cur +T halt When the time is less than or equal to the end of the reverse pressure, the first VL signal is not sent to the third communication device.
[0156] S505, the second communication device updates the accumulated credit based on the generated first VL idle credit during the period when the credit mask is 0.
[0157] During the period when the credit mask is 0, the second communication device adds the local idle credit generated by the second communication device corresponding to the first VL to the accumulated credit field.
[0158] S506, the second communication device in T curWhen the time exceeds the back pressure end time, delete the first entry in the source suppression table and send the accumulated credit to the third communication device.
[0159] The second communication device is in T cur When the time exceeds the end of the back pressure period, the credit mask of the first entry is set to 1, and the accumulated credit of the corresponding VL is returned to the third communication device within the subsequent back pressure period.
[0160] The second communication device can return accumulated credit to the third communication device via a second credit message. The credit increase / decrease field of the second credit message carries a credit increase identifier, and the value of the credit field in the second credit message is equal to the product of the credit mask and the local spare credit.
[0161] This application's embodiments, based on a source-end suppression table and a credit mask, enable the source node-side access communication device, such as a second communication device, to decide whether to return credit to the upstream node of the congested flow based on whether congestion is detected. This achieves response and processing of remote congestion in CBFC scenarios, enabling precise backpressure on the sending end of the congested flow without requiring hop-by-hop backpressure. Thus, it avoids causing equal backpressure to other data flows sharing the link with the congested flow by applying hop-by-hop backpressure to upstream nodes.
[0162] To complement the flow control method provided in the embodiments of this application, this application also provides a flow control device 600. This flow control device 600 is used to execute the above-described flow control method. Figure 6 As shown, the device includes a transceiver module 610 and a processing module 620.
[0163] For example, the flow control device 600 can implement the first communication device in the above embodiments, such as... Figure 3 The functions of network device 207.
[0164] Transceiver module 610 is used to receive the first stream. The first stream is congested in the first communication device.
[0165] The processing module 620 is configured to obtain a first notification message in the event of congestion in the first communication device; the first notification message includes an identifier indicating the first VL corresponding to the first flow.
[0166] The transceiver module 610 is used to send a first notification message to the second communication device. The first notification message is used to instruct the second communication device to send a first credit message to the third communication device. The first credit message includes a credit reduction identifier, which is used to instruct the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL. The reduced credit of the first VL is used to instruct the third network device to perform flow control.
[0167] As one possible implementation, the first notification message also includes a backpressure duration, and the first credit message also includes a backpressure duration and an identifier of the first VL. The backpressure duration is used to indicate the duration for which the third communication device stops sending the stream corresponding to the first VL, and the stream corresponding to the first VL includes the first stream.
[0168] As one possible implementation, the first notification message also includes a protocol identifier, which indicates that the first notification message indicates that the flow corresponding to the first VL is causing congestion.
[0169] As one possible implementation, the first communication device and the second communication device are connected to each other through one or more other communication devices.
[0170] For example, the flow control device 600 can implement the second communication device in the above embodiments, such as... Figure 3 The functions of the network device 205.
[0171] The transceiver module 610 is used to receive a first notification message sent by the first communication device. The first notification message includes an identifier indicating a first VL, and is used to instruct the second communication device to send a first credit message to the third communication device.
[0172] The transceiver module 610 is used to send a first credit message to a third communication device. The first credit message includes a credit reduction identifier, which instructs the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL.
[0173] As one possible implementation, the first notification message also includes a backpressure duration, and the first credit message also includes a backpressure duration and an identifier for the first VL. The backpressure duration is used to indicate the duration for which the third communication device stops sending the stream corresponding to the first VL. Specifically, the transceiver module 610 is used to: send the first credit message to the third communication device before the backpressure end time of the stream corresponding to the first VL is reached; whether the backpressure end time of the stream corresponding to the first VL is reached is determined based on the backpressure duration.
[0174] As one possible implementation, the second communication device includes a source-end suppression table, which includes a first entry that corresponds to the identifier of a first VL. The first entry includes a backpressure end time. Before reaching the backpressure end time of the flow corresponding to the first VL, the sum of the time when the second communication device receives the first notification message and the backpressure duration is less than or equal to the backpressure end time.
[0175] As one possible implementation, the transceiver module 610 is also configured to: not send the credit of the first VL to the third communication device before the end time of the back pressure of the flow corresponding to the first VL.
[0176] As one possible implementation, processing module 620 is used to: determine the accumulated credit of the second communication device during the backpressure period; the backpressure period includes the backpressure start time to the end time, and the accumulated credit is the credit of the first VL that the second communication device did not send to the third communication device during the backpressure period. Transceiver module 610 is used to: send the accumulated credit to the third communication device after the backpressure end time of the stream corresponding to the first VL is reached.
[0177] As one possible implementation, the first entry also includes a credit mask. Specifically, the transceiver module 610 is used to: send the product of the local credit and the credit mask to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 0 before the end of the backpressure of the stream corresponding to the first VL.
[0178] As one possible implementation, the transceiver module 610 is specifically used to: send the product of local credit and credit mask to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 1 after the backpressure end time of the flow corresponding to the first VL.
[0179] For example, the flow control device 600 can implement the third communication device in the above embodiments, such as... Figure 3 The functions of server group 201.
[0180] The transceiver module 610 is used to receive a first credit message sent by the second communication device. The first credit message includes a credit reduction flag and a first VL flag, wherein the credit reduction flag is used to instruct the third communication device to reduce the credit of the first VL flag indicated by the first VL flag.
[0181] Processing module 620 is used to reduce the credit of the first VL based on the credit reduction identifier.
[0182] It should be understood that the above Figure 6 The flow control device 600 provided is illustrated by the division of the above-mentioned functional modules when implementing its functions. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0183] For more detailed information on the functions performed by the aforementioned flow control device 600, please refer to [link / reference needed]. Figures 3-5 A description of the provided flow control methods and their implementation.
[0184] All of the above modules can be implemented in software, hardware, or a combination of both. For example, the implementation methods of the transceiver module 610 and the processing module 620 will be described below.
[0185] As an example of a software functional unit, the transceiver module 610 or the processing module 620 may include code running on a device instance. The device instance may be at least one of a physical device (e.g., a switch, router, server, etc.) or a virtualized device (e.g., a virtual machine, etc.). Furthermore, the aforementioned device instance may be one or more. For example, the transceiver module 610 or the processing module 620 may include code running on multiple physical / virtualized devices.
[0186] As an example of a hardware functional unit, the transceiver module 610 or the processing module 620 may include at least one hardware device. For example, the transceiver module 610 may include a network interface card, a transceiver, etc., and the processing module 620 may include any one or more processors such as a central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a neural network processing unit (NPU), a data processing unit (DPU), or a microprocessor (MP). Alternatively, the processing module 620 may be a device or device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
[0187] This application also provides a communication device 700 as an example of a hardware device. The communication device 700 provided in this application can be any communication device (e.g., a first communication device, a second communication device, a third communication device, etc.), any hardware device (e.g., network device 207, network device 205, server group 201, etc.), or any device with communication and processing capabilities (e.g., a switch, a router, a server, etc.) proposed in this application.
[0188] like Figure 7As shown, the communication device 700 includes: a bus 702, a communication interface 704, a processor 706, and a memory 708. The communication interface 704, processor 706, and memory 708 communicate with each other via the bus 702. It should be understood that this application does not limit the number of processors and memories in the communication device 700. Optionally, the processor 706 of the communication device 700 can be connected to a display or input device via the communication interface 704. Figure 7 (Not shown in the image).
[0189] The 702 bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus 702 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 702 may include a path for transmitting information between various components of the communication device 700 (e.g., communication interface 704, processor 706, memory 708).
[0190] Communication interface 704 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between communication device 700 and devices or communication networks. Communication interface 704 may include wired communication interfaces and wireless communication interfaces. Specifically, communication interface 704 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a Wireless Local Area Network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof.
[0191] The display may include various display devices capable of display functions, such as plasma displays and liquid crystal displays. The communication device 700 can realize display functions through the display. Input devices may include various input devices capable of information / signal input, such as keyboards, mice, and touch screens.
[0192] Processor 706 may include a CPU, DSP, NP, NPU, DPU, MP, or one or more integrated circuits for implementing the solutions of this application. For example, processor 706 includes an ASIC, PLD, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of this invention. A processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. In the embodiments of this application, processor 706 can be used to execute the embodiments of this application. Figure 3 The steps or operations in the proposed flow control method.
[0193] Memory 708 may include volatile memory, such as random access memory (RAM). Memory 708 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Alternatively, memory 708 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer.
[0194] The memory 708 may store program code that executes the scheme of this application, and the processor 706 may execute the program code stored in the memory 708. That is, the communication device 700 can implement the embodiments of this application through the processor 706 and the program code in the memory 708. Figure 3 The proposed flow control method includes steps or operations. The program code may include one or more software modules. Optionally, the processor 706 itself may also store program code or instructions for executing the scheme of this application.
[0195] In a specific embodiment, the communication device 700 may correspond to any of the aforementioned communication devices (e.g., the first communication device, the second communication device, the third communication device, etc.). The processor 706 reads the instructions in the memory 708, enabling the communication device 700 to execute the operations performed by any of the communication devices.
[0196] In a specific embodiment, the memory 708 stores executable program code for implementing the functions of the aforementioned transceiver module 610 and processing module 620. The processor 706 executes the executable program code to implement the functions of the aforementioned transceiver module 610 and processing module 620 respectively.
[0197] This application also provides a communication device 800. The communication device 800 is another example of a hardware device. The communication device 800 provided in this application can serve as a network device (e.g., a switch, router, etc.) in this application. Any communication device proposed in this application (e.g., a first communication device, a second communication device, a third communication device, etc.) can be implemented on the communication device 800.
[0198] like Figure 8 As shown, the communication device 800 includes a main control board 810 and an interface board 830.
[0199] The main control board 810, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the communication device 800, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 810 includes a central processing unit 811 and a memory 812.
[0200] The interface board 830, also known as a line processing unit (LPU), linecard, or service board, provides various service interfaces and enables packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (packet over SONET / SDH) interfaces, and, for example, flexible Ethernet clients (FlexE Clients). The interface board 830 includes: a central processing unit 831, a network processor 832, a forwarding table entry memory 834, and a physical interface card (PIC) 833.
[0201] The central processing unit 831 on the interface board 830 is used to control and manage the interface board 830 and communicate with the central processing unit 811 on the main control board 810.
[0202] The network processor 832 is used to implement packet forwarding processing. The network processor 832 can be in the form of a forwarding chip. Specifically, the network processor 832 forwards received packets based on the forwarding table stored in the forwarding table entry memory 834. If the destination address of the packet is the address of the communication device 800, the packet is sent to the CPU (such as the central processing unit 811) for processing; if the destination address of the packet is not the address of the communication device 800, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing includes: packet ingress interface processing, forwarding table lookup; downlink packet processing includes forwarding table lookup, etc.
[0203] The physical interface card 833 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 830 through this card, and processed packets are sent out from the physical interface card 833. The physical interface card 833, also called a daughter card, can be installed on the interface board 830. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 832 for processing. In some embodiments, the central processing unit can also perform the functions of the network processor 832, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for a network processor 832 within the physical interface card 833.
[0204] Optionally, the communication device 800 includes multiple interface boards. For example, the communication device 800 also includes an interface board 840, which includes a central processing unit 841, a network processor 842, a forwarding table entry memory 844, and a physical interface card 843.
[0205] Optionally, the communication device 800 also includes a switching fabric board 820. The switching fabric board 820 can also be referred to as a switch fabric unit (SFU). When the communication device has multiple interface boards 830, the switching fabric board 820 is used to complete data exchange between the interface boards. For example, interface boards 830 and 840 can communicate through the switching fabric board 820.
[0206] The main control board 810 and the interface board 830 are coupled. For example, the main control board 810, interface boards 830 and 840, and the switching network board 820 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 810 and the interface board 830, and the main control board 810 and the interface board 830 communicate with each other through the IPC channel.
[0207] Logically, the communication device 800 includes a control plane and a forwarding plane. The control plane includes a main control board 810 and a central processing unit 831, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 834, a physical interface card 833, and a network processor 832. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the device's status. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 832 uses the forwarding table distributed by the control plane to look up and forward messages received by the physical interface card 833. The forwarding table distributed by the control plane can be stored in the forwarding table entry memory 834. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
[0208] In this embodiment, the operation on interface board 840 is the same as that on interface board 830, and will not be described again for simplicity. The communication device 800 in this embodiment can correspond to the network device in the above method embodiments. The main control board 810, interface board 830 and / or 840 in the communication device 800 can realize the functions and / or various steps implemented by the communication device in the above method embodiments, and will not be described again for simplicity.
[0209] It's worth noting that a communication device may have one or more main control boards, including a primary and a backup main control board. It may also have 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. A switching network board may or may not exist; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the communication device may not need a switching network board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the communication device can have at least one switching network board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture communication device are greater than those of a centralized architecture device. Alternatively, the communication device can also consist of a single board, without a switching network board. The functions of the interface board and the main control board are integrated on 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 to execute the combined functions. This type of device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.
[0210] In a specific embodiment, any of the aforementioned communication devices can be implemented on the communication device 800. The memory 812 of the main control board 810 can store instructions for implementing the functions performed by the aforementioned communication devices (for example, instructions for implementing the functions of the aforementioned transceiver module 610 and processing module 620). The central processing unit 811 of the main control board 810 executes the instructions in the memory 812 and can perform the functions performed by the aforementioned communication devices together with other components such as the interface board 830 and the switching network board 820.
[0211] In some possible implementations, any communication device proposed in the embodiments of this application can be a virtualization device. As an example, a virtualization device can be a virtual machine (VM), which is deployed on a hardware device (e.g., a physical host). A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Virtual machines can be configured as the communication devices involved in the embodiments of this application. For example, the various communication devices can be implemented based on a general-purpose physical host combined with network functions virtualization (NFV) technology. The communication device can be a virtual host, a virtual router, or a virtual switch. Those skilled in the art can, by reading this application, virtualize the various communication devices with the functions described in the embodiments of this application on a general-purpose physical host using NFV technology.
[0212] In some possible implementations, any communication device proposed in the embodiments of this application can be a processor or a chip. The chip may include a processor and a power supply circuit, the power supply circuit being used to supply power to the processor. In specific embodiments, the processor or chip may correspond to any of the aforementioned communication devices, and the processor or chip is capable of performing the operations performed by any of the communication devices.
[0213] This application also provides a communication system 900 (or network system), such as Figure 9 As shown, the communication system includes one or more communication devices. These communication devices can be any combination of one or more of the flow control devices 600. The combination of one or more communication devices can jointly perform the functions described in this embodiment. Figure 3 The steps or operations in the proposed flow control method.
[0214] The memory of one or more communication devices in the communication system 900 may store the same instructions for executing the flow control method proposed in Embodiment 3 of this application. Alternatively, the memory of one or more communication devices in the communication system 900 may also store separate instructions for executing the methods in the embodiments of this application. Figure 3The proposed flow control method includes some instructions. In other words, a combination of one or more communication devices can jointly execute instructions for implementing the embodiments of this application. Figure 3 The instructions for the proposed flow control method.
[0215] In a specific embodiment, the memories in different communication devices within the communication system 900 can store different instructions. That is, the instructions stored in the memories of the communication devices can implement the functions of the aforementioned transceiver module 610 and processing module 620.
[0216] In some possible implementations, one or more communication devices in the communication system 900 can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc.
[0217] This application also provides another communication system (or network system), which includes one or more processors and one or more memories. The one or more memories store information for implementing the embodiments of this application. Figure 3 The proposed flow control method's instructions, which can be executed by one or more processors executing instructions from one or more memories, are applicable to the embodiments of this application. Figure 3 The proposed flow control method. For more information on the implementation details of the processor and memory, please refer to the preceding descriptions of the processor and memory.
[0218] This application also provides a chip, including a processing circuit and an interface circuit. The interface circuit is used for transmitting and receiving data, and the processing circuit is used for executing the above-described flow control method.
[0219] As one possible implementation, the chip also includes a storage circuit. The storage circuit, interface circuit, and processing circuit are connected via internal interconnection paths. The processing circuit is used to execute code in the storage circuit, and when the code is executed, the processing circuit is used to perform the aforementioned flow control method.
[0220] This application also provides a computer program product. The computer program product may be software or a program product containing instructions capable of running on a communication device or processor (e.g., running on one or more processors of the aforementioned flow control device 600, communication device 700, communication device 800, or communication system 900) or stored on any usable medium. The instructions included in the computer program product may include instructions for executing the embodiments of this application. Figure 3 The instructions for the steps or operations in the proposed flow control method. When the computer program product is run on a communication device or processor (e.g., on one or more processors of the aforementioned flow control device 600, communication device 700, communication device 800, or communication system 900), it implements the embodiments of this application. Figure 3 The steps or operations of the proposed flow control method.
[0221] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a communication device or processor to execute the embodiments of this application. Figure 3 The steps or operations of the proposed flow control method.
[0222] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD). The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.
[0224] The terms "first," "second," "third," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to limit a specific order.
[0225] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
Claims
1. A flow control method, characterized in that, Applied to a network system, the network system including a first communication device, a second communication device, and a third communication device, the method is executed by the first communication device, and the method includes: Receive the first stream, which is congested at the first communication device; In the event of congestion in the first communication device, the first stream receives a first notification message; the first notification message includes an identifier indicating the first virtual channel VL corresponding to the first stream; The first notification message is sent to the second communication device; the first notification message is used to instruct the second communication device to send a first credit message to the third communication device, the first credit message includes a credit reduction identifier, the credit reduction identifier is used to instruct the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL, and the reduced credit of the first VL is used to instruct the third network device to perform flow control.
2. The method according to claim 1, characterized in that, The first notification message also includes a backpressure duration, and the first credit message also includes the backpressure duration and the identifier of the first VL. The backpressure duration is used to indicate the duration for which the third communication device stops sending the stream corresponding to the first VL, and the stream corresponding to the first VL includes the first stream.
3. The method according to claim 1 or 2, characterized in that, The first notification message also includes a protocol identifier, which is used to indicate that the first notification message indicates that the flow corresponding to the first VL is causing congestion.
4. The method according to any one of claims 1-3, characterized in that, The first communication device and the second communication device are connected to each other via one or more other communication devices.
5. A flow control method, characterized in that, Applied to a network system, the network system including a first communication device, a second communication device, and a third communication device, the method is executed by the second communication device, and the method includes: The first notification message is received from the first communication device; the first notification message includes an identifier of the first VL indicating the first VL, and the first notification message is used to instruct the second communication device to send a first credit message to the third communication device. The first credit message is sent to the third communication device; the first credit message includes a credit reduction identifier, which is used to instruct the third communication device to reduce the credit of the first VL indicated by the identifier of the first VL.
6. The method according to claim 5, characterized in that, The first notification message also includes a backpressure duration, and the first credit message also includes the backpressure duration and an identifier of the first VL. The backpressure duration is used to instruct the third communication device to stop sending the stream corresponding to the first VL for a specified duration. Sending the first credit message to the third communication device includes: Before the back pressure end time of the flow corresponding to the first VL is reached, the first credit message is sent to the third communication device; the back pressure end time of the flow corresponding to the first VL is determined based on the back pressure duration.
7. The method according to claim 6, characterized in that, The second communication device includes a source suppression table, the source suppression table includes a first entry, the first entry corresponds to the identifier of the first VL, and the first entry includes the back pressure end time; Before the end time of the back pressure of the flow corresponding to the first VL, the sum of the time when the second communication device receives the first notification message and the back pressure duration is less than or equal to the end time of the back pressure.
8. The method according to claim 7, characterized in that, The method further includes: The credit of the first VL is not sent to the third communication device before the end of the back pressure of the flow corresponding to the first VL.
9. The method according to claim 8, characterized in that, The method further includes: The accumulated credit of the second communication device during the back pressure period is determined; the back pressure period includes the time from the start time of the back pressure to the end time, and the accumulated credit is the credit of the first VL that the second communication device did not send to the third communication device during the back pressure period; After the back pressure of the flow corresponding to the first VL ends, the accumulated credit is sent to the third communication device.
10. The method according to claim 8, characterized in that, The first entry also includes a credit mask; Before the end of the back pressure of the flow corresponding to the first VL, the credit of the first VL is not sent to the third communication device, including: Send the product of the local credit and the credit mask to the third communication device; The local credit is the credit of the first VL in the second communication device, and the credit mask is 0 before the end of the backpressure of the flow corresponding to the first VL.
11. The method according to claim 10, characterized in that, The step of sending the accumulated credit to the third communication device after reaching the end time of the back pressure of the flow corresponding to the first VL includes: The product of local credit and credit mask is sent to the third communication device; the local credit is the credit of the first VL in the second communication device, and the credit mask is 1 after the backpressure end time of the flow corresponding to the first VL.
12. A flow control method, characterized in that, Applied to a network system, the network system including a first communication device, a second communication device, and a third communication device, the method is executed by the third communication device, and the method includes: The third communication device receives a first credit message sent by the second communication device. The first credit message includes a credit reduction identifier and a first VL identifier. The credit reduction identifier is used to instruct the third communication device to reduce the credit of the first VL indicated by the first VL identifier. The credit of the first VL is reduced according to the credit reduction identifier.
13. A communication device, characterized in that, The communication device includes a processor and a memory; The processor is configured to execute instructions stored in the memory to cause the communication device to perform the method as described in any one of claims 1-12.
14. A network system, characterized in that, The network system includes a first communication device, a second communication device, and a third communication device; The first communication device is used to perform the method as described in any one of claims 1-4; The second communication device is used to perform the method as described in any one of claims 5-11; The third communication device is used to perform the method as described in claim 12.
15. A computer program product containing instructions, characterized in that, When the instruction is executed by the communication device, the communication device performs the method as described in any one of claims 1-12.
16. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a communication device, cause the communication device to perform the method as described in any one of claims 1-12.