Flow control method, apparatus and system

By encapsulating credit information in data packets during data center communications to indicate the data volume quota of the virtual channel, the problem of delay and bandwidth overhead caused by protocol segmentation between devices is solved, and flow control and communication performance are improved.

WO2024198573A1PCT designated stage expired Publication Date: 2024-10-03HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2023/141997
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-29
Filing Date
2023-12-26
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In data centers, communication delays between devices increase due to protocol segmentation. How to implement effective flow control to avoid buffer overflow at the receiving end and reduce bandwidth overhead.

Method used

By encapsulating credit information in data packets, it is used to indicate the data volume quota of the virtual channel and is carried in the link layer header or block header to achieve flow control, reduce bandwidth overhead and improve communication performance.

Benefits of technology

It achieves flow control on the receiving end, reduces bandwidth overhead, improves communication performance and effective bandwidth, and simplifies the length and transmission efficiency of credit information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023141997_03102024_PF_FP_ABST
    Figure CN2023141997_03102024_PF_FP_ABST
Patent Text Reader

Abstract

A flow control method, apparatus and system, which relate to the technical field of communications, and are used for reducing bandwidth overheads and improving effective bandwidth and communication performance while realizing flow control. The method comprises: a first node generating a data message, wherein the data message comprises credit information of a second node, the credit information is used for indicating the volume limit of data to be returned to a virtual channel of the second node, and the virtual channel is used for the second node to transmit data to the first node; the first node sending the data message to the second node; and when the second node receives the data message, parsing the data message to obtain the credit information of the second node, such that flow control over the second node is realized by means of the credit information.
Need to check novelty before this filing date? Find Prior Art

Description

Flow control method, device and system

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 29, 2023, with application number 202310356421.7 and application name “A flow control method, device and system”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a flow control method, device and system. Background Art

[0003] With increasing computing demands and the promotion of cloud services, the industry's demand for data centers is also increasing. Data center services pursue extreme performance requirements, with extremely low latency as a core requirement. However, currently, devices in data centers are segmented by various protocols. Communication between devices requires conversion between various protocols, which increases the data processing process and latency. Currently, a unified high-speed serial bus protocol can be used to enable communication between devices. This can break down the protocol barriers that separate devices from each other and eliminate unnecessary conversion overhead, allowing direct communication between the sender and receiver of services, thereby achieving the ultimate in latency.

[0004] High-speed serial bus protocols typically include multiple protocol layers, such as the physical layer, data link layer, network layer, transport layer, transaction layer, and functional layer. When implementing communication between devices using these high-speed serial bus protocols, implementing flow control on the sender side to prevent buffer overflow on the receiver side during data transmission is a pressing technical challenge.

[0005] Summary of the Invention

[0006] The present application provides a flow control method, device and system for reducing bandwidth overhead and improving effective bandwidth and communication performance while achieving flow control.

[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0008] In a first aspect, a flow control method is provided, which is applied to high-speed serial communication. The method includes: a first node generates a data message, and the data message includes credit information of a second node. For example, the first node encapsulates the credit information of the second node and the first data message at the link layer to obtain the data message (which may be called a second data message). The credit information is used to indicate the data volume limit of a virtual channel returned to the second node, and the virtual channel is used for the second node to transmit data to the first node; the first node sends the data message to the second node.

[0009] In the above technical solution, when the first node has data that needs to be sent to the second node, the first node can generate a data message and send it to the second node. The data message includes the credit information of the second node, and the credit information is used to indicate the amount of data returned to the virtual channel of the second node. In this way, the second node can obtain the credit information of the second node by parsing the data message, and send data to the first node according to the credit information, thereby realizing flow control of the first node. Compared with the related technology of sending letters of credit through control messages, this can reduce bandwidth overhead and improve effective bandwidth and communication performance.

[0010] In one possible implementation of the first aspect, the credit information includes a credit identifier and a virtual channel identifier, wherein the credit identifier is used to indicate the data volume quota at the target granularity, and the virtual channel identifier is used to indicate the returned virtual channel. Alternatively, the credit information includes the returned data volume quota and the virtual channel identifier. In the above possible implementation, the method of indicating the data volume quota at the target granularity using the credit identifier is simple and effective, and can reduce the length of the credit information, thereby reducing bandwidth usage.

[0011] In one possible implementation of the first aspect, the target granularity is determined by negotiation between the first node and the second node. In this possible implementation, the first node and the second node can determine the target granularity of the returned data quota through negotiation, thereby determining different target granularities under different transmission requirements, thereby improving the accuracy of the target granularity determination.

[0012] In one possible implementation of the first aspect, the data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node. Optionally, the credit information is carried in the link layer header information of the data message; or, the credit information is carried in the link layer block header information of the data message. In these possible implementations, by carrying the credit information in the link layer header information or link layer block header information of the data message, bandwidth overhead can be reduced, and effective bandwidth and communication performance can be improved.

[0013] In a possible implementation of the first aspect, the method further includes: the first node receives a first indication message sent from the second node, the first indication message is used to indicate a first candidate granularity of the amount of data returned supported by the second node; the first node sends a second indication message to the second node, the second indication message is used to indicate a second candidate granularity of the amount of data returned supported by the first node; the first node determines the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule. In the above possible implementation, the first node and the second node can determine the target granularity of the amount of data returned through negotiation, so as to determine different target granularities under different transmission requirements, thereby improving the accuracy of determining the target granularity.

[0014] In a possible implementation of the first aspect, the method further includes: the first node receives first indication information sent from the second node, the first indication information is used to indicate a first candidate granularity of the returned data volume quota supported by the second node; the first node sends third indication information to the second node based on the first candidate granularity and the second candidate granularity of the returned data volume quota supported by the first node, the third indication information is used to indicate the target granularity. In the above possible implementation, the first node and the second node can determine the target granularity of the returned data volume quota through negotiation, so as to determine different target granularities under different transmission requirements, thereby improving the accuracy of determining the target granularity.

[0015] In a possible implementation manner of the first aspect, the target granularity is a minimum value in an intersection of the first candidate granularity and the second candidate granularity.

[0016] In a possible implementation of the first aspect, the method further includes: the first node sending a control message to the second node, the control message carrying the credit information. In the above possible implementation, the first node may also send the credit information of the second node to the second node by sending the control message to the second node, thereby implementing flow control on the first node.

