Congestion control method and apparatus, chip, storage medium and program product

By sending a start indication message and allocating a token value to the receiving device before the data stream is transmitted between RDMA network cards, the congestion problem between RDMA network cards is solved, and preventive control of congestion is achieved. This avoids overflow of the switch's receiving queue and improves the effectiveness of congestion control.

CN121077988BActive Publication Date: 2026-02-03SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511623526.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-02-03
Estimated Expiration
2045-11-07

AI Technical Summary

Technical Problem

In existing technologies, data flow transmission between RDMA network cards is prone to various types of congestion, especially congestion at the ingress and egress ends. Furthermore, congestion control through DCQCN can only be adjusted after congestion occurs, resulting in long convergence times and an inability to effectively handle situations with multiple transmitting devices, leading to continuous overflow and packet loss in the switch's receiving queue.

Method used

Before the data stream is sent, the sending device sends a start indication message to the receiving device, switching it to the ingress congestion state. The receiving device then allocates a token value for bandwidth control. The sending device clears any remaining token values ​​and sends messages based on the allocated token values ​​to prevent congestion from occurring.

Benefits of technology

It effectively solves the congestion problem caused by multiple sending devices sending data streams to a single receiving device, avoids continuous overflow of the switch's receiving queue, and improves the effectiveness of congestion control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121077988B_ABST
    Figure CN121077988B_ABST
Patent Text Reader

Abstract

The application relates to a congestion control method, device, chip, storage medium and program product. The method comprises the following steps: receiving start indication information of a first data stream sent by a first sending end device; in response to the start indication information, switching a state of the first data stream recorded by a receiving end device into an entry congestion state, obtaining a first token value of the first data stream in the entry congestion state; generating first response information, and sending the first response information to the first sending end device, wherein the response information comprises entry congestion state information of the first data stream and the first token value allocated to the first data stream, so that the first sending end device switches a state of the first data stream recorded by the first sending end device into the entry congestion state, clears a residual token value corresponding to the first data stream, and performs packet sending according to the first token value allocated to the first data stream. The method can improve the congestion control effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chip technology, and in particular to a congestion control method, apparatus, chip, storage medium, and program product. Background Technology

[0002] In data center systems with Remote Direct Memory Access (RDMA), data streams can be transmitted between various RDMA network cards via switches. However, in real-world scenarios, various types of congestion can occur during data stream transmission between different RDMA network cards.

[0003] In related technologies, congestion control can be achieved through Data Center Quantized Congestion Notification (DCQCN). When a switch detects congestion, it sends a quantized congestion notification message and an explicit congestion flag to the sending device of the data stream. Upon receiving the quantized congestion notification and the explicit congestion flag, the sending end actively reduces its transmission rate, thereby preventing congestion from spreading and ensuring low latency and high reliability of RDMA transmission.

[0004] However, congestion control via DCQCN requires adjusting the transmission rate only after congestion occurs, and the convergence time for congestion control is relatively long. Furthermore, when there are many sending devices, it can cause instantaneous overload of the switch, but the transmission time of congestion notification messages cannot be accelerated accordingly, resulting in continuous overflow and packet loss in the switch's receiving queue. Therefore, the congestion control effect of DCQCN in related technologies is unsatisfactory. Summary of the Invention

[0005] Therefore, it is necessary to provide a congestion control method, device, chip, storage medium, and program product that can improve the congestion control effect in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides a congestion control method applied to a receiving device, the method comprising:

[0007] Receive the start indication information of the first data stream sent by the first sending device;

[0008] In response to the start indication information, the state of the first data stream recorded by the receiving device is switched to the ingress congestion state, and the first token value of the first data stream in the ingress congestion state is obtained.

[0009] A first response message is generated and sent to the first sending device. The response message includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream. This enables the first sending device to switch the status of the first data stream recorded by the first sending device to the ingress congestion status, clear the residual token value corresponding to the first data stream, and send a message according to the first token value allocated to the first data stream.

[0010] In one embodiment, the method further includes:

[0011] When the state of the first data stream recorded by the receiving device is outgoing congestion, the packet bandwidth of the first data stream received by the current receiving port is obtained, wherein the current receiving port is the port that receives the first data stream.

[0012] Based on the packet bandwidth of the first data stream received by the current receiving port, determine the second token value allocated to the first data stream after adjustment;

[0013] A second response message is generated and sent to the first sending device. The second response message includes the outgoing congestion status information of the first data stream and the second token value allocated to the first data stream. This enables the first sending device to switch the status of the first data stream recorded by the first sending device to the outgoing congestion status, clear the residual token value corresponding to the first data stream, and send a message according to the second token value allocated to the first data stream.

[0014] In one embodiment, the method further includes: allocating a corresponding token to a first token bucket corresponding to the first data stream according to the token value allocated to the first data stream; when the current receiving port receives a packet from the first data stream, subtracting the corresponding token from the first token bucket corresponding to the first data stream; and filling the first token bucket corresponding to the first data stream with the token allocated to the first token value of the first data stream.

[0015] If the number of tokens in the first token bucket corresponding to the first data stream is greater than the first threshold, the current state of the first data stream is switched to the outgoing congestion state.

[0016] If the number of tokens in the first token bucket corresponding to the first data stream is less than the second threshold, the first data stream is switched from its current state to the ingress congestion state.

[0017] In one embodiment, the method further includes:

[0018] When the state of the second data stream recorded by the receiving device is outgoing congestion, the packet bandwidth of the second data stream received by the current receiving port is obtained, wherein the current receiving port is the port that receives the first data stream, and the second data stream is any online stream of the current receiving port other than the first data stream;

[0019] Based on the packet bandwidth of the second data stream received by the current receiving port, determine the third token value allocated to the second data stream after adjustment;

[0020] A third response message is generated and sent to the second sending device corresponding to the second data stream. The third response message includes the outgoing congestion status information of the second data stream and the third token value allocated to the second data stream. This enables the second sending device to switch the status of the second data stream recorded by the second sending device to the outgoing congestion status, clear the residual token value corresponding to the second data stream, and send a message according to the third token value allocated to the second data stream.

[0021] In one embodiment, the method further includes:

[0022] The token is allocated to the first token bucket corresponding to the second data stream according to the token value allocated to the second data stream. When the current receiving port receives a message from the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the second data stream.

[0023] If the number of tokens in the first token bucket corresponding to the second data stream is greater than the first threshold, the current state of the second data stream corresponding to the second data stream is switched to the outgoing congestion state.

[0024] If the number of tokens in the first token bucket corresponding to the second data stream is less than the second threshold, the second data stream will be switched from its current state to the ingress congestion state.

[0025] In one embodiment, after receiving the start indication information of the first data stream sent by the first transmitting device, the method further includes:

[0026] Receive the stop indication information of the first data stream sent by the first sending device;

[0027] In response to the stop indication information, the state of the first data stream recorded by the receiving device is switched to the off state;

[0028] In the closed state, token values ​​are no longer allocated to the first data stream.

[0029] In one embodiment, the start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in a remote direct access content message.

[0030] In one embodiment, the method further includes:

