Flow control method, device and system
By encapsulating credit information into data packets in the communication between devices in the data center, the flow control of the sending end is achieved, which solves the delay problem caused by protocol segmentation between devices in the data center and improves communication performance and bandwidth utilization. .
Patent Information
- Application Number
- CN202310356421.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-01
AI Technical Summary
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 is an urgent problem that needs to be solved.
By encapsulating credit information in data packets, it is used to indicate the amount of virtual channel data returned to the node, thereby achieving flow control on the sender, reducing bandwidth overhead and improving communication performance. The credit information can be carried in the link layer header or block header of the data packet, and the target granularity can be determined through negotiation to improve accuracy, and flow control can be performed through control packets when needed.
It effectively reduces bandwidth overhead, improves communication performance, ensures the stability of the receiving end cache, and improves data transmission efficiency.
Smart Images

Figure CN118740735A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a flow control method, device and system. Background Art
[0002] With the increase in computing demand 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 the core demand. However, the various devices currently used in data centers are divided by various protocols, and the communication between devices needs to be converted through various protocols, which increases the data processing process and latency. At present, a unified high-speed serial bus protocol can be used to achieve communication between devices. The use of a unified high-speed serial bus protocol can break the protocol barriers of different devices using different protocols to communicate, and remove unnecessary conversion overhead in the middle, so that the sender and receiver of the service can communicate directly, thereby achieving the ultimate latency.
[0003] The above-mentioned high-speed serial bus protocol usually includes multiple protocol layers, for example, the multiple protocol layers may include a physical layer, a data link layer, a network layer, a transport layer, a transaction layer and a functional layer. When the above-mentioned high-speed serial bus protocol is used to realize communication between various devices, how to realize flow control at the sending end and ensure that the buffer at the receiving end does not overflow during the data transmission process is a technical problem that needs to be solved urgently. Summary of the invention
[0004] 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.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a flow control method is provided, which is applied to high-speed serial communication, the method comprising: a first node generates a data message, the data message comprising 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 a link layer to obtain the data message (which may be referred to as a second data message), the credit information being used to indicate a data volume amount of a virtual channel returned to the second node, the virtual channel being used for the second node to transmit data to the first node; the first node sends the data message to the second node.
[0007] 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.
[0008] In a possible implementation of the first aspect, the credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate the data volume quota of 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 of the target granularity through the credit identifier is simple and effective, and can reduce the length of the credit information, thereby reducing bandwidth occupancy.
[0009] In a possible implementation of the first aspect, the target granularity is determined by negotiation between the first node and the second node. 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.
[0010] In a 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 the above possible implementations, by carrying the credit information in the link layer header information or the link layer block header information of the data message, the bandwidth overhead can be reduced and the effective bandwidth and communication performance can be improved.
[0011] 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.
[0012] 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 amount of data returned 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 amount of data returned 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 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.
[0013] 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.
[0014] In a possible implementation of the first aspect, the method further includes: the first node sends a control message to the second node, the control message carrying the credit information. In the above possible implementation, the first node can also send the credit information of the second node to the second node by sending a control message to the second node, so as to implement flow control on the first node.
[0015] In a possible implementation of the first aspect, the control message is sent by the first node when there is no need to send a data message to the second node. In the above possible implementation, when the first node does not have a data message that needs to be sent 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 implement flow control of the first node.
[0016] In a possible implementation of the first aspect, the control message is sent by the first node when it is necessary to send multiple data messages to the second node, and the multiple data messages cannot indicate the total amount of data 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 amount of data 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 increase the rate of returning the data amount to the second node while realizing flow control of the first node, thereby improving the efficiency of flow control.
[0017] In a possible implementation of the first aspect, the method further includes: the first node suspends the sending of some of the multiple data packets. In the above possible implementation, when the multiple data packets of the first node occupy the bandwidth, the first node can back pressure the sending of the data packets to force the sending of the control message to send credit information for the second node, thereby realizing the flow control of the first node.
[0018] In a possible implementation of the first aspect, when the credit information is carried in a control message, the number of the credit information carried by the control message is multiple, and the virtual channel identifiers in the multiple credit information are different. In the above possible implementation, the first node can send multiple credit information corresponding to different virtual channels to the second node through a control message, thereby achieving flow control on 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 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, the second data packet is decapsulated 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 a data volume quota 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.
[0020] 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.
[0021] In a possible implementation of the second aspect, the credit information includes a credit identifier and a virtual channel identifier, the credit identifier is used to indicate the data volume quota of 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 of the target granularity through the credit identifier is simple and effective, and can reduce the length of the credit information, thereby reducing bandwidth occupancy.
[0022] In a possible implementation of the second aspect, the target granularity is determined by negotiation between the first node and the second node. 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.
[0023] In a 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 the above possible implementations, by carrying the credit information in the link layer header information or the link layer block header information of the data message, the bandwidth overhead can be reduced and the effective bandwidth and communication performance can be improved.
[0024] 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.
[0025] 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, 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.
[0026] 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.
[0027] In a possible implementation of the second aspect, the method further includes: the second node receives a control message from the first 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 a control message to the second node, so as to implement flow control on the first node.
[0028] In a 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 the above possible implementation, when the first node does not have a data message that needs to be sent 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 implement flow control on the first node.
[0029] In a possible implementation of the second aspect, the control message is sent by the first node when it is necessary to send multiple data messages to the second node, and the multiple data messages cannot indicate the total amount of data 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 amount of data 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 increase the rate of returning the data amount to the second node while realizing flow control of the first node, thereby improving the efficiency of flow control.
[0030] In a possible implementation of the second aspect, when the credit information is carried in a control message, the number of the credit information carried by the control message is multiple, and the virtual channel identifiers in the multiple credit information are different. In the above possible implementation, the first node can send multiple credit information corresponding to different virtual channels to the second node through a control message, thereby achieving flow control on the first node while increasing the rate of returning the data volume quota to the second node, thereby improving the efficiency of flow control.
[0031] 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 an 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.
[0032] 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.
[0033] In a possible implementation manner of the third aspect, the target granularity is determined by negotiation between the device and the second node.
[0034] 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 header information of the data message; or, the credit information is carried in link layer block header information of the data message.
[0035] 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 a second node, the first indication message being used to indicate a first candidate granularity of a data volume return amount 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 a data volume return amount supported by the device; a processing unit, also used to determine a target granularity based on the first candidate granularity and the second candidate granularity according to a preset rule.
[0036] In a possible implementation of the third aspect, the device also includes: a receiving unit; a receiving unit, used to receive first indication information sent from the second node, the first indication information is used to indicate a first candidate granularity of the returned data amount supported by the second node; a sending unit, also used to send third indication information 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 information is used to indicate the target granularity.
[0037] 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.
[0038] In a possible implementation of the third aspect, the sending unit is further used to: send a control message to the second node, the control message carrying the credit information. The control message is sent when it is not necessary to send a data message to the second node; or the control message is sent when it is necessary to send multiple data messages to the second node and the multiple data messages cannot indicate a total amount of data returned to the second node.
[0039] In a possible implementation manner of the third aspect, the processing unit is further used to: suspend sending of some data packets among the multiple data packets.
[0040] 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.
[0041] 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 an amount of data returned to a virtual channel of a second node, the virtual channel being used by the device to transmit data to the first node.
[0042] 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.
[0043] In a possible implementation manner of the fourth aspect, the target granularity is determined by negotiation between the first node and the device.
[0044] 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 header information of the data message; or, the credit information is carried in link layer block header information of the data message.
[0045] 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 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.
[0046] 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.
[0047] 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.
[0048] In a possible implementation of the fourth aspect, the receiving unit is also used to: receive a control message from the first node, the control message carrying 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 is necessary to send multiple data messages and the multiple data messages cannot indicate the total amount of data to be returned.
[0049] 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.
[0050] In a fifth aspect, a flow control device is provided, which includes 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 provided by the first aspect or any possible implementation of the first aspect.
[0051] In a sixth aspect, a flow control device is provided, which includes a processor and a memory, wherein the memory stores instructions. 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.
[0052] In another aspect of the present application, a communication system is provided, which includes a first node and a second node, the first node includes the flow control device provided by the third aspect, any possible implementation of the third aspect, or the fifth aspect, and the second node includes the fourth aspect, any possible implementation of the fourth aspect, or the flow control device provided by the sixth aspect.
[0053] 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 manner of the first aspect is implemented.
[0054] 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 manner of the second aspect is implemented.
[0055] 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), and when the computer program is executed, the computer executes the method provided in the first aspect or any possible implementation of the first aspect.
[0056] 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, the computer executes the method provided in the second aspect or any possible implementation of the second aspect.
[0057] It can be understood that the device, electronic device, computer-readable storage medium and computer program product of any of the flow control methods provided above all include 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
[0058] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0059] Figure 2 A schematic diagram of flow control provided in an embodiment of the present application;
[0060] Figure 3 A flow chart of a flow control method provided in an embodiment of the present application;
[0061] Figure 4 A flow chart of another flow control method provided in an embodiment of the present application;
[0062] Figure 5 A schematic diagram of the structure of a control message provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of the structure of a first node provided in an embodiment of the present application;
[0064] Figure 7 A schematic diagram of the structure of another first node provided in an embodiment of the present application;
[0065] Figure 8 A schematic diagram of the structure of a second node provided in an embodiment of the present application;
[0066] Fig. 9 A schematic diagram of the structure of another second node provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying 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: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after 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 items 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.
[0068] 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 as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0069] The technical solution provided in the present application can be applied to a communication system, which can be a chip-level system, that is, a communication system integrated on a chip. Among them, 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 systems such as data centers, high-performance computing or cloud computing. 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 and output devices.
[0070] For example, Figure 1As shown, 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, data is transmitted using high-speed serial transmission. Among them, each of the plurality of nodes may include one or more processors, or include 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 an internal memory (which may be referred to as memory) and an external memory (storage). Optionally, the internal memory may include a dynamic random access memory (DRAM); the external memory may include a disk, a hard disk, a floppy disk, or an optical disk, etc.
[0071] In an embodiment of the present application, a unified high-speed serial bus protocol can be used to implement communication between the devices in the above communication system, which can break the protocol barriers in the prior art and remove unnecessary conversion overhead in the middle, so that the nodes of the communication system can communicate directly with each other, thereby achieving the ultimate delay. Optionally, the unified high-speed serial bus protocol may include a peripheral component interconnect express (PCIe) protocol, a compute express link (CXL) protocol, or an Ethernet bus protocol.
[0072] The following is an introduction to the unified high-speed serial bus protocol. Among them, the unified high-speed serial bus protocol is a serializer / deserializer (SerDes) interface protocol that can be applied to chips, which can be used to implement peripheral expansion, processor direct connection, heterogeneous direct connection, network connection and memory expansion of communication systems. Through the unified high-speed serial bus protocol, a network with a unified protocol can be built for each device in the communication system, so that the same address encoding and access timing can be used in different communication scenarios, thereby achieving flexible access in different communication scenarios without the need for complex protocol processing.
[0073] 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 (link) layer, a network (network) layer, a transport (transport) layer, a transaction (transaction) layer and a function (function) layer. Among them, the physical layer is used to define the rules for physical connections in each scenario. The link layer can also be called the data link layer (data link, DL), which 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.
[0074] When implementing communication between devices based on the above-mentioned unified bus protocol, in the process of 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, that is, the rate at which data packets are sent.
[0075] For example, Figure 2 A flow control mechanism based on a credit letter is shown. Figure 2 In the example, the link layer of the transmitter is DL0, the link layer of the receiver is DL1, and both DL0 and DL1 include a link layer transmission channel DL TX and a link layer reception channel DL RX. Specifically, during initialization, the receiver can allocate a credit to the transmitter, for example, by using an initialize flow control (InitFC) message to allocate a credit to the transmitter; after having enough credits, the transmitter can send a data packet to the receiver through DL TX of DL0; the receiver can receive the data packet through DL RX of DL1 and store the data packet in a buffer (buffer, BUF); the receiver can also return a credit to the transmitter through DL TX of DL1, for example, by using an update flow control (updataFC) message to return a credit to the transmitter; the transmitter can receive the credit through DL RX of DL0, and the credit can be used to control the packet sending rate of the transmitter.
[0076] In the related art, the receiving end usually returns the letter of credit to the sending end through the control message of the link layer. However, returning the letter of credit to the sending end through the control message will bring a large bandwidth overhead, thereby affecting the effective bandwidth of the communication between the sending end and the receiving end, and further affecting the communication performance.
[0077] Based on this, the embodiment of the present application provides a flow control method, which can encapsulate credit information such as letters of credit in a business message at the link layer and send it, so as to realize the simultaneous sending of business data and credit information through the business message, thereby reducing bandwidth overhead compared with sending letters of credit through control messages in the related art, thereby improving effective bandwidth and communication performance. The technical solution provided by the embodiment of the present application is introduced and explained below.
[0078] Figure 3 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, and the method can include the following steps.
[0079] S201: The first node generates a data message, where the data message includes credit information of the second node.
[0080] Among them, the first node can be used as the above-mentioned receiving end, and the second node can be used as the above-mentioned sending end. In the process of the second node transmitting data to the first node, the first node can use the method of allocating credits to perform flow control on the second node. 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.
[0081] 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 quota, which specifically refers to the data volume of data allowed to be sent.
[0082] In a possible embodiment, the data message may be referred to as a second data message, and the first node generating the second data message may specifically include: 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 above data message may be referred to as a service message, that is, a message used by the first node to transmit data to the second node. Correspondingly, 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.
[0083] 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 a unified serial bus protocol. The first data message may be a data message that the first node needs to send to the second node, and the first data message may be output by an upper protocol layer of the link layer. For example, the unified serial bus protocol is a PCIe protocol, the link layer may be a link layer corresponding to the PCIe protocol, and the first data message may be a data message output by a network layer corresponding to the PCIe protocol.
[0084] 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. Exemplarily, taking the data message as the second data message as an example, the credit information of the second node can be carried in the link layer header information of the second data message; or, the credit information of the second node can be carried in the link layer block header information of the second data message.
[0085] 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 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.
[0086] Optionally, the credit information may include a first field, and the first field may be used to indicate the amount of data 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 specific amount of data is represented by the plurality of bits. In another possible example, the first field is a credit identifier, and the credit identifier may be used to indicate the amount of data at 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 at the target granularity 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.
[0087] In addition, the credit information also includes a second field, and the second field 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. Among them, 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 of the multiple virtual channels, so that the first node can return the credit corresponding to any one virtual channel of the at least one channel through the data message.
[0088] Exemplarily, 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 a credit identifier CRD, the 2nd to 5th bits may be a 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.
[0089] Table 1
[0090]
[0091] It is understandable that the credit information shown in the above Table 1 is only exemplary, and the above Table 1 does not constitute a limitation to the embodiments of the present application.
[0092] Further, when the credit identifier can be used to indicate the data volume quota of the target granularity, the target granularity can be determined by the first node and the second node through negotiation. Figure 4 As shown, the method may further include: S200. The first node and the second node negotiate to determine a target granularity.
[0093] 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, the first indication message is used to indicate a first candidate granularity of the returned data volume amount 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 returned data volume amount 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.
[0094] The above-mentioned preset rule may be set in advance, for example, the preset rule may be: taking the minimum value, the second minimum value, the maximum value, or the second maximum value in 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, and the embodiment of the present application does not limit the details of the preset rule.
[0095] 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, 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, the third indication message is used to indicate the target granularity.
[0096] Alternatively, the negotiation process between the first node and the second node may include: the first node sends second indication information to the second node, the second indication information is used to indicate a second candidate granularity of the returned data amount supported by the first node; the second node sends fourth indication information to the first node based on the second candidate granularity and the first candidate granularity of the returned data amount supported by the second node, the fourth indication information is used to indicate the target granularity.
[0097] 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 in the above-mentioned negotiation process may be implemented through control messages.
[0098] S202: The first node sends the data message to the second node.
[0099] S203: The second node receives the data message from the first node.
[0100] 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.
[0101] In a 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, so that the first node can send the second data message to the second node through the physical layer, so as to return the data volume quota of the target granularity to the second node through the second data message, or return the credit of the target granularity to the second node. When the first node sends the second data message to the second node through the physical layer, the second node can receive the second data message from the first node through the physical layer.
[0102] S204: The second node parses the data message to obtain the credit information of the second node.
[0103] 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.
[0104] In a possible embodiment, if the data message is a second data message, when the second node receives the second data message through the physical layer, the physical layer can 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 can decapsulate the second data message at the link layer to obtain the credit information of the second node and the first data message. Afterwards, the second node can send data to the first node according to the credit information to implement flow control of the first node.
[0105] 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.
[0106] Further, such as Figure 4 As shown, the method also includes: S205-S206.
[0107] S205: The first node sends a control message to the second node, where the control message carries the credit information.
[0108] In a possible embodiment, the control message is sent by the first node when there is no need to send a data message to the second node. That is, when the first node does not have a data message that needs to be sent 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.
[0109] In another possible embodiment, 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 amount of data returned to the second node. That is, 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 amount of data 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.
[0110] The bandwidth occupied by transmitting the multiple data messages may be equal to the effective bandwidth of the communication between the first node and the second node. That is, when the multiple data messages of the first node occupy the full bandwidth, and the sum of the data amount quotas that the multiple data messages can indicate is less than the total data amount quota returned to the second node, the first node may send the credit information of the second node to the second node through a control message. The sum of the data amount quotas that the above multiple data messages can indicate can be determined based on the product of the data amount quota indicated by each data message and the number of the multiple data messages.
[0111] Optionally, the first node may also send the credit information of the second node to the second node through 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 that can be indicated by the above-mentioned multiple data messages.
[0112] In addition, when multiple data messages of the first node occupy the bandwidth, and the first node sends the credit information of the second node to the second node through a control message, the first node can also suspend the sending of some data messages in the multiple data messages. That is, the first node can backpressure the sending of data messages to force the sending of control messages to send credit information for the second node.
[0113] Further, 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.
[0114] In a possible example, the control message may carry credit information of 16 virtual channels, such as Figure 5As shown, it is assumed that the control message includes 20 bytes, and they are represented as bytes 0 to 10. Among them, bytes 0 to 2 are fixed values; the 7th bit of the 3rd byte is the initialization credit send completion flag (send done, SD), and the 0th bit is the type (type); the 4th byte is ACK_NUM, which is used to indicate the number of cache address space releases; bytes 5 to 17 are used to represent the credit information CRD_NUM of 16 virtual channels, and are represented as CRD_NUM[95:80], CRD_NUM[79:48], CRD_NUM[47:16] and CRD_NUM[15:0] in the figure; bytes 18 to 19 are used to represent the link layer cyclic redundancy check code (link cyclic redundancy check, LCRC), which can be used to check bytes 0 to 17.
[0115] S206: The second node receives a control message from the first node, where the control message carries the credit information.
[0116] When the first node does not have a data message to be sent to the second node, and sends the credit information of the second node to the second node through a control message, the second node can receive the control message. In this way, the second node can send data to the first node according to the credit information carried in the control message to achieve flow control of the first node.
[0117] In an embodiment of the present application, 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 data volume quota of the virtual channel returned to the second node, so that 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 the flow control of the first node, so as to reduce the bandwidth overhead and improve the effective bandwidth and communication performance compared with sending the letter of credit through the control message in the related art. 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 the control message, thereby realizing the 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.
[0118] 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 the first node and the second node include hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. It should be easily appreciated by those skilled in the art 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 the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0119] The embodiment of the present application can divide the functional modules of the first node and the second node 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 functional 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:
[0120] In the case of an integrated unit, Figure 6 A possible structural schematic diagram of the flow control device involved in the above embodiment is shown. 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 execute one or more steps of S201 in the above method embodiment, or to suspend the sending of some data packets in multiple data packets; the sending unit 302 can be used to support the device to execute at least one step of S202 or S205 in the above method embodiment, or to support the device to execute 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 execute the step of receiving data sent by the second node in the above method embodiment, or to support the device to execute the step of receiving indication information in the negotiation process in the above method embodiment.
[0121] 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.
[0122] Based on the 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, and the transceiver may also be called a communication interface.
[0123] Figure 7 This is a possible structural diagram of a flow control device involved in an 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 method embodiment. For example, the processor 312 is used to support the device to execute S201 of the above 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 method embodiment.
[0124] Among them, the processor 312 can be a central processing unit, a general 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 can implement or execute various logic boxes, modules and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor 312 can also be a combination that implements a computing function, 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 can be a transceiver, a transceiver circuit or a transceiver interface, and the like. The memory 311 can be a volatile memory or a non-volatile memory, and the like.
[0125] For example, the communication interface 313, the processor 312, and the memory 311 are interconnected via a bus 314; the bus 314 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 314 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0126] Optionally, the memory 311 may be included in the processor 312 .
[0127] In the case of an integrated unit, Figure 8A possible structural schematic diagram of the flow control device involved in the above embodiment is shown. 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 execute one or more steps of S203 or S206 in the above method embodiment, or to support the device to execute 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 execute 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 execute the step of sending data to the first node in the above method embodiment, or to support the device to execute the step of sending indication information in the negotiation process in the above method embodiment.
[0128] 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.
[0129] Based on the 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, and the transceiver may also be called a communication interface.
[0130] Fig. 9 This is a possible structural diagram of a flow control device involved in an embodiment of the present application, and the device 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 to execute the steps of communicating with the first node in the above method embodiment.
[0131] Among them, the processor 412 can be a central processing unit, a general 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 can implement or execute various logic boxes, modules and circuits described in conjunction with the disclosure of the embodiments of the present application. The processor 412 can also be a combination that implements a computing function, 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 can be a transceiver, a transceiver circuit or a transceiver interface, and the like. The memory 411 can be a volatile memory or a non-volatile memory, and the like.
[0132] For example, the communication interface 413, the processor 412 and the memory 411 are connected to each other via a bus 414; the bus 414 may be a PCI bus or an EISA bus, etc. The bus 414 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0133] Optionally, the memory 411 may be included in the processor 412 .
[0134] In another aspect of the present application, a communication system is further provided, the communication system comprising any of the first nodes provided above and any of the second nodes provided above. The first node is used to execute the steps of the first node in the flow control method provided in the above method embodiment; the second node is used to execute the steps of the second node in the flow control method provided in the above method embodiment.
[0135] 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 implemented using software, 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 the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, 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 to another website site, computer, server or data center. The computer-readable storage medium may 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 may 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)), etc.
[0136] 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.
[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 second node in the traffic control method provided in the above method embodiment.
[0138] 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 flow 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 second node in the traffic control provided in the above method embodiment.
[0140] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A 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 also used to receive third indication information from the first node, and the third indication information is used to indicate the target granularity. The target granularity is determined by the first node based on the first candidate granularity and the second candidate granularity of the returned data volume quota supported by the first node.
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
Cited By
Data transmission method, device and equipment of network-on-chip, and storage medium
CN120804026A
Flow control method, apparatus and system
EP4672708A1
Flow control method, apparatus and system
WO2024198573A1