[0017] In one possible implementation of the first aspect, the control message is sent by the first node when no data message needs to be sent to the second node. In this possible implementation, when the first node does not have any data message to send to the second node, the first node may send the second node's credit information to the second node by sending a control message to the second node, thereby implementing flow control over the first node.

[0018] In a possible implementation of the first aspect, the control message is sent by the first node when it needs to send multiple data messages to the second node, and the multiple data messages cannot indicate the total data volume quota returned to the second node. In the above possible implementation, when the first node has multiple data messages that need to be sent to the second node, and the multiple data messages cannot indicate the total data volume quota returned to the second node, the first node can send the credit information of the second node to the second node by sending a control message to the second node, so as to achieve flow control of the first node while increasing the rate of returning the data volume quota to the second node, thereby improving the efficiency of flow control.

[0019] In a possible implementation of the first aspect, the method further includes: the first node suspending transmission of some of the multiple data packets. In the above possible implementation, when the multiple data packets of the first node fully occupy the bandwidth, the first node can backpressure the transmission of the data packets to force the transmission of a control packet to send credit information to the second node, thereby achieving flow control of the first node.

[0020] In one possible implementation of the first aspect, when the credit information is carried in a control message, the control message may carry multiple pieces of credit information, each with different virtual channel identifiers. In this possible implementation, the first node may send multiple pieces of credit information corresponding to different virtual channels to the second node via a control message, thereby achieving flow control for the first node while increasing the rate at which data quota is returned to the second node, thereby improving flow control efficiency.

[0021] In a second aspect, a flow control method is provided, which is applied to high-speed serial communication, and the method includes: a second node receives a data packet from a first node, and the data packet may be a second data packet; the second node parses the data packet to obtain credit information of the second node, for example, decapsulates the second data packet at the link layer to obtain credit information of the second node and the first data packet, and the credit information is used to indicate the data volume limit of a virtual channel returned to the second node, and the virtual channel is used for the second node to transmit data to the first node.

[0022] In the above technical solution, when the first node has data that needs to be sent to the second node, the first node can generate a data message including the credit information of the second node and send the data message to the second node. The credit information is used to indicate the amount of data returned to the virtual channel of the second node. In this way, the second node can obtain the credit information of the second node by parsing the data message, and send data to the first node according to the credit information, thereby realizing flow control of the first node. Compared with the related technology of sending letters of credit through control messages, this can reduce bandwidth overhead and improve effective bandwidth and communication performance.

[0023] In one possible implementation of the second aspect, the credit information includes a credit identifier and a virtual channel identifier, wherein the credit identifier is used to indicate the data volume quota at the target granularity, and the virtual channel identifier is used to indicate the returned virtual channel. Alternatively, the credit information includes the returned data volume quota and the virtual channel identifier. In the above possible implementation, the method of indicating the data volume quota at the target granularity using the credit identifier is simple and effective, and can reduce the length of the credit information, thereby reducing bandwidth usage.

[0024] In one possible implementation of the second aspect, the target granularity is determined by negotiation between the first node and the second node. In this possible implementation, the first node and the second node can determine the target granularity of the returned data quota through negotiation, thereby determining different target granularities under different transmission requirements, thereby improving the accuracy of the target granularity determination.

[0025] In one possible implementation of the second aspect, the data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node. Optionally, the credit information is carried in the link layer header information of the data message; or, the credit information is carried in the link layer block header information of the data message. In these possible implementations, by carrying the credit information in the link layer header information or link layer block header information of the data message, bandwidth overhead can be reduced, and effective bandwidth and communication performance can be improved.

[0026] In a possible implementation of the second aspect, the method further includes: the second node sends a first indication message to the first node, the first indication message is used to indicate a first candidate granularity of the amount of data returned supported by the second node; the second node receives a second indication message from the first node, the second indication message is used to indicate a second candidate granularity of the amount of data returned supported by the first node; the second node determines the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule. In the above possible implementation, the first node and the second node can determine the target granularity of the amount of data returned through negotiation, so as to determine different target granularities under different transmission requirements, thereby improving the accuracy of determining the target granularity.

[0027] In a possible implementation of the second aspect, the method further includes: the second node sends a first indication message to the first node, the first indication message is used to indicate a first candidate granularity of the amount of data returned supported by the second node; the second node receives a third indication message from the first node, the third indication message is used to indicate the target granularity, and the target granularity is determined by the first node based on the first candidate granularity and the second candidate granularity of the amount of data returned supported by the first node. In the above possible implementation, the first node and the second node can determine the target granularity of the amount of data returned through negotiation, so as to determine different target granularities under different transmission requirements, thereby improving the accuracy of determining the target granularity.

[0028] In a possible implementation manner of the second aspect, the target granularity is a minimum value in an intersection of the first candidate granularity and the second candidate granularity.

[0029] In a possible implementation of the second aspect, the method further includes: the second node receiving a control message from the first node, the control message carrying the credit information. In the above possible implementation, the first node may further send the credit information of the second node to the second node by sending a control message to the second node, thereby implementing flow control on the first node.

[0030] In one possible implementation of the second aspect, the control message is sent by the first node when there is no need to send the data message to the second node. In this possible implementation, when the first node does not have any data message to send to the second node, the first node may send the second node's credit information to the second node by sending a control message to the second node, thereby implementing flow control over the first node.

[0031] In a possible implementation of the second aspect, the control message is sent by the first node when it needs to send multiple data messages to the second node, and the multiple data messages cannot indicate the total data volume quota returned to the second node. In the above possible implementation, when the first node has multiple data messages that need to be sent to the second node, and the multiple data messages cannot indicate the total data volume quota returned to the second node, the first node can send the credit information of the second node to the second node by sending a control message to the second node, so as to achieve flow control of the first node while increasing the rate of returning the data volume quota to the second node, thereby improving the efficiency of flow control.

[0032] In one possible implementation of the second aspect, when the credit information is carried in a control message, the control message may carry multiple pieces of credit information, each with different virtual channel identifiers. In this possible implementation, the first node may send multiple pieces of credit information corresponding to different virtual channels to the second node via a control message, thereby achieving flow control for the first node while increasing the rate at which data quota is returned to the second node, thereby improving flow control efficiency.