[0031] Obtain network congestion indication information from the switch and / or network interface card (NIC) data reception capability information from the receiving device;

[0032] The first token value is adjusted based on the network congestion indication information and / or the network interface card (NIC) data reception capability information.

[0033] Secondly, this application provides a congestion control method applied to a transmitting device, the method comprising:

[0034] Send the start indication information of the first data stream to the receiving device;

[0035] Receive and parse the first response information sent by the receiving device to obtain the ingress congestion status information of the first data stream and the first token value of the first data stream in the ingress congestion status.

[0036] The status of the first data stream recorded in the first sending device is updated to the ingress congestion status, the residual token value corresponding to the first data stream in the first sending device is cleared, and the message is sent according to the first token value allocated to the first data stream.

[0037] In one embodiment, the method further includes:

[0038] The receiving end device receives and parses the second response information sent by the receiving end device to obtain the outgoing end congestion status information of the first data stream and the second token value allocated to the first data stream. The second token value corresponds to the bandwidth of the packet of the first data stream received by the current receiving port of the receiving end device.

[0039] Messages are sent based on the second token value allocated to the first data stream.

[0040] In one embodiment, after receiving and parsing the second response information sent by the receiving device, the method may further include:

[0041] If the residual token value corresponding to the first sending device is less than the third threshold, the start indication information of the first data stream is resent to the receiving device.

[0042] In one embodiment, the method further includes:

[0043] The receiving device is sent a stop indication message for the first data stream, the stop indication message being used to indicate that the state of the first data stream recorded by the receiving device be switched to a closed state.

[0044] In one embodiment, the start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in a remote direct access content message.

[0045] Thirdly, this application provides a congestion control device applied to a receiving end device, the device comprising:

[0046] The first receiving module is used to receive the start indication information of the first data stream sent by the first sending device;

[0047] The first processing module is configured to, in response to the start indication information, switch the state of the first data stream recorded by the receiving device to the ingress congestion state, obtain the first token value of the first data stream in the ingress congestion state, and generate the first response information;

[0048] The first sending module is used to send the first response information to the first sending end device, wherein the response information includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream, so that the first sending end device switches the status of the first data stream recorded by the first sending end device to the ingress congestion status, clears the residual token value corresponding to the first data stream, and sends a message according to the first token value allocated to the first data stream.

[0049] In one embodiment, the first processing module is further configured to: obtain the packet bandwidth of the first data stream received by the current receiving port when the state of the first data stream recorded by the receiving device is an outgoing congestion state; determine the second token value allocated to the first data stream after adjustment based on the packet bandwidth of the first data stream received by the current receiving port; and generate second response information.

[0050] The first sending module is further configured to send the second response information to the first sending end device, wherein the second response information includes the outgoing congestion status information of the first data stream and the second token value allocated to the first data stream, so that the first sending end device switches the status of the first data stream recorded by the first sending end device to the outgoing congestion status, clears the residual token value corresponding to the first data stream, and sends a message according to the second token value allocated to the first data stream.

[0051] In one embodiment, the first processing module is further configured to allocate a corresponding token to the first token bucket corresponding to the first data stream according to the token value allocated to the first data stream; when the current receiving port receives a packet of the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the first data stream; if the number of tokens in the first token bucket corresponding to the first data stream is greater than a first threshold, the current state of the first data stream is switched to the outgoing congestion state; if the number of tokens in the first token bucket corresponding to the first data stream is less than a second threshold, the current state of the first data stream is switched to the incoming congestion state.

[0052] In one embodiment, the first processing module is further configured to: obtain the packet bandwidth of the second data stream received by the current receiving port when the state of the second data stream recorded by the receiving device is an outgoing congestion state; wherein the current receiving port is the port that receives the first data stream, and the second data stream is any online stream of the current receiving port other than the first data stream; determine the third token value allocated to the second data stream after adjustment based on the packet bandwidth of the second data stream received by the current receiving port; and generate third response information.

[0053] The first sending module is further configured to send the third response information to the second sending end device corresponding to the second data stream, wherein the third response information includes the outgoing congestion status information of the second data stream and the third token value allocated to the second data stream, so that the second sending end device switches the status of the second data stream recorded by the second sending end device to the outgoing congestion status, clears the residual token value corresponding to the second data stream, and sends a message according to the third token value allocated to the second data stream.

[0054] In one embodiment, the first processing module is further configured to allocate a corresponding token to the first token bucket corresponding to the second data stream according to the token value allocated to the second data stream; when the current receiving port receives a packet from the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the second data stream; if the number of tokens in the first token bucket corresponding to the second data stream is greater than a first threshold, the current state of the second data stream is switched to the outgoing congestion state; if the number of tokens in the first token bucket corresponding to the second data stream is less than a second threshold, the current state of the second data stream is switched to the incoming congestion state.

[0055] In one embodiment, the first receiving module is further configured to receive stop indication information of the first data stream sent by the first sending device;

[0056] The first processing module is further configured to, in response to the stop indication information, switch the state of the first data stream recorded by the receiving device to a closed state; and in the closed state, stop allocating token values ​​to the first data stream.

[0057] In one embodiment, the start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in a remote direct access content message.

[0058] In one embodiment, the first processing module is further configured to acquire network congestion indication information of the switch and / or network interface card (NIC) data receiving capability information of the receiving device; and adjust the first token value according to the network congestion indication information and / or the NIC data receiving capability information.

[0059] Fourthly, this application provides a congestion control device applied to a transmitting end device, the device comprising:

[0060] The second sending module is used to send the start indication information of the first data stream to the receiving device;

[0061] The second receiving module is used to receive and parse the first response information sent by the receiving device to obtain the ingress congestion status information of the first data stream and the first token value of the first data stream in the ingress congestion status.

[0062] The second processing module is used to update the status of the first data stream recorded by the first sending device to the ingress congestion status, clear the residual token value corresponding to the first data stream in the first sending device, and send a message according to the first token value allocated to the first data stream.

[0063] In one embodiment, the second receiving module is further configured to receive and parse the second response information sent by the receiving device to obtain the outgoing congestion status information of the first data stream and the second token value allocated to the first data stream, wherein the second token value corresponds to the bandwidth of the packet of the first data stream received by the current receiving port of the receiving device;

[0064] The second processing module is further configured to send a message based on the second token value allocated to the first data stream.

[0065] In one embodiment, the second sending module is further configured to resend the start indication information of the first data stream to the receiving device when the residual token value corresponding to the first sending device is less than a third threshold.

[0066] In one embodiment, the second sending module is further configured to send a stop indication message for the first data stream to the receiving device, the stop indication message being used to indicate that the state of the first data stream recorded by the receiving device be switched to a closed state.

[0067] In one embodiment, the start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in a remote direct access content message.

[0068] Fifthly, this application also provides a chip including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the first or second aspect above.

[0069] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first or second aspect above.

[0070] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first or second aspect above.

[0071] Eighthly, this application also provides a network interface card, including the chip and interface as described in the fifth aspect, wherein the chip communicates externally through the interface.