[0033] In a third aspect, a flow control device is provided for use in high-speed serial communication, the device comprising: a processing unit for generating a data message, the data message comprising credit information of a second node, the credit information being used to indicate the amount of data returned to a virtual channel of the second node, the virtual channel being used for the second node to transmit data to the device; and a sending unit for sending the data message to the second node.

[0034] In a possible implementation manner of the third aspect, the credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate a data volume quota of a target granularity, and the virtual channel identifier is used to indicate the virtual channel.

[0035] In a possible implementation manner of the third aspect, the target granularity is determined by negotiation between the device and the second node.

[0036] In a possible implementation of the third aspect, the data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node. Optionally, the credit information is carried in link layer packet header information of the data message; or, the credit information is carried in link layer block header information of the data message.

[0037] In a possible implementation of the third aspect, the device also includes: a receiving unit; a receiving unit, used to receive a first indication message sent from the second node, the first indication message being used to indicate a first candidate granularity of the returned data volume supported by the second node; a sending unit, also used to send a second indication message to the second node, the second indication message being used to indicate a second candidate granularity of the returned data volume supported by the device; a processing unit, also used to determine the target granularity based on the first candidate granularity and the second candidate granularity according to preset rules.

[0038] In a possible implementation of the third aspect, the device also includes: a receiving unit; the receiving unit is used to receive a first indication message sent from the second node, the first indication message is used to indicate a first candidate granularity of the returned data amount supported by the second node; the sending unit is also used to send a third indication message to the second node based on the first candidate granularity and the second candidate granularity of the returned data amount supported by the device, the third indication message is used to indicate the target granularity.

[0039] In a possible implementation manner of the third aspect, the target granularity is a minimum value in an intersection of the first candidate granularity and the second candidate granularity.

[0040] In a possible implementation of the third aspect, the sending unit is further configured to: send a control message to the second node, the control message carrying the credit information. The control message is sent when no data message needs to be sent to the second node; or when multiple data messages need to be sent to the second node, and the multiple data messages cannot indicate a total data volume quota to be returned to the second node.

[0041] In a possible implementation manner of the third aspect, the processing unit is further configured to: suspend sending of some data packets among the multiple data packets.

[0042] In a possible implementation manner of the third aspect, when the credit information is carried in a control message, the control message carries multiple pieces of credit information, and the virtual channel identifiers in the multiple pieces of credit information are different.

[0043] In a fourth aspect, a flow control device is provided for use in high-speed serial communication, the device comprising: a receiving unit for receiving a data message from a first node; a processing unit for parsing the data message to obtain credit information of the device, the credit information being used to indicate the amount of data returned to a virtual channel of the second node, the virtual channel being used by the device to transmit data to the first node.

[0044] In a possible implementation manner of the fourth aspect, the credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate a data volume quota of a target granularity, and the virtual channel identifier is used to indicate the virtual channel.

[0045] In a possible implementation manner of the fourth aspect, the target granularity is determined by negotiation between the first node and the device.

[0046] In a possible implementation of the fourth aspect, the data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node. Optionally, the credit information is carried in link layer packet header information of the data message; or, the credit information is carried in link layer block header information of the data message.

[0047] In a possible implementation of the fourth aspect, the device also includes: a sending unit; the sending unit is used to send a first indication information to the first node, the first indication information is used to indicate a first candidate granularity of the returned data amount supported by the second node; the receiving unit is also used to receive a second indication information from the first node, the second indication information is used to indicate a second candidate granularity of the returned data amount supported by the first node; the processing unit is also used to determine the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule.

[0048] In a possible implementation of the fourth aspect, the device also includes: a sending unit; the sending unit is used to send first indication information to the first node, the first indication information is used to indicate a first candidate granularity of the returned data amount supported by the second node; the receiving unit is also used to receive third indication information from the first node, the third indication information is used to indicate the target granularity, and the target granularity is determined by the first node based on the first candidate granularity and the second candidate granularity of the returned data amount supported by the first node.

[0049] In a possible implementation manner of the fourth aspect, the target granularity is a minimum value in an intersection of the first candidate granularity and the second candidate granularity.

[0050] In a possible implementation of the fourth aspect, the receiving unit is also used to: receive a control message from the first node, which carries the credit information; wherein the control message is sent by the first node when there is no need to send the data message; or, the control message is sent by the first node when it needs to send multiple data messages and the multiple data messages cannot indicate the total amount of data to be returned.

[0051] In a possible implementation manner of the fourth aspect, when the credit information is carried in a control message, the control message carries multiple pieces of credit information, and the virtual channel identifiers in the multiple pieces of credit information are different.

[0052] In a fifth aspect, a flow control device is provided, which includes a processor and a memory, wherein instructions are stored in the memory. When the processor runs the instructions, the device executes the flow control method provided by the first aspect or any possible implementation of the first aspect.

[0053] In the sixth aspect, a flow control device is provided, which includes a processor and a memory, in which instructions are stored. When the processor runs the instructions, the device executes the flow control method provided by the second aspect or any possible implementation of the second aspect.

[0054] In another aspect of the present application, a communication system is provided, which includes a first node and a second node, the first node including the flow control device provided by the third aspect, any possible implementation of the third aspect, or the fifth aspect, and the second node including the fourth aspect, any possible implementation of the fourth aspect, or the flow control device provided by the sixth aspect.

[0055] In another aspect of the present application, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method provided by the first aspect or any possible implementation of the first aspect is implemented.

[0056] In another aspect of the present application, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method provided by the second aspect or any possible implementation of the second aspect is implemented.

[0057] In another aspect of the present application, a computer program product is provided, which includes a computer program (also referred to as code, or instructions). When the computer program is executed, it enables the computer to execute the method provided in the first aspect or any possible implementation of the first aspect.

[0058] In another aspect of the present application, a computer program product is provided, which includes a computer program (also referred to as code, or instructions). When the computer program is executed, it enables the computer to execute the method provided in the second aspect or any possible implementation of the second aspect.

[0059] It can be understood that the devices, electronic devices, computer-readable storage media and computer program products of any of the flow control methods provided above all contain the content of the flow control method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the flow control method provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] FIG1 is a schematic diagram of the structure of a communication system provided in an embodiment of the present application;