[0072] The aforementioned congestion control method, apparatus, chip, storage medium, and program product receive start indication information of a first data stream sent by a first transmitting device; in response to the start indication information, switch the state of the first data stream recorded by the receiving device to an ingress congestion state, obtain a first token value of the first data stream in the ingress congestion state; generate first response information, and send the first response information to the first transmitting device, wherein the response information includes ingress congestion state information of the first data stream and a first token value allocated to the first data stream, so that the first transmitting device switches the state of the first data stream recorded by the first transmitting device to an ingress congestion state, clears the residual token value corresponding to the first data stream, and sends a message according to the first token value allocated to the first data stream. Before sending the first data stream to the receiving device, the first sending device sends a start indication message to the receiving device, thereby switching the state of the first data stream to the ingress congestion state. In the ingress congestion state, the receiving device allocates bandwidth to the first data stream using the first token value, which causes the first sending device to clear the residual token value corresponding to the first data stream and transmit the packet according to the allocated first token value. This can effectively solve the congestion problem caused by multiple sending devices sending data streams to one receiving device at the same time. It can prevent congestion before it occurs, avoid the continuous overflow and packet loss of the receiving queue of the switch, and improve the congestion control effect. Attached Figure Description

[0073] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0074] Figure 1 This is a system diagram of RDMA in a data center in related technologies;

[0075] Figure 2 This is a schematic diagram illustrating congestion caused by the incast traffic model in related technologies.

[0076] Figure 3 This is a schematic diagram illustrating congestion caused by the outcast traffic model in related technologies.

[0077] Figure 4 An application environment diagram of a congestion control method provided in this application embodiment;

[0078] Figure 5 A signaling interaction diagram of a congestion control method provided in an embodiment of this application;

[0079] Figure 6 A schematic diagram of a state machine for a transmitting device provided in an embodiment of this application;

[0080] Figure 7 A schematic diagram of a state machine for a receiving device provided in an embodiment of this application;

[0081] Figure 8 A schematic diagram of a total token bucket provided for an embodiment of this application;

[0082] Figure 9 Signaling interaction diagram of another congestion control method provided in the embodiments of this application;

[0083] Figure 10 A schematic diagram of a first token bucket provided for an embodiment of this application;

[0084] Figure 11 A structural block diagram of a congestion control device provided in an embodiment of this application;

[0085] Figure 12 A structural block diagram of another congestion control device provided in the embodiments of this application;

[0086] Figure 13 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0087] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0088] The relevant technologies will be explained below.

[0089] Figure 1 This is a system diagram of RDMA in a data center in related technologies, such as... Figure 1 As shown, data streams can be transmitted between various RDMA network cards via a switch. In real-world scenarios, various types of congestion can occur during data stream transmission between various RDMA network cards, including incast congestion, outcast congestion, switch congestion, and RDMA network card congestion.

[0090] For incast congestion. Figure 2 This is a diagram illustrating congestion caused by the incast traffic model in related technologies, such as... Figure 2As shown, RDMA network cards 1, 2, and 3 send data streams to RDMA network card a, i.e., a many-to-one data stream transmission method. Under this data stream transmission method, congestion is prone to occur at the input end of RDMA network card a.

[0091] For outcast congestion. Figure 3 This is a diagram illustrating congestion caused by the outcast traffic model in related technologies, such as... Figure 3 As shown, RDMA network card 1 sends data streams to RDMA network cards a, b, and c respectively, i.e., a one-to-many data stream transmission method. Under this data stream transmission method, congestion is prone to occur at the output end of RDMA network card 1.

[0092] In the event of switch congestion, the switch will set the Explicit Congestion Notification (ECN) field to Congestion Experienced (CE) in the IP header of packets passing through the switch, thereby instructing the sending device to adjust the packet transmission rate.

[0093] RDMA network card congestion is caused by insufficient internal packet receiving capacity of the RDMA network card. After receiving a packet, the RDMA network card needs to process it according to the protocol and finally write the packet to the host side. When the internal packet receiving capacity of the RDMA network card is insufficient, the RDMA network card cannot process packets in time, resulting in a full buffer, which affects the reception of subsequent packets. Factors affecting the internal packet receiving capacity of the RDMA network card include the host-side write memory capacity of the RDMA network card and whether the RDMA network card's own buffer has a miss rate.

[0094] In related technologies, congestion control can be achieved through Data Center Quantized Congestion Notification (DCQCN). When a switch detects congestion, it sends a quantized congestion notification message and an explicit congestion flag to the sending device of the data stream. Upon receiving the quantified congestion notification and the explicit congestion flag, the sending end proactively reduces its transmission rate, thereby preventing congestion propagation and ensuring low latency and high reliability of RDMA transmission. However, congestion control through DCQCN is mainly aimed at incast congestion and has the following drawbacks.

[0095] First, congestion control via DCQCN requires adjusting the transmission rate only after congestion occurs. Second, DCQCN-based congestion control has a relatively long convergence time, potentially requiring a second rate reduction after the initial one. Third, the large number of sending devices in the incast traffic model can cause momentary overload on the switch, but the transmission time of congestion notification messages is constant and cannot be increased with the momentary switch load, leading to continuous overflow and packet loss in the switch's receiving queue.

[0096] Furthermore, since congestion control via DCQCN is primarily designed for incast congestion, it cannot effectively control congestion when outcast congestion, switch congestion, or RDMA NIC congestion occurs.

[0097] To address the aforementioned technical problems, embodiments of this application provide a congestion control method, apparatus, chip, storage medium, and program product. Before sending a first data stream to a receiving device, the first transmitting device sends a start indication message to the receiving device, thereby switching the state of the first data stream to an ingress congestion state. In the ingress congestion state, the receiving device allocates bandwidth to the first data stream using a first token value, thereby causing the first transmitting device to clear the residual token value corresponding to the first data stream and transmit packets according to the allocated first token value. This effectively solves the congestion problem caused by multiple transmitting devices simultaneously sending data streams to a single receiving device, preventing congestion before it occurs and avoiding continuous overflow and packet loss in the receiving queue of the switch, thus improving the congestion control effect.

[0098] The application scenarios of the congestion control method provided in the embodiments of this application will be described below.

[0099] The congestion control method provided in this application can be applied to, for example, Figure 4In the application environment shown, the first sending device 101 and the receiving device 102 are connected via a switch 103. The first sending device 101 sends a start indication information for a first data stream to the receiving device 102. In response to the start indication information, the receiving device 102 switches the state of the first data stream recorded by the receiving device to an ingress congestion state and obtains the first token value of the first data stream in the ingress congestion state. Subsequently, the receiving device 102 generates a first response information and sends it to the first sending device, wherein the response information includes the ingress congestion state information of the first data stream and the first token value allocated to the first data stream. Finally, the first sending device 101 updates the state of the first data stream recorded by the first sending device to an ingress congestion state, clears the residual token value of the first data stream corresponding to the first sending device, and sends a message according to the first token value allocated to the first data stream.

[0100] The first transmitting device 101 and the receiving device 102 mentioned above can be RDMA network cards.

[0101] In one exemplary embodiment, such as Figure 5 As shown, a congestion control method is provided, which is applied to... Figure 4 Taking the first transmitting end device and the receiving end device as an example, it includes S201 to S204.