[0061] FIG2 is a schematic diagram of a flow control method according to an embodiment of the present application;

[0062] FIG3 is a flow chart of a flow control method provided in an embodiment of the present application;

[0063] FIG4 is a flow chart of another flow control method provided in an embodiment of the present application;

[0064] FIG5 is a schematic diagram of the structure of a control message provided in an embodiment of the present application;

[0065] FIG6 is a schematic structural diagram of a first node provided in an embodiment of the present application;

[0066] FIG7 is a schematic structural diagram of another first node provided in an embodiment of the present application;

[0067] FIG8 is a schematic structural diagram of a second node provided in an embodiment of the present application;

[0068] FIG9 is a schematic structural diagram of another second node provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c or a, b and c, where a, b and c can be single or multiple.

[0070] The embodiments of the present application use words such as "first" and "second" to distinguish objects with similar names, functions or effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order. In addition, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.

[0071] The technical solution provided in this application can be applied to a communication system, which can be a chip-level system, that is, a communication system integrated on a chip. The communication system may include multiple nodes, and the multiple nodes can communicate with each other through a bus, and the communication can be implemented using a high-speed serial bus transmission protocol. Optionally, the communication system may include a data center, high-performance computing, or cloud computing system. The nodes in the communication system may also be referred to as endpoints (EP). In practical applications, the multiple nodes may include, but are not limited to, processing devices, storage devices, and input / output devices.

[0072] Exemplarily, as shown in FIG1 , the communication system includes a plurality of nodes, and the plurality of nodes are connected by a bus. Different nodes in the plurality of nodes can communicate with each other, for example, data can be transmitted between any two nodes in the plurality of nodes, for example, using high-speed serial transmission to transmit data. Each of the plurality of nodes may include one or more processors, or one or more memories. In one example, the processor may include: a central processing unit (CPU), a graphics processing unit (GPU), a network processing unit (GPU), and other processing units (X processing unit, XPU), etc. In another example, the memory may include internal memory (which may be referred to as memory) and external memory (storage). Optionally, the internal memory may include dynamic random access memory (DRAM); the external memory may include a disk, a hard disk, a floppy disk, or an optical disk, etc.

[0073] In an embodiment of the present application, a unified high-speed serial bus protocol can be used to implement communication between the various devices in the above-mentioned communication system. This can break down the protocol barriers in the prior art and remove unnecessary conversion overhead in the middle, so that nodes in the communication system can communicate directly with each other, thereby achieving extreme latency. Optionally, the unified high-speed serial bus protocol can include the Peripheral Component Interconnect Express (PCIe) protocol, the Compute Express Link (CXL) protocol, or the Ethernet bus protocol.

[0074] The following is an introduction to the unified high-speed serial bus protocol. The unified high-speed serial bus protocol is a serializer / deserializer (SerDes) interface protocol that can be applied to chips. It can be used to implement peripheral expansion, processor direct connection, heterogeneous direct connection, network connection, and memory expansion in communication systems. A unified high-speed serial bus protocol can be used to build a unified protocol network for each device in the communication system. This allows the same address encoding and access timing to be used in different communication scenarios, thereby achieving flexible access in different communication scenarios without the need for complex protocol processing.

[0075] Among them, the unified high-speed serial bus protocol may include multiple protocol layers, for example, the multiple protocol layers may include a physical (PHY) layer, a link layer, a network layer, a transport layer, a transaction layer, and a function layer. Among them, the physical layer is used to define the rules for physical connections in each scenario. The link layer, also known as the data link layer (DL), is used to define the protocol point-to-point transmission method. The network layer is used to describe the network composition method. The transport layer is used to define the network transmission method. The transaction layer is used to define transmission commands and consistency protocols. The function layer is used to provide data processing capabilities. The layers of the above protocols can be flexibly configured, and each scenario and application can select the required protocol layer according to actual conditions.

[0076] When implementing communication between devices based on the above-mentioned unified bus protocol, during the data transmission at the link layer, in order to ensure that the cache of the receiving end of the service (i.e., the node receiving data) does not overflow, it is necessary to perform flow control on the sending end (i.e., the node sending data), such as using a flow control mechanism to control the packet sending rate of the sending end, i.e., the rate at which data packets are sent.

[0077] For example, Figure 2 illustrates a credit-based flow control mechanism. Figure 2 uses the example of the transmitter's link layer being DL0 and the receiver's link layer being DL1, with both DL0 and DL1 including a link layer transmit channel DL TX and a link layer receive channel DL RX. Specifically, during initialization, the receiver can allocate credit to the transmitter, for example, by sending an Initialize Flow Control (InitFC) message. Once sufficient credit is available, the transmitter can send a data packet to the receiver via DL0's DL TX. The receiver can receive the data packet via DL1's DL RX and store it in a buffer (BUF). The receiver can also return the credit to the transmitter via DL1's DL TX, for example, by sending an Update Flow Control (UpdataFC) message. The transmitter can receive the credit via DL0's DL RX, which can be used to control the transmitter's packet transmission rate.

[0078] In related technologies, the receiver typically returns a letter of credit to the sender via a link layer control message. However, this method incurs significant bandwidth overhead, impacting the effective bandwidth of communication between the sender and receiver, and thus affecting communication performance.

[0079] Based on this, an embodiment of the present application provides a flow control method that can encapsulate credit information such as letters of credit in business messages at the link layer and send them, so that business data and credit information can be sent simultaneously through business messages. Compared with the related art of sending letters of credit through control messages, this method can reduce bandwidth overhead and thus improve effective bandwidth and communication performance. The technical solution provided by the embodiment of the present application is described below.

[0080] Figure 3 is a flow chart of a flow control method provided in an embodiment of the present application. The method can be applied to a communication system including a first node and a second node. The communication system can be the communication system provided above. The method can include the following steps.

[0081] S201: The first node generates a data message, where the data message includes credit information of the second node.

[0082] Among them, the first node can serve as the above-mentioned receiving end, and the second node can serve as the above-mentioned sending end. In the process of the second node transmitting data to the first node, the first node can perform flow control on the second node by allocating credits. Optionally, the first node can allocate an initial data volume quota for the virtual channel of the second node during the initialization phase, and the second node can use the initial data volume quota (or referred to as consuming the initial data volume quota) to transmit data to the first node through the virtual channel. After receiving the data, the first node can return the corresponding data volume quota to the second node based on the usage of the cache used to store the data. In the embodiment of the present application, the data volume quota returned by the first node to the second node may refer to the data volume quota returned to the second node after the second node consumes the initial data volume quota.

[0083] The data volume quota of the virtual channel returned by the first node to the second node may also be referred to as the data volume quota of the virtual channel reallocated by the first node to the second node. The data volume quota may also be referred to as a credit line, specifically the amount of data allowed to be sent.

[0084] In one possible embodiment, the data message may be referred to as a second data message. Generating the second data message by the first node may specifically include: the first node encapsulating the second node's credit information and the first data message at the link layer to obtain the second data message. The aforementioned data message may be referred to as a service message, i.e., a message used by the first node to transmit data to the second node. Accordingly, the first data message may also be referred to as a first service message, and the second data message may also be referred to as a second service message.

[0085] The link layer may refer to a link layer corresponding to a unified serial bus protocol when the first node and the second node communicate using the unified serial bus protocol. The first data packet may be a data packet that the first node needs to send to the second node, and the first data packet may be output by an upper protocol layer of the link layer. For example, if the unified serial bus protocol is the PCIe protocol, the link layer may be a link layer corresponding to the PCIe protocol, and the first data packet may be a data packet output by a network layer corresponding to the PCIe protocol.

[0086] Optionally, the data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node. For example, taking the data message as the second data message as an example, the credit information of the second node may be carried in the link layer header information of the second data message; alternatively, the credit information of the second node may be carried in the link layer block header information of the second data message.

[0087] Among them, the link layer can support the transmission of data messages transmitted by the upper layer to the other end with data packets as the granularity. The minimum transmission unit of the link layer can be a flit, and 1 flit can be 20 bytes. The maximum length of the data packet transmitted by the link layer can be 512 flits. When the length of the data packet is greater than 32 flits, the data packet can be divided into multiple blocks for segmented transmission. The length of each block can be 32 flits, and the last block can be used to transmit the remaining flits. The above-mentioned link layer header can refer to the header of the data packet transmitted by the link layer, and the link layer block header can refer to the block header of the block transmitted by the link layer.

[0088] Optionally, the credit information may include a first field, and the first field may be used to indicate the amount of data to be returned. In one possible example, the first field may be used to indicate a specific amount of data, for example, the first field is a plurality of bits, and the plurality of bits are used to represent the specific amount of data. In another possible example, the first field is a credit identifier, and the credit identifier may be used to indicate the amount of data of the target granularity. Exemplarily, the credit identifier may be 1 bit, and when the value of the 1 bit is 1, it may be used to indicate the amount of data of the target granularity to be returned, and when the value of the 1 bit is 0, it may be used to indicate that no credit is returned. Exemplarily, the target granularity may be 128, 64, 32, 16, 8, 4, 2 or 1 cell, and the amount of data represented by 1 cell may be fixed, and the embodiments of the present application do not specifically limit this.

[0089] In addition, the credit information also includes a second field, which can be used to indicate the above-mentioned virtual channel. For example, the second field is a virtual channel identifier (for example, the virtual channel identifier can be a virtual channel number), and the virtual channel identifier is used to indicate the virtual channel corresponding to the credit identifier. The physical channel between the first node and the second node may include multiple virtual channels. For example, a physical channel includes 16 virtual channels. The second node can send data to the first node through at least one virtual channel among the multiple virtual channels, so that the first node can return the credit corresponding to any virtual channel in the at least one channel through the data message.

[0090] For example, as shown in Table 1 below, the 0th byte of the link layer packet header or the link layer block header may include 8 bits, wherein the 7th bit may be the credit identifier CRD, the 2nd to 5th bits may be the virtual channel identifier CRD_VL[3:0] corresponding to the credit identifier, and the other bits may be used for the transmission of other information. The embodiment of the present application does not provide any relevant description of the other bits.

[0091] Table 1

[0092] It will be understood that the credit information shown in Table 1 above is merely exemplary and does not constitute a limitation to the embodiments of the present application.

[0093] Furthermore, when the credit identifier can be used to indicate a data volume quota of a target granularity, the target granularity can be determined by negotiation between the first node and the second node. That is, as shown in FIG4 , the method can further include: S200. The first node and the second node negotiate to determine the target granularity.

[0094] In a possible embodiment, the negotiation process between the first node and the second node may include: the second node sends a first indication message to the first node, and the first indication message is used to indicate a first candidate granularity of the returned data volume quota supported by the second node; the first node sends a second indication message to the second node, and the second indication message is used to indicate a second candidate granularity of the returned data volume quota supported by the first node; after receiving the first indication message, the first node can determine the target granularity based on the first candidate granularity and the second candidate granularity according to preset rules; after receiving the second indication message, the second node can also determine the target granularity based on the first candidate granularity and the second candidate granularity according to preset rules.

[0095] The preset rule may be pre-set. For example, the preset rule may be to use the minimum, second-smallest, maximum, or second-largest value of the intersection of the first candidate granularity and the second candidate granularity as the target granularity. In practical applications, the preset rule only needs to ensure that the target granularity determined by the first node and the second node is consistent. The embodiments of this application do not limit the details of the preset rule.

[0096] In another possible embodiment, the negotiation process between the first node and the second node may include: the second node sends a first indication message to the first node, and the first indication message is used to indicate a first candidate granularity of the returned data amount supported by the second node; the first node sends a third indication message to the second node based on the first candidate granularity and the second candidate granularity of the returned data amount supported by the first node, and the third indication message is used to indicate the target granularity.

[0097] Alternatively, the negotiation process between the first node and the second node may include: the first node sends a second indication message to the second node, the second indication message being used to indicate a second candidate granularity of the amount of returned data supported by the first node; the second node sends a fourth indication message to the first node based on the second candidate granularity and the first candidate granularity of the amount of returned data supported by the second node, the fourth indication message being used to indicate the target granularity.