[0102] S201, The first transmitting device sends a start indication information of the first data stream to the receiving device.

[0103] The first data stream mentioned above is the data stream that the first sending device needs to send to the receiving device. The start indication information mentioned above is information indicating the start of sending a message.

[0104] In some embodiments, the first transmitting device can set a corresponding state machine for the first data stream, which can indicate the state of the first data stream recorded by the first transmitting device. In different states, the first transmitting device can perform different actions or events on the first data stream.

[0105] For example, Figure 6 A schematic diagram of the state machine of a first transmitting device provided in an embodiment of this application is shown below. Figure 6As shown, the initial state of the first data stream recorded by the first sending device can be in the off state. In the off state, the first sending device does not send messages in the first data stream. When sending messages in the first data stream begins, the state of the first data stream recorded by the first sending device can be switched from the off state to the on state. In the on state, the first sending device can be triggered to send a start indication message to the receiving device.

[0106] It should be noted that in the on state, the first data stream's packets are not affected by congestion control and can be sent at full speed.

[0107] S202. In response to the start indication information, the receiving device switches the state of the first data stream recorded by the receiving device to the ingress congestion state and obtains the first token value of the first data stream in the ingress congestion state.

[0108] In some embodiments, the receiving device may also set a corresponding state machine for the first data stream to indicate the state of the first data stream recorded by the receiving device. Under different states, the receiving device may also perform different actions or events on the first data stream.

[0109] Accordingly, after the receiving device receives the start indication information of the first data stream sent by the first sending device, the receiving device, in response to the start indication information, switches the state of the first data stream to the ingress congestion state in its corresponding state machine. This may include switching the state of the first data stream recorded by the receiving device from the initial state to the ingress congestion state, or switching the state of the first data stream recorded by the receiving device from the egress congestion state to the ingress congestion state.

[0110] For example, Figure 7 A schematic diagram of the state machine of a receiving device provided in an embodiment of this application is shown below. Figure 7 As shown, the initial state of the first data stream at the receiving device can be off. After the receiving device receives the start indication information of the first data stream sent by the first sending device, it can switch the state of the first data stream recorded by the receiving device to the incast control state.

[0111] It should be understood that the embodiments of this application do not limit the actions or events performed by the receiving device in the off state and in the incast state. For example, in the off state, the receiving device does not receive the transmission of the first data stream packets; in the incast state, the receiving device performs congestion control on the packets of the first data stream sent by the first sending device.

[0112] In some embodiments, after the receiving device switches the state of the first data stream recorded by the receiving device to an ingress congestion state, the receiving device can execute the corresponding action or event under the ingress congestion state. That is, it obtains the first token value of the first data stream under the ingress congestion state, and then allocates bandwidth in the form of the allocation of the first token value to perform ingress congestion control on the first data stream.

[0113] The first data stream can be any online stream. The first token value can be the token value allocated to the first data stream from the total token bucket of the current receiving port. The total token bucket is used to allocate bandwidth to the current receiving port, which is the port on the receiving device that receives the first data stream.

[0114] It should be understood that the token bucket is a network traffic shaping and rate limiting algorithm used to control the rate of data transmission.

[0115] For example, Figure 8 This is a schematic diagram of the total token bucket distribution provided in an embodiment of this application, as shown below. Figure 8 As shown, each receiving port on the receiving end device side maintains a total token bucket, which includes automatically populated tokens. Tokens in the total token bucket that are awaiting allocation can be assigned to various online streams. The allocation method can be specifically configured according to the actual situation. For example, each data stream in a congested state at the ingress end is assigned a preset token value, such as a first token value.

[0116] For example, the receiving device can automatically fill the total token bucket with tokens at a target filling rate, and then allocate the tokens to be allocated in the total token bucket to the online streams (including the first data stream) of the current receiving port. The online stream consumes tokens each time it sends a message to the ingress port of the receiving device. After the tokens are exhausted, the online stream can no longer send messages to the ingress port of the receiving device, thereby achieving congestion control at the ingress end through the tokens in the allocated total token bucket.

[0117] In some embodiments, all online flows in an inbound congestion state are assigned a token value corresponding to a preset bandwidth, i.e., a first token value.

[0118] It should be noted that the sum of the bandwidth allocated to online streams is no higher than the sum of the ingress port bandwidth of the receiving device.

[0119] The target fill rate can be a preset ingress port speed, which corresponds to the ingress port bandwidth.

[0120] It should be understood that the aforementioned target filling rate is an adjustable parameter to address switch congestion and / or RDMA network card congestion. In some embodiments, the receiving device may obtain network congestion indication information from the switch and / or network card data reception capability information from the receiving device. Subsequently, the receiving device adjusts the token filling rate of the total token bucket based on the network congestion indication information and / or network card data reception capability information. Accordingly, if the token filling rate of the total token bucket changes, the first token value allocated to the data stream under ingress congestion conditions is adjusted accordingly.

[0121] For example, when switch congestion occurs, the switch can set network congestion indication information in the IP header of the packet. The receiving device obtains this network congestion indication information from the IP header of the packet, thereby knowing the congestion status of the switch. At this time, the receiving device can reduce the target filling rate of the tokens in the total token bucket corresponding to the receiving port, thereby reducing the packet sending rate of each online flow and correspondingly reducing the first token value.

[0122] For example, when the network card data receiving capability of the receiving device is insufficient, the receiving device can reduce the target filling rate of the tokens in the total token bucket corresponding to the receiving port, thereby reducing the sending rate of the packets of each online stream and correspondingly reducing the first token value.

[0123] The network interface card (NIC) data reception capability information of the receiving device includes the occupancy rate of the packet buffer RAM. A lower occupancy rate indicates a stronger NIC data reception capability, while a higher occupancy rate indicates a weaker NIC data reception capability. When the occupancy rate of the packet buffer RAM exceeds a preset occupancy threshold (e.g., 50%), it can be determined that the NIC's data reception capability is insufficient, thus reducing the target fill rate.

[0124] S203. The receiving device generates a first response information and sends the first response information to the first sending device.

[0125] The first response information includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream.

[0126] For example, when the receiving device is in an ingress congestion state, after obtaining the first token value of the first data stream in the ingress congestion state, it can generate first response information and send the first response information to the first sending device. Using the ingress congestion state information of the first data stream, the first sending device can be instructed to switch the state of the first data stream recorded by the first sending device to the ingress congestion state as well. Using the first token value allocated to a data stream, it can be instructed to clear the residual token value corresponding to the first data stream and send messages according to the first token value allocated to the first data stream.

[0127] It should be noted that, as the token bucket is continuously and automatically replenished, the receiving device also continuously allocates a first token value to the first data stream. Accordingly, each time the receiving device allocates a first token value to the first data stream, it sends the first token value to the first sending device, thereby causing the first sending device to update the number of residual token values ​​it maintains.

[0128] S204. The first sending device updates the status of the first data stream recorded in the first sending device to the ingress congestion status, clears the residual token value corresponding to the first data stream in the first sending device, and sends the message according to the first token value allocated to the first data stream.

[0129] In some embodiments, after receiving a first response message, the first sending device can parse the first response information sent by the receiving device to obtain the ingress congestion state information of the first data stream and the first token value of the first data stream in the ingress congestion state. Subsequently, the first sending device switches the state of the first data stream recorded by the first sending device to the ingress congestion state. In the ingress congestion state, the first sending device stops full-speed transmission of packets in the first data stream and begins to execute the corresponding actions of ingress congestion control.

[0130] In some embodiments, under ingress congestion, the first transmitting device can clear the residual token value corresponding to the first data stream in the first transmitting device and send a message according to the first token value allocated to the first data stream.

[0131] For example, the number of residual token values ​​maintained by the first sending device increases continuously as the receiving device continuously sends first token values. Each time the first sending device receives a first token value, it adds the first token value to the currently maintained number of residual token values, thus obtaining an updated number of residual token values ​​maintained by the first sending device. Furthermore, the number of residual token values ​​maintained by the first sending device decreases continuously as the first sending device sends packets of the first data stream to the receiving device. Each time the first sending device sends packets of the first data stream to the receiving device, one or more residual token values ​​maintained by the first sending device are consumed. Based on the increase and consumption of the number of residual token values, a dynamic balance is formed in the number of residual token values, thereby achieving ingress congestion control.

[0132] In some embodiments, after the receiving device adjusts the token filling rate of the total token bucket according to the network congestion indication information and / or the network card data receiving capability information, it may also send the first congestion control information to the first sending device, thereby instructing the first sending device to reset the number of residual token values ​​maintained by the first sending device.

[0133] In some embodiments, the first transmitting device may further send a stop indication message for the first data stream to the receiving device. Upon receiving the stop indication message, the receiving device, in response to the stop indication message, switches the state of the first data stream recorded by the receiving device to a closed state. Subsequently, in the closed state, the receiving device stops allocating the first token value to the first data stream.

[0134] Continue to refer to Figure 7 When the number of residual token values ​​maintained by the first transmitting device is greater than or equal to the number of tokens required to send a message, the state machine on the first transmitting device side can be switched from the ingress congestion state to the shutdown state. At this time, the first transmitting device sends a stop indication message for the first data stream to the receiving device. (Continue to refer to...) Figure 6 Upon receiving the stop indication information for the first data stream, the receiving device switches the state of the first data stream to the off state. Simultaneously, in the off state, it stops allocating the first token value to the first data stream, thus waiting for the first sending device to consume the number of remaining token values ​​it maintains.

[0135] The congestion control method provided in this application embodiment allocates the bandwidth for the first data stream sent by the first sending device to be allocated by the receiving device through a first token value, thereby effectively solving the ingress congestion control problem.

[0136] The congestion control method provided in this application embodiment receives start indication information of a first data stream sent by a first sending device; in response to the start indication information, switches the state of the first data stream recorded by the receiving device to an ingress congestion state, obtains a first token value of the first data stream in the ingress congestion state; generates first response information, and sends the first response information to the first sending device, wherein the response information includes ingress congestion state information of the first data stream and a first token value allocated to the first data stream, so that the first sending device switches the state of the first data stream recorded by the first sending device to an ingress congestion state, clears the residual token value corresponding to the first data stream, and sends a message according to the first token value allocated to the first data stream. Before sending the first data stream to the receiving device, the first sending device sends a start indication message to the receiving device, thereby switching the state of the first data stream to the ingress congestion state. In the ingress congestion state, the receiving device allocates bandwidth to the first data stream using the first token value, which causes the first sending device to clear the residual token value corresponding to the first data stream and transmit the packet according to the allocated first token value. This can effectively solve the congestion problem caused by multiple sending devices sending data streams to one receiving device at the same time. It can prevent congestion before it occurs, avoid the continuous overflow and packet loss of the receiving queue of the switch, and improve the congestion control effect.

[0137] The following describes how the congestion control method provided in the embodiments of this application solves the problem of outgoing congestion control. Figure 9 A signaling interaction diagram for another congestion control method provided in the embodiments of this application, such as... Figure 9 As shown, the congestion control method includes S301 to S310.

[0138] S301, The first transmitting device sends a start indication information of the first data stream to the receiving device.

[0139] S302. In response to the start indication information, the receiving device switches the state of the first data stream recorded by the receiving device to the ingress congestion state and obtains the first token value of the first data stream in the ingress congestion state.

[0140] S303. The receiving device generates a first response information and sends the first response information to the first sending device. The response information includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream.

[0141] S304. The first sending device updates the status of the first data stream recorded in the first sending device to the ingress congestion status, clears the residual token value corresponding to the first data stream in the first sending device, and sends the message according to the first token value allocated to the first data stream.

[0142] S305. The receiving device allocates the corresponding token to the first token bucket according to the token value allocated to the first data stream. When the current receiving port receives a message from the first data stream, the corresponding token is subtracted from the first token bucket.

[0143] For example, Figure 10 A schematic diagram of a first token bucket provided in an embodiment of this application is shown below. Figure 10 As shown, the receiving device can maintain a first token bucket for the first data stream. The number of tokens filled in the first token bucket is consistent with the first token value allocated to the first data stream. That is, each time the first data stream is allocated a first token value, the corresponding number of tokens is filled into the first token bucket.

[0144] Continue to refer to Figure 10 Furthermore, the receiving device can also deduct tokens from the first token bucket based on the packets in the first data stream received by the current receiving port. That is, each time the current receiving port of the receiving device receives a packet in the first data stream, it can determine the number of tokens consumed in transmitting that packet and deduct the same number of tokens from the first token bucket.

[0145] S306. If the number of tokens in the first token bucket is greater than the first threshold, the receiving device switches the first data stream recorded by the receiving device from the ingress congestion state to the egress congestion state.

[0146] It should be understood that, since the token value allocated to the first data stream will fill the first token bucket with the same number of tokens, when a message is received from the first data stream, the same number of tokens consumed by the message in the first data stream will be deducted from the first token bucket, thus making the number of tokens accumulated in the first token bucket dynamically change.

[0147] In some embodiments, if the receiving device detects that the number of tokens in the first token bucket is greater than a first threshold, it can determine that the actual bandwidth of the first data stream is less than the bandwidth corresponding to the first token value allocated by the receiving device to the first data stream. In this case, the resulting congestion type is outgoing congestion. Accordingly, the state machine of the receiving device can be switched from an incoming congestion state to an outgoing congestion state for the first data stream.

[0148] The first threshold can be set according to the actual situation, and this application embodiment does not impose any restrictions on it. For example, it can be set to be greater than the first token value.

[0149] S307. When the state of the first data stream recorded by the receiving end device is outgoing congestion, the receiving end device obtains the packet bandwidth of the first data stream received by the current receiving port, wherein the current receiving port is the port that receives the first data stream.

[0150] S308. The receiving device determines the token value allocated to the first data stream after adjustment based on the packet bandwidth of the first data stream received at the current receiving port.

[0151] In some embodiments, after the receiving device switches the state of the first data stream recorded by the receiving device from the ingress congestion state to the egress congestion state, in the egress congestion state, the receiving device can determine the second token value allocated to the first data stream after adjustment based on the packet bandwidth of the first data stream received by the current receiving port, so as to reduce the tokens allocated by the receiving end to the first data stream, avoid allocating tokens to the sending end but the packet bandwidth sent by the sending end is insufficient, solve the problem of egress congestion, and thus cause bandwidth waste at the receiving end.