[0098] Optionally, in the above-mentioned embodiments, the first candidate granularity and / or the second candidate granularity may specifically include at least one of the following granularities: 128, 64, 32, 16, 8, 4, 2, or 1 cell. In addition, the transmission of information during the above-mentioned negotiation process may be implemented via control messages.

[0099] S202: The first node sends the data message to the second node.

[0100] S203: The second node receives the data message from the first node.

[0101] It can be understood that the specific description of the data message in S202-S203 is consistent with the description of the data message in the above S201. Please refer to the relevant description in the above S201 for details, and the embodiment of the present application will not be repeated here.

[0102] In one possible embodiment, after the first node encapsulates the credit information of the second node and the first data message at the link layer to obtain the second data message, the link layer of the first node can transmit the second data message to the physical layer. In this way, the first node can send the second data message to the second node via the physical layer, thereby returning the target granularity of data volume quota to the second node via the second data message, or returning the target granularity of credit to the second node. When the first node sends the second data message to the second node via the physical layer, the second node can receive the second data message from the first node via the physical layer.

[0103] S204: The second node parses the data message to obtain the credit information of the second node.

[0104] When the second node receives the data message, the second node may parse the message header of the data message to obtain the credit information of the second node.

[0105] In one possible embodiment, if the data message is a second data message, when the second node receives the second data message via the physical layer, the physical layer may transmit the second data message to the link layer, so that the link layer of the second node can receive the second data message. The second node may decapsulate the second data message at the link layer to obtain the second node's credit information and the first data message. The second node may then send data to the first node based on the credit information to implement flow control over the first node.

[0106] Optionally, the second node may obtain the credit information of the second node by parsing the link layer header information of the second data message. Alternatively, the second node may obtain the credit information of the second node by parsing the link layer block header information of the second data message.

[0107] Furthermore, as shown in FIG4 , the method further includes: S205 - S206 .

[0108] S205: The first node sends a control message to the second node, where the control message carries the credit information.

[0109] In one possible embodiment, the control message is sent by the first node when it does not need to send a data message to the second node. That is, when the first node does not have any data message to send to the second node, the first node can send the second node's credit information to the second node by sending a control message to the second node.

[0110] In another possible embodiment, the control message is sent by the first node when the first node needs to send multiple data messages to the second node, and the multiple data messages cannot indicate the total amount of data to be returned to the second node. In other words, when the first node has multiple data messages to send to the second node, and the multiple data messages cannot indicate the total amount of data to be returned to the second node, the first node can send the second node's credit information to the second node by sending a control message to the second node.

[0111] The bandwidth occupied by transmitting the multiple data packets can be equal to the effective bandwidth for communication between the first node and the second node. Specifically, when the multiple data packets from the first node fully utilize the bandwidth, and the sum of the data volume quotas indicated by the multiple data packets is less than the total data volume quota returned to the second node, the first node can send the second node's credit information via a control message. The sum of the data volume quotas indicated by the multiple data packets can be determined by multiplying the data volume quota indicated by each data packet by the number of the multiple data packets.

[0112] Optionally, the first node may also send the second node's credit information to the second node via a control message when determining that the total amount of data returned to the second node is greater than a preset amount. The preset amount may be set in advance, for example, the preset amount may be equal to the sum of the amount of data indicated by the multiple data messages.

[0113] Furthermore, when multiple data packets from a first node fill up the bandwidth and the first node sends the second node's credit information to the second node via a control message, the first node can also suspend the transmission of some of the multiple data packets. In other words, the first node can backpressure the transmission of data packets to force the transmission of control messages to send credit information to the second node.

[0114] Furthermore, when the credit information of the second node is carried in the control message, the number of credit information carried in the control message may be multiple, and the virtual channel identifiers in the multiple credit information are different, that is, the multiple credit information may correspond to different virtual channels.

[0115] In one possible example, the control message can carry credit information for 16 virtual channels, as shown in Figure 5. Assume that the control message includes 20 bytes, represented by bytes 0 to 10. Bytes 0 to 2 are fixed values; bit 7 of the 3rd byte is the initialization credit send completion flag (send done, SD), and bit 0 is the type; byte 4 is ACK_NUM, which indicates the amount of cache address space released; bytes 5 to 17 are used to represent the credit information CRD_NUM of the 16 virtual channels, and are represented in the figure as CRD_NUM[95:80], CRD_NUM[79:48], CRD_NUM[47:16], and CRD_NUM[15:0]; bytes 18 to 19 are used to represent the link layer cyclic redundancy check (LCRC), which can be used to verify bytes 0 to 17.

[0116] S206: The second node receives a control message from the first node, where the control message carries the credit information.

[0117] When the first node has no data packets to send to the second node and sends the second node's credit information to the second node via a control message, the second node can receive the control message. In this way, the second node can send data to the first node based on the credit information carried in the control message, thereby implementing flow control on the first node.

[0118] In an embodiment of the present application, when a first node has data that needs to be sent to a second node, the first node can generate a data message and send it to the second node. The data message includes the credit information of the second node, and the credit information is used to indicate the data volume quota of the virtual channel returned to the second node. In this way, the second node can obtain the credit information of the second node by parsing the data message, and send data to the first node based on the credit information, thereby achieving flow control of the first node. Compared with the related art of sending letters of credit through control messages, this can reduce bandwidth overhead and improve effective bandwidth and communication performance. Further, when the first node needs to send multiple data messages to the second node, and the multiple data messages cannot indicate the total data volume quota returned to the second node, the first node can send the data volume quota to the second node through a control message, thereby achieving flow control of the first node while increasing the rate of returning the data volume quota to the second node, thereby improving the efficiency of flow control.

[0119] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the interaction between the first node and the second node. It is understandable that, in order to realize the above functions, the first node and the second node include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0120] In the embodiment of the present application, the first node and the second node can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above functional modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module according to the corresponding function:

[0121] In the case of adopting an integrated unit, Figure 6 shows a possible structural diagram of the flow control device involved in the above embodiment. The device can be a first node, or a chip built into the first node, and the device includes: a processing unit 301 and a sending unit 302. In a possible embodiment, the processing unit 301 can be used to support the device to perform one or more steps of S201 in the above method embodiment, or to suspend the transmission of some data packets among multiple data packets; the sending unit 302 can be used to support the device to perform at least one step of S202 or S205 in the above method embodiment, or to support the device to perform the step of sending indication information in the negotiation process in the above method embodiment. Further, the device also includes a receiving unit 303; wherein the receiving unit 303 can be used to support the device to perform the step of receiving data sent by the second node in the above method embodiment, or to support the device to perform the step of receiving indication information in the negotiation process in the above method embodiment.