[0152] The bandwidth of the packets in the first data stream can be the actual bandwidth of the packets in the first data stream received by the receiving device.

[0153] For example, when the receiving device is in an outgoing congestion state, the second number of first tokens reassigned to the first data stream in a single transaction is min{the number of packets in the first data stream corresponding to the bandwidth, Y}, where Y is the value of the first tokens reassigned to the first data stream when in an incoming congestion state.

[0154] It should be understood that under outgoing congestion conditions, the bandwidth of packets in the first data stream is usually less than Y. Correspondingly, the second token value reassigned to the first data stream in a single transaction is usually equal to the number of packets in the first data stream corresponding to the bandwidth.

[0155] In some embodiments, multiple online flows exist at the ingress port. While the first data flow among these online flows is in an outgress congestion state, the other online flows may still be in an ingress congestion state. Accordingly, after adjusting the first token value allocated to the first data flow to a second token value, the bandwidth allocated to the other online flows through the first token value increases accordingly, thus fully utilizing the bandwidth of the ingress port.

[0156] S309. The receiving device generates a second response information and sends the second response information to the first sending device. The second response information includes the outgoing congestion status information of the first data stream and the second token value allocated to the first data stream.

[0157] S310, the first sending device sends a message according to the second token value allocated to the first data stream.

[0158] In other embodiments, the receiving device can also switch the state of the second data stream at the current receiving port. The receiving device can allocate a corresponding token to the first token bucket corresponding to the second data stream based on the token value assigned to it. When the current receiving port receives a packet from the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the second data stream. If the number of tokens in the first token bucket corresponding to the second data stream is greater than a first threshold, the receiving device switches the current state of the second data stream to an outgoing congestion state. If the number of tokens in the first token bucket corresponding to the second data stream is less than a second threshold, the receiving device switches the current state of the second data stream to an incoming congestion state.

[0159] The second data stream is any online stream from the current receiving port other than the first data stream. The current receiving port is the port that receives the first data stream.

[0160] Accordingly, when the receiving device records the state of the second data stream as an outgoing congestion state, it obtains the packet bandwidth of the second data stream received by the current receiving port. Here, the current receiving port is the port receiving the first data stream, and the second data stream is any online stream on the current receiving port other than the first data stream. Subsequently, based on the packet bandwidth of the second data stream received by the current receiving port, it determines the adjusted third token value allocated to the second data stream. Finally, the receiving device generates a third response message and sends it to the second sending device corresponding to the second data stream. The third response message includes the outgoing congestion state information of the second data stream and the third token value allocated to the second data stream. This causes the second sending device to switch the state of the second data stream recorded by the second sending device to an outgoing congestion state, clear the residual token value corresponding to the second data stream, and send packets based on the third token value allocated to the second data stream.

[0161] It should be understood that after resolving outgoing congestion, the first data stream can also be switched from an outgoing congestion state to an ingoing congestion control state. The switch from outgoing congestion to ingoing congestion control can be triggered by either the first transmitting device or the receiving device; this application embodiment does not impose any limitation on this. In some embodiments, if the number of tokens in the first token bucket is less than a second threshold, the first data stream recorded by the receiving device is switched from its current state to an ingoing congestion state.

[0162] The second threshold can be the same as or different from the first threshold. For example, the second threshold can be set to be less than a first quantity of the first tokens.

[0163] For example, when the tokens in the first token bucket are consumed to a level below the second threshold, it indicates that the actual receiving bandwidth of the current first data stream's packets is greater than the bandwidth corresponding to the second number of allocated first tokens. At this point, the outgoing congestion state can be lifted and the system can switch back to the incoming congestion state.

[0164] In other embodiments, if the number of first tokens maintained by the first sending device is less than a third threshold, the first sending device may resend the start indication information of the first data stream to the receiving device.

[0165] The third threshold can be the same as or different from the second threshold. For example, the third threshold can be set to be less than a first quantity of the first tokens.

[0166] For example, in the case of outgoing congestion, if the number of first tokens maintained by the first sending device is less than the third threshold, the first sending device has enough tokens to consume for sending the first data stream packets. At this time, the first sending device can resend the start indication information of the first data stream, thereby reallocating the first token value. This avoids the first sending device being unable to obtain more tokens and having to send fewer packets, which could cause the receiving device to mistakenly enter the outgoing congestion state and be unable to exit.

[0167] It should be noted that after the outgoing congestion state switches back to the incoming congestion state, the number of first tokens to be consumed maintained by the first sending device also needs to be cleared to avoid the residual first tokens affecting the congestion convergence speed.

[0168] Furthermore, in this embodiment of the application, when in the start state, outgoing congestion state or incoming congestion state, if the first sending device does not receive the indication information of the first token value or the indication information of the first token value within a preset time, it indicates that the token may be discarded. At this time, the first sending device may also resend the start indication information of the first data stream.

[0169] It should be understood that the outgoing congestion state can also be directly switched to the incoming orifice blockage control state. In some embodiments, the transmitting device can also send a stop indication message for the first data stream to the receiving device. Upon receiving the stop indication message, the transmitting and receiving devices, in response to the stop indication message, switch the first data stream from the outgoing congestion state to the closed state. Subsequently, in the closed state, the transmitting and receiving devices stop allocating the first token value to the first data stream.

[0170] In some embodiments, congestion control information such as the start indication information, stop indication message, first congestion control information, and second congestion control information of the first data stream are all carried in the remote direct access content message.

[0171] For example, the reserved fields of the RDMA message can be used to transmit start indication information, stop indication message, first response information, second response information and third response information of the first data stream.

[0172] The start indication information and stop indication message sent by the first sending device are carried in the RDMA request message and RDMA response message. The first response information, second response information and third response information sent by the receiving device are carried in the RDMA acknowledgment (ack) message and RDMA response message.

[0173] It should be noted that when the receiving device does not generate an RDMA ack message or an RDMA response message carrying congestion control information for an extended period, the receiving device may generate an Unsolicited Acknowledge message carrying congestion control information. When the first sending device receives this Unsolicited Acknowledge message, it is only used for end-to-end flow control and congestion control information updates, and the message is discarded.

[0174] For example, RDMA messages can use the congestion control information conveyed in the reserved field (resv) of the Base Transport Header (BTH) defined by the InfiniBand protocol, as shown in Table 1.

[0175] Table 1

[0176]

[0177] In this application, since the congestion control information is transmitted using the currently communicating RDMA message, no additional congestion control messages are added, thus avoiding bandwidth waste.

[0178] The congestion control method provided in this application embodiment receives start indication information of a first data stream sent by a first sending device; in response to the start indication information, switches the state of the first data stream recorded by the receiving device to an ingress congestion state, obtains a first token value of the first data stream in the ingress congestion state; generates first response information, and sends the first response information to the first sending device, wherein the response information includes ingress congestion state information of the first data stream and a first token value allocated to the first data stream, so that the first sending device switches the state of the first data stream recorded by the first sending device to an ingress congestion state, clears the residual token value corresponding to the first data stream, and sends a message according to the first token value allocated to the first data stream. Before sending the first data stream to the receiving device, the first sending device sends a start indication message to the receiving device, thereby switching the state of the first data stream to the ingress congestion state. In the ingress congestion state, the receiving device allocates bandwidth to the first data stream using the first token value, which causes the first sending device to clear the residual token value corresponding to the first data stream and transmit the packet according to the allocated first token value. This can effectively solve the congestion problem caused by multiple sending devices sending data streams to one receiving device at the same time. It can prevent congestion before it occurs, avoid the continuous overflow and packet loss of the receiving queue of the switch, and improve the congestion control effect.

[0179] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0180] Based on the same inventive concept, this application also provides a congestion control device for implementing the congestion control method of the receiving device described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more congestion control device embodiments provided below can be found in the limitations of the congestion control method for the receiving device described above, and will not be repeated here.

[0181] In one exemplary embodiment, such as Figure 11As shown, a congestion control device 400 is provided, including: a first receiving module 401, a first processing module 402, and a first transmitting module 403, wherein:

[0182] The first receiving module 401 is used to receive the start indication information of the first data stream sent by the first sending device;

[0183] The first processing module 402 is used to, in response to the start indication information, switch the state of the first data stream recorded by the receiving device to the ingress congestion state, obtain the first token value of the first data stream in the ingress congestion state, and generate the first response information;

[0184] The first sending module 403 is used to send the first response information to the first sending end device. The response information includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream, so that the first sending end device switches the status of the first data stream recorded by the first sending end device to the ingress congestion status, clears the residual token value corresponding to the first data stream, and sends a message according to the first token value allocated to the first data stream.

[0185] In one embodiment, the first processing module 402 is further configured to: obtain the packet bandwidth of the first data stream currently received by the receiving port when the state of the first data stream recorded by the receiving device is an outgoing congestion state, wherein the current receiving port is the port receiving the first data stream; determine the second token value allocated after adjustment of the first data stream based on the packet bandwidth of the first data stream currently received by the receiving port; and generate second response information.

[0186] The first sending module 403 is further configured to send the second response information to the first sending end device, wherein the second response information includes the outgoing end congestion status information of the first data stream and the second token value allocated to the first data stream, so that the first sending end device switches the status of the first data stream recorded by the first sending end device to the outgoing end congestion status, clears the residual token value corresponding to the first data stream, and sends a message according to the second token value allocated to the first data stream.

[0187] In one embodiment, the first processing module 402 is further configured to allocate a corresponding token to the first token bucket corresponding to the first data stream according to the token value allocated to the first data stream; when the current receiving port receives a packet of the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the first data stream; if the number of tokens in the first token bucket corresponding to the first data stream is greater than a first threshold, the current state of the first data stream is switched to the outgoing congestion state; if the number of tokens in the first token bucket corresponding to the first data stream is less than a second threshold, the current state of the first data stream is switched to the incoming congestion state.

[0188] In one embodiment, the first processing module 402 is further configured to: obtain the packet bandwidth of the second data stream received by the current receiving port when the state of the second data stream recorded by the receiving device is an outgoing congestion state, wherein the current receiving port is the port that receives the first data stream, and the second data stream is any online stream of the current receiving port other than the first data stream; determine the third token value allocated to the second data stream after adjustment based on the packet bandwidth of the second data stream received by the current receiving port; and generate third response information.

[0189] The first sending module 403 is further configured to send third response information to the second sending end device corresponding to the second data stream. The third response information includes the outgoing congestion status information of the second data stream and the third token value allocated to the second data stream, so that the second sending end device switches the status of the second data stream recorded by the second sending end device to the outgoing congestion status, clears the residual token value corresponding to the second data stream, and sends a message according to the third token value allocated to the second data stream.

[0190] In one embodiment, the first processing module 402 is further configured to allocate a corresponding token to the first token bucket corresponding to the second data stream according to the token value allocated to the second data stream; when the current receiving port receives a packet from the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the second data stream; if the number of tokens in the first token bucket corresponding to the second data stream is greater than a first threshold, the current state of the second data stream is switched to the outgoing congestion state; if the number of tokens in the first token bucket corresponding to the second data stream is less than a second threshold, the current state of the second data stream is switched to the incoming congestion state.

[0191] In one embodiment, the first receiving module 401 is further configured to receive stop indication information of the first data stream sent by the first sending device;

[0192] The first processing module 402 is further configured to, in response to the stop indication information, switch the state of the first data stream recorded by the receiving device to the closed state; and in the closed state, stop allocating token values ​​to the first data stream.

[0193] In one embodiment, the start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in a remote direct access content message.

[0194] In one embodiment, the first processing module 402 is further configured to acquire network congestion indication information of the switch and / or network interface card (NIC) data receiving capability information of the receiving device; and adjust the first token value according to the network congestion indication information and / or NIC data receiving capability information.

[0195] The modules in the aforementioned congestion control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0196] Based on the same inventive concept, this application also provides a congestion control device for implementing the congestion control method of the first transmitting device described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the congestion control device provided below can be found in the limitations of the congestion control method for the first transmitting device described above, and will not be repeated here.

[0197] In one exemplary embodiment, such as Figure 12 As shown, a congestion control device 500 is provided, including: a second transmitting module 501, a second receiving module 502, and a second processing module 503, wherein:

[0198] The second sending module 501 is used to send the start indication information of the first data stream to the receiving device;

[0199] The second receiving module 502 is used to receive and parse the first response information sent by the receiving device to obtain the ingress congestion status information of the first data stream and the first token value of the first data stream in the ingress congestion status.

[0200] The second processing module 503 is used to update the status recorded by the first data stream in the first sending device to the ingress congestion status, clear the residual token value corresponding to the first data stream in the first sending device, and send a message according to the first token value allocated to the first data stream.

[0201] In one embodiment, the second receiving module 502 is further configured to receive and parse the second response information sent by the receiving device to obtain the outgoing congestion status information of the first data stream and the second token value allocated to the first data stream, wherein the second token value corresponds to the bandwidth of the packet of the first data stream received by the current receiving port of the receiving device.

[0202] The second processing module 503 is also used to send messages according to the second token value allocated to the first data stream.

[0203] In one embodiment, the second sending module 501 is further configured to resend the start indication information of the first data stream to the receiving device when the residual token value corresponding to the first sending device is less than a third threshold.

[0204] In one embodiment, the second sending module 501 is further configured to send a stop indication message for the first data stream to the receiving device, the stop indication message being used to indicate that the state of the first data stream recorded by the receiving device is switched to a closed state.

[0205] In one embodiment, the start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in a remote direct access content message.

[0206] The modules in the aforementioned congestion control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0207] In one exemplary embodiment, a computer device is provided, which may be a network device, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a congestion control method on the sending end device side or the receiving end device side.

[0208] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0209] In one embodiment, a chip is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement a congestion control method on the transmitting end device side or a congestion control method on the receiving end device side.

[0210] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a congestion control method on the transmitting end device side or a congestion control method on the receiving end device side.