[0122] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0123] Based on hardware implementation, the processing unit 301 may be a processor, the sending unit 302 may be a transmitter, the receiving unit 303 may be a receiver, the receiver and the transmitter may be integrated into a transceiver, which may also be called a communication interface.

[0124] Figure 7 is a possible structural diagram of the flow control device involved in the embodiment of the present application. The flow control device can be a first node, or a chip built into the first node. The device includes: a memory 311 and a processor 312. Among them, the memory 311 is used to store the program code and data of the device, and the processor 312 is used to control the actions of the first node in the above-mentioned method embodiment. For example, the processor 312 is used to support the device to execute S201 of the above-mentioned method embodiment, suspend the sending of some data messages in multiple data messages, and / or other processes for the technology described in this article. Optionally, the device may also include a communication interface 313, and the communication interface 313 is used to support the device to execute the steps of communicating with the second node in the above-mentioned method embodiment.

[0125] The processor 312 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a processing chip, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It may implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of this application. The processor 312 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 313 may be a transceiver, a transceiver circuit, or a transceiver interface, and the like. The memory 311 may be a volatile memory or a non-volatile memory, and the like.

[0126] For example, communication interface 313, processor 312, and memory 311 are interconnected via bus 314; bus 314 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus 314 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figure shows only one thick line, but this does not indicate that there is only one bus or only one type of bus.

[0127] Optionally, the memory 311 may be included in the processor 312 .

[0128] In the case of adopting an integrated unit, Figure 8 shows a possible structural diagram of the flow control device involved in the above embodiment. The device can be a second node, or a chip built into the second node, and the device includes: a receiving unit 401 and a processing unit 402. In a possible embodiment, the receiving unit 401 is used to support the device to perform one or more steps S203 or S206 in the above method embodiment, or to support the device to perform the step of receiving indication information in the negotiation process in the above method embodiment; the processing unit 402 can be used to support the device to perform S204 in the above method embodiment. Further, the device also includes a sending unit 403; wherein the sending unit 403 is used to support the device to perform the step of sending data to the first node in the above method embodiment, or to support the device to perform the step of sending indication information in the negotiation process in the above method embodiment.

[0129] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0130] Based on hardware implementation, the processing unit 402 may be a processor, the receiving unit 401 may be a receiver, the sending unit 403 may be a transmitter, the receiver and the transmitter may be integrated into a transceiver, which may also be called a communication interface.

[0131] Figure 9 is a possible structural diagram of a flow control device involved in an embodiment of the present application, which can be a second node. The device includes: a memory 411 and a processor 412. Among them, the memory 411 is used to store the program code and data of the device, and the processor 412 is used to control the actions of the second node in the above method embodiment. For example, the processor 412 is used to execute S204 in the above method embodiment, and / or other processes for the technology described herein. Optionally, the device may also include a communication interface 413, which is used to support the device in executing the steps of communicating with the first node in the above method embodiment.

[0132] The processor 412 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a processing chip, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It may implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of this application. The processor 412 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like. The communication interface 413 may be a transceiver, a transceiver circuit, or a transceiver interface. The memory 411 may be a volatile memory or a non-volatile memory.

[0133] For example, communication interface 413, processor 412, and memory 411 are interconnected via bus 414; bus 414 may be a PCI bus or an EISA bus, for example. Bus 414 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figure shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0134] Optionally, the memory 411 may be included in the processor 412 .

[0135] In another aspect of the present application, a communication system is provided, comprising any of the first nodes provided above and any of the second nodes provided above. The first node is configured to execute the steps of the first node in the flow control method provided in the above method embodiment; and the second node is configured to execute the steps of the second node in the flow control method provided in the above method embodiment.

[0136] In the method provided in the embodiment of the present application, it can be implemented in whole or in part by software, hardware or a combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server or a data center to another website, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, twisted pair) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any medium that a computer can access or a data storage device such as a server or a data center that includes one or more media integrations. The medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., an optical disk) or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0137] In another aspect of the present application, a computer-readable storage medium is provided, which includes computer instructions. When the computer instructions are executed by a device, the device executes the steps of the first node in the traffic control method provided in the above method embodiment.

[0138] In another aspect of the present application, a computer-readable storage medium is provided, which includes computer instructions. When the computer instructions are executed by a device, the device executes the steps of the second node in the traffic control method provided in the above method embodiment.

[0139] In another aspect of the present application, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the first node in the traffic control method provided in the above method embodiment.

[0140] In another aspect of the present application, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the second node in the flow control provided in the above method embodiment.

[0141] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A flow control method, applied to high-speed serial communication, characterized in that: The method comprises: The first node generates a data message, wherein the data message includes credit information of the second node, and the credit information is used to indicate a data volume quota of a virtual channel returned to the second node, and the virtual channel is used by the second node to transmit data to the first node; The first node sends the data message to the second node.

2. The method according to claim 1, characterized in that The credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate a data volume quota of a target granularity, and the virtual channel identifier is used to indicate the virtual channel.

3. The method according to claim 2, characterized in that The target granularity is determined by negotiation between the first node and the second node.

4. The method according to any one of claims 1 to 3, characterized in that: The data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node.

5. The method according to claim 3 or 4, characterized in that: The method further comprises: The first node receives first indication information sent by the second node, where the first indication information is used to indicate a first candidate granularity of a returned data volume quota supported by the second node; The first node sends second indication information to the second node, where the second indication information is used to indicate a second candidate granularity of the returned data amount quota supported by the first node; The first node determines the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule.

6. The method according to claim 3 or 4, characterized in that: The method further comprises: The first node receives first indication information sent from the second node, where the first indication information is used to indicate a first candidate granularity of a returned data volume quota supported by the second node; The first node sends third indication information to the second node based on the first candidate granularity and a second candidate granularity of the returned data volume quota supported by the first node, where the third indication information is used to indicate the target granularity.

7. The method according to claim 5 or 6, characterized in that: The target granularity is a minimum value in the intersection of the first candidate granularity and the second candidate granularity.

8. A flow control method, applied in high-speed serial communication, characterized in that: The method comprises: The second node receives the data message from the first node; The second node parses the data message to obtain credit information of the second node, where the credit information is used to indicate a data volume quota of a virtual channel returned to the second node, and the virtual channel is used by the second node to transmit data to the first node.

9. The method according to claim 8, characterized in that The credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate a data volume quota of a target granularity, and the virtual channel identifier is used to indicate the virtual channel.

10. The method according to claim 9, characterized in that The target granularity is determined by negotiation between the first node and the second node.

11. The method according to any one of claims 8 to 10, characterized in that: The data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node.

12. The method according to claim 10 or 11, characterized in that: The method further comprises: The second node sends first indication information to the first node, where the first indication information is used to indicate a first candidate granularity of a returned data volume quota supported by the second node; The second node receives second indication information from the first node, where the second indication information is used to indicate a second candidate granularity of the returned data amount quota supported by the first node; The second node determines the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule.

13. The method according to claim 10 or 11, characterized in that: The method further comprises: The second node sends first indication information to the first node, where the first indication information is used to indicate a first candidate granularity of a returned data volume quota supported by the second node; The second node receives third indication information from the first node, where the third indication information is used to indicate the target granularity, and the target granularity is determined by the first node based on the first candidate granularity and a second candidate granularity of the returned data volume quota supported by the first node.

14. The method according to claim 12 or 13, characterized in that The target granularity is a minimum value in the intersection of the first candidate granularity and the second candidate granularity.

15. A flow control device, used in high-speed serial communication, characterized in that: The device comprises: a processing unit, configured to generate a data message, wherein the data message includes credit information of the second node, wherein the credit information is used to indicate a data volume quota of a virtual channel returned to the second node, wherein the virtual channel is used by the second node to transmit data to the device; A sending unit is used to send the data message to the second node.

16. The device according to claim 15, characterized in that The credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate a data volume quota of a target granularity, and the virtual channel identifier is used to indicate the virtual channel.

17. The device according to claim 16, characterized in that The target granularity is determined by negotiation between the device and the second node.

18. The device according to any one of claims 15 to 17, characterized in that: The data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the second node.

19. The device according to claim 17 or 18, characterized in that The device further comprises: a receiving unit; The receiving unit is used to receive first indication information sent from the second node, where the first indication information is used to indicate a first candidate granularity of a returned data volume quota supported by the second node; The sending unit is further used to send second indication information to the second node, where the second indication information is used to indicate a second candidate granularity of the returned data amount quota supported by the device; The processing unit is further configured to determine the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule.

20. The device according to claim 17 or 18, characterized in that The device further comprises: a receiving unit; The receiving unit is used to receive first indication information sent from the second node, where the first indication information is used to indicate a first candidate granularity of a returned data volume quota supported by the second node; The sending unit is further used to send third indication information to the second node according to the first candidate granularity and a second candidate granularity of the returned data amount quota supported by the device, wherein the third indication information is used to indicate the target granularity.

21. The device according to claim 19 or 20, characterized in that The target granularity is a minimum value in the intersection of the first candidate granularity and the second candidate granularity.

22. A flow control device, used in high-speed serial communication, characterized in that: The device comprises: A receiving unit, configured to receive a data message from the first node; A processing unit is used to parse the data message to obtain credit information of the device, wherein the credit information is used to indicate a data volume quota of a virtual channel returned to the device, and the virtual channel is used by the device to transmit data to the first node.

23. The device according to claim 22, characterized in that The credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate a data volume quota of a target granularity, and the virtual channel identifier is used to indicate the virtual channel.

24. The device according to claim 23, characterized in that The target granularity is determined by negotiation between the first node and the device.

25. The device according to any one of claims 22 to 24, characterized in that The data message includes a message header and a payload, the credit information is located in the message header, and the payload is data transmitted to the device.

26. The device according to claim 24 or 25, characterized in that The device further comprises: a sending unit; The sending unit is used to send first indication information to the first node, where the first indication information is used to indicate a first candidate granularity of a returned data amount quota supported by the device; The receiving unit is further used to receive second indication information from the first node, where the second indication information is used to indicate a second candidate granularity of the returned data volume quota supported by the first node; The processing unit is further configured to determine the target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule.

27. The device according to claim 24 or 25, characterized in that The device further comprises: a sending unit; The sending unit is used to send first indication information to the first node, where the first indication information is used to indicate a first candidate granularity of a returned data amount quota supported by the device; The receiving unit is further configured to receive third indication information from the first node, wherein the third indication information is used to indicate the target granularity, and the target granularity is the amount of data returned by the first node according to the first candidate granularity and the amount of data returned supported by the first node. The second candidate granularity of the degree is determined.

28. The device according to claim 26 or 27, characterized in that The target granularity is a minimum value in the intersection of the first candidate granularity and the second candidate granularity.

29. A flow control device, characterized in that: The flow control device comprises a processor and a memory, wherein instructions are stored in the memory, and when the processor runs the instructions, the device executes the flow control method according to any one of claims 1 to 7.

30. A flow control device, characterized in that: The information transmission device includes a processor and a memory, wherein instructions are stored in the memory. When the processor runs the instructions, the device executes the flow control method as described in any one of claims 8 to 14.

31. A communication system, characterized in that: The communication system comprises a first node and a second node, the first node comprises the flow control device according to any one of claims 15 to 21 or claim 29, and the second node comprises the flow control device according to any one of claims 22 to 28 or claim 30.

32. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a device, the device executes the flow control method according to any one of claims 1 to 7.

33. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed by a device, the device executes the flow control method according to any one of claims 8 to 14.

Citation Information

Patent Citations

  • Flow control method, device and system

    CN118740735A

  • A method and system for adaptive on-demand resource allocation in a virtualized environment

    CN102279771A

  • Traffic management method and system and woven network processor

    CN109787910A

  • Data receiving and sending method, device and system

    CN111416775A

  • Circuit and method for credit-based flow control

    US20180013689A1

Cited By

  • Flow control method and device, electronic equipment and computer program product

    CN119629117A