[0211] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a congestion control method on the transmitting end device side or a congestion control method on the receiving end device side.

[0212] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements a congestion control method on the transmitting end device side or a congestion control method on the receiving end device side.

[0213] In one embodiment, a network interface card is provided, including the chip and interface as described above, wherein the chip communicates externally through the interface.

[0214] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0215] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0216] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0217] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A congestion control method, characterized in that, Applied to a receiving device, the method includes: Receive the start indication information of the first data stream sent by the first sending device; In response to the start indication information, the state of the first data stream recorded by the receiving device is switched to the ingress congestion state, and the first token value of the first data stream in the ingress congestion state is obtained. A first response message is generated and sent to the first sending device. The response message includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream. This enables the first sending device to switch the status of the first data stream recorded by the first sending device to the ingress congestion status, clear the residual token value corresponding to the first data stream, and send a message according to the first token value allocated to the first data stream.

2. The method according to claim 1, characterized in that, The method further includes: When the state of the first data stream recorded by the receiving device is outgoing congestion, the packet bandwidth of the first data stream received by the current receiving port is obtained, wherein the current receiving port is the port that receives the first data stream. Based on the packet bandwidth of the first data stream received by the current receiving port, determine the second token value allocated to the first data stream after adjustment; A second response message is generated and sent to the first sending device. The second response message includes the outgoing congestion status information of the first data stream and the second token value allocated to the first data stream. This enables the first sending device to switch the status of the first data stream recorded by the first sending device to the outgoing congestion status, clear the residual token value corresponding to the first data stream, and send a message according to the second token value allocated to the first data stream.

3. The method according to claim 2, characterized in that, The method further includes: The token is allocated to the first token bucket corresponding to the first data stream according to the token value allocated to the first data stream. When the current receiving port receives a message from the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the first data stream. If the number of tokens in the first token bucket corresponding to the first data stream is greater than the first threshold, the current state of the first data stream corresponding to the first data stream is switched to the outgoing congestion state. If the number of tokens in the first token bucket corresponding to the first data stream is less than the second threshold, the first data stream is switched from its current state to the ingress congestion state.

4. The method according to claim 1, characterized in that, The method further includes: When the state of the second data stream recorded by the receiving device is outgoing congestion, the packet bandwidth of the second data stream received by the current receiving port is obtained, wherein the current receiving port is the port that receives the first data stream, and the second data stream is any online stream of the current receiving port other than the first data stream; Based on the packet bandwidth of the second data stream received by the current receiving port, determine the third token value allocated to the second data stream after adjustment; A third response message is generated and sent to the second sending device corresponding to the second data stream. The third response message includes the outgoing congestion status information of the second data stream and the third token value allocated to the second data stream. This enables the second sending device to switch the status of the second data stream recorded by the second sending device to the outgoing congestion status, clear the residual token value corresponding to the second data stream, and send a message according to the third token value allocated to the second data stream.

5. The method according to claim 4, characterized in that, The method further includes: The token is allocated to the first token bucket corresponding to the second data stream according to the token value allocated to the second data stream. When the current receiving port receives a message from the first data stream, the corresponding token is subtracted from the first token bucket corresponding to the second data stream. If the number of tokens in the first token bucket corresponding to the second data stream is greater than the first threshold, the current state of the second data stream is switched to the outgoing congestion state. If the number of tokens in the first token bucket corresponding to the second data stream is less than the second threshold, the second data stream will be switched from its current state to the ingress congestion state.

6. The method according to claim 1, characterized in that, After receiving the start indication information of the first data stream sent by the first transmitting device, the method further includes: Receive the stop indication information of the first data stream sent by the first sending device; In response to the stop indication information, the state of the first data stream recorded by the receiving device is switched to the off state; In the closed state, token values ​​are no longer allocated to the first data stream.

7. The method according to any one of claims 1-6, characterized in that, The start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in the remote direct access content message.

8. The method according to any one of claims 1-6, characterized in that, The method further includes: Obtain network congestion indication information from the switch and / or network interface card (NIC) data reception capability information from the receiving device; The first token value is adjusted based on the network congestion indication information and / or the network interface card (NIC) data reception capability information.

9. A congestion control method, characterized in that, Applied to a first transmitting device, the method includes: Send the start indication information of the first data stream to the receiving device; Receive and parse the first response information sent by the receiving device to obtain the ingress congestion status information of the first data stream and the first token value of the first data stream in the ingress congestion status. The status of the first data stream recorded in the first sending device is updated to ingress congestion status, the residual token value corresponding to the first data stream in the first sending device is cleared, and the message is sent according to the first token value allocated to the first data stream.

10. The method according to claim 9, characterized in that, The method further includes: The receiving end device receives and parses the second response information sent by the receiving end device to obtain the outgoing end congestion status information of the first data stream and the second token value allocated to the first data stream. The second token value corresponds to the bandwidth of the packet of the first data stream received by the current receiving port of the receiving end device. Messages are sent based on the second token value allocated to the first data stream.

11. The method according to claim 10, characterized in that, After receiving and parsing the second response information sent by the receiving device, the method further includes: If the residual token value corresponding to the first sending device is less than the third threshold, the start indication information of the first data stream is resent to the receiving device.

12. The method according to claim 10, characterized in that, The method further includes: The receiving device is sent a stop indication message for the first data stream, the stop indication message being used to indicate that the state of the first data stream recorded by the receiving device be switched to a closed state.

13. The method according to any one of claims 9-12, characterized in that, The start indication information, stop indication message, first response information, second response information, and third response information of the first data stream are all carried in the remote direct access content message.

14. A congestion control device, characterized in that, Applied to a receiving device, the apparatus includes: The first receiving module is used to receive the start indication information of the first data stream sent by the first sending device; The first processing module is configured to, in response to the start indication information, switch the state of the first data stream recorded by the receiving device to the ingress congestion state, obtain the first token value of the first data stream in the ingress congestion state, and generate the first response information; The first sending module is used to send the first response information to the first sending end device, wherein the response information includes the ingress congestion status information of the first data stream and the first token value allocated to the first data stream, so that the first sending end device switches the status of the first data stream recorded by the first sending end device to the ingress congestion status, clears the residual token value corresponding to the first data stream, and sends a message according to the first token value allocated to the first data stream.

15. A congestion control device, characterized in that, Applied to a transmitting device, the apparatus includes: The second sending module is used to send the start indication information of the first data stream to the receiving device; The second receiving module is used to receive and parse the first response information sent by the receiving device to obtain the ingress congestion status information of the first data stream and the first token value of the first data stream in the ingress congestion status. The second processing module is used to update the status of the first data stream recorded by the first sending device to the ingress congestion status, clear the residual token value corresponding to the first data stream in the first sending device, and send a message according to the first token value allocated to the first data stream.

16. A chip comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8 or 9 to 13.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8 or 9 to 13.

18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8 or 9 to 13.

19. A network interface card, characterized in that, It includes the chip and interface as described in claim 16, wherein the chip communicates externally through the interface.

Citation Information

Patent Citations

  • Message transmission method and network device

    CN109218215A

  • Message retransmission method and device and chip

    CN120710642A