Network flow control method and related device of RDMA network card

Through the two-level window mechanism of the RDMA network card, the sub-window baseline is updated in real time, which solves the problem of poor transmission performance of the RDMA transmission solution in network traffic control and improves the transmission performance between data centers.

CN119544628BActive Publication Date: 2025-09-30PENG CHENG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411189907.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-09-30
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

Existing RDMA transmission solutions suffer from poor transmission performance during network traffic control, especially in long-distance and complex network topologies between data centers, where they rely heavily on switches, resulting in poor transmission performance.

Method used

The network flow control method of the RDMA network card is adopted, and flow control is performed through a two-level window mechanism. The sub-transmission window is used for window update, and the transmission window is used for overall control. The sub-window baseline is updated in real time based on the transmission status and distance to reduce the impact of intermediate switches.

Benefits of technology

The network flow control performance of the RDMA transmission solution is improved, adapting to the actual transmission flow, reducing the impact of intermediate switches on the transmission flow, and achieving end-to-end flow control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544628B_ABST
    Figure CN119544628B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a network flow control method and related devices for an RDMA network card, which relates to the field of communication technology. The method obtains a sub-window baseline of at least one transmission window and a sub-transmission window of each transmission window based on the transmission parameters of the data to be transmitted, generates transmission permission information of the sub-transmission window, and when the transmission permission information indicates that the sub-transmission window is in a sending state, encapsulates at least one information message based on the sub-window baseline and transmits it to the receiver, obtains the transmission state and transmission distance based on the feedback message, and updates the sub-window baseline of the next sub-transmission window. Flow control is performed using a two-level window method, where the sub-transmission window is used for window update and the transmission window is used for overall control. The next sub-window baseline is updated in real time based on the transmission state and transmission distance to adapt to the actual transmission flow. End-to-end flow control of the RDMA network card is realized, and the impact of the intermediate switch on the transmission flow is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network traffic control method and related device for an RDMA network card. Background Art

[0002] Remote Direct Memory Access (RDMA) allows a local node to directly access the memory of a remote node through RDMA. This directness means that remote memory can be read and written just like local memory access (Direct Memory Access, DMA), bypassing the complex TCP / IP network protocol stack of traditional Ethernet. This process is invisible to the remote node, meaning that no CPU involvement is required. The majority of the read and write work is performed by hardware, not software.

[0003] Related technologies for implementing RDMA transmission solutions have high hardware requirements and are often based on switches within data centers or switches plus network cards. Consequently, these solutions are highly dependent on switches. However, due to the long-distance and complex network topology of interconnected data centers, solutions with low switch dependence are required. Consequently, these related RDMA transmission solutions suffer from poor transmission performance during network traffic control. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to propose a network traffic control method and related devices for an RDMA network card, so as to improve the transmission performance of the RDMA transmission solution during the network traffic control process.

[0005] To achieve the above objectives, a first aspect of an embodiment of the present application provides a network traffic control method for an RDMA network card, comprising:

[0006] In response to a transmission request corresponding to a task queue element, obtaining, according to transmission parameters of data to be transmitted, at least one transmission window and a sub-window baseline of a sub-transmission window of each transmission window;

[0007] generating, under the transmission window, transmission permission information of the sub-transmission window according to resource data of the sub-transmission window;

[0008] When the transmission permission information indicates that the sub-transmission window is in a sending state, encapsulating at least one information message based on the sub-window baseline, and transmitting the information message to a receiver, wherein the information message includes an identifier for instructing the receiver to generate a feedback message according to a reception result of the information message;

[0009] Acquire a feedback message generated by the receiver, obtain a transmission state and a transmission distance according to the feedback message, and update the sub-window baseline of the next sub-transmission window based on the transmission state and the transmission distance.

[0010] In some embodiments, the feedback message includes an ACK message, and updating the sub-window baseline of the next sub-transmission window based on the transmission state and the transmission distance includes:

[0011] Determine, according to the message sequence number of the ACK message, to update the next sub-transmission window;

[0012] Updating the transmission distance based on the ACK message, generating a transmission status of the current sub-transmission window, and obtaining distance change information of the transmission distance corresponding to the adjacent sub-transmission window;

[0013] When the distance change information indicates that the transmission distance becomes smaller, the sub-window baseline of the next sub-transmission window is increased based on the transmission status; otherwise, the sub-window baseline of the next sub-transmission window is decreased based on the transmission status.

[0014] In some embodiments, increasing the sub-window baseline of the next sub-transmission window based on the transmission state includes:

[0015] The current transmission state is poor, and the current transmission state is good, obtaining a maximum sub-window baseline under the transmission window, and adjusting the sub-window baseline of the next sub-transmission window to the maximum sub-window baseline;

[0016] The sub-window baselines of the subsequent sub-transmission windows are incrementally increased according to a first preset ratio based on the previous sub-window baseline, and the maximum sub-window baseline is updated until the distance change information indicates that the transmission distance becomes longer.

[0017] In some embodiments, reducing the sub-window baseline of the next sub-transmission window based on the transmission state includes:

[0018] Obtaining a distance change of the transmission distance;

[0019] When the distance variation exceeds a preset distance threshold, the sub-window baseline of the next sub-transmission window is reduced according to a second preset ratio; otherwise, the sub-window baseline of the next sub-transmission window is adjusted in combination with the previous transmission state.

[0020] In some embodiments, adjusting the sub-window baseline of the next sub-transmission window in combination with the previous transmission state includes:

[0021] If the previous transmission state is good, adjusting the current transmission state to poor;

[0022] If the previous transmission state is a state difference, the number of consecutive state differences is obtained. When the number of states exceeds a preset state threshold, the sub-window baseline of the next sub-transmission window is reduced according to a third preset ratio.

[0023] 6. The network traffic control method of the RDMA network card according to claim 2, wherein the step of determining the update of the next sub-transmission window according to the message sequence number of the ACK message comprises:

[0024] Obtain the sub-transmission window corresponding to the message sequence number of the ACK message, and obtain a minimum sequence number to be confirmed based on the sub-transmission window;

[0025] When the message sequence number of the ACK message is greater than or equal to the minimum sequence number to be confirmed, it is determined to update the next sub-transmission window.

[0026] In some embodiments, obtaining, based on transmission parameters of the data to be transmitted, at least one transmission window and a sub-window baseline of each sub-transmission window of the transmission window includes:

[0027] Acquire transmission parameters, where the transmission parameters include one or more of a link bandwidth, an optical device conversion rate, a transmission distance, a distance incorporation rate, a maximum transmission unit, and a number of subwindows, where a first data relationship exists between the number of subwindows and the maximum transmission unit;

[0028] At least one transmission window is calculated according to the transmission parameters, and the sub-window baseline is calculated according to the number of sub-windows.

[0029] In some embodiments, updating the transmission distance based on the ACK message includes:

[0030] Obtaining a sending timestamp of the information message indicating that the identifier generates the ACK message, and a receiving timestamp of the ACK message;

[0031] Generating a time difference between the receiving timestamp and the sending timestamp;

[0032] The transmission distance is calculated based on the time difference and the optical equipment conversion rate.

[0033] In some embodiments, generating the transmission permission information of the sub-transmission window according to the resource data of the sub-transmission window includes:

[0034] Querying the resource data corresponding to the current sub-transmission window from the window management information;

[0035] If the resource data exists, adjusting the transmission permission information to a sending state;

[0036] If the resource data does not exist, generate the resource data, update the information message of the sub-transmission window, and adjust the transmission permission information to a sending state;

[0037] If the resource data cannot be generated, the transmission permission information is adjusted to a stop state.

[0038] In some embodiments, encapsulating at least one information message based on the sub-window baseline includes:

[0039] Acquire the data to be transmitted based on the task queue element;

[0040] determining data content in the information message according to the sub-window baseline, and generating a message sequence number according to the transmission order of the information message;

[0041] Based on the message sequence number, taking the first information message of the transmission window and the last information message of each sub-transmission window as the information message to be fed back;

[0042] The identifier in the information message to be fed back is set to one, and the identifiers of the other information messages are set to zero.

[0043] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a network traffic control device for an RDMA network card, comprising:

[0044] A parameter calculation module is configured to obtain, in response to a transmission request corresponding to a task queue element, a sub-window baseline of at least one transmission window and a sub-transmission window of each transmission window according to transmission parameters of the data to be transmitted;

[0045] The permission acquisition module is used to generate the transmission permission information of the sub-transmission window according to the resource data of the sub-transmission window under the transmission window;

[0046] a data generation and transmission module configured to, when the transmission permission information indicates that the sub-transmission window is in a sending state, encapsulate at least one information message based on the sub-window baseline and transmit the information message to a receiver, wherein the information message includes an identifier for instructing the receiver to generate a feedback message based on a reception result of the information message;

[0047] Update module: used to obtain the feedback message generated by the receiver, and obtain the transmission status and transmission distance according to the feedback message, and update the sub-window baseline of the next sub-transmission window based on the transmission status and the transmission distance.

[0048] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0049] To achieve the above-mentioned purpose, the fourth aspect of the embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0050] The network flow control method and related device for an RDMA network card proposed in an embodiment of the present application obtains a subwindow baseline for at least one transmission window and a subwindow of each transmission window based on the transmission parameters of the data to be transmitted. Within the transmission window, transmission permission information for the subwindow is generated based on the resource data of the subwindow. When the transmission permission information indicates that the subwindow is in the sending state, at least one information message is encapsulated based on the subwindow baseline and transmitted to the receiver. The information message includes an identifier for instructing the receiver to generate a feedback message based on the reception result of the information message. The feedback message generated by the receiver is obtained, and the transmission status and transmission distance are obtained based on the feedback message. The subwindow baseline of the next subwindow is updated based on the transmission status and transmission distance. In the embodiment of the present application, a two-level window approach is used for flow control during the RDMA transmission process, wherein the subwindow is used for window update and the transmission window is used for overall control. The subwindow baseline of the next subwindow is updated in real time based on the transmission status and transmission distance to better adapt to the actual transmission flow. End-to-end flow control of the RDMA network card is achieved, and the intermediate switch is used as a transparent transmission node to reduce the impact of the intermediate switch on the transmission flow. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a schematic diagram of an implementation scenario of the network traffic control method of the RDMA network card provided in an embodiment of the present application.

[0052] Figure 2 A schematic diagram of the transmission window provided in an embodiment of the present application.

[0053] Figure 3 This is a flow chart of a network traffic control method for an RDMA network card provided in an embodiment of the present application.

[0054] Figure 4 It is a schematic diagram of calculating the transmission distance in an embodiment of the present application.

[0055] Figure 5 This is a flowchart of generating transmission permission information of a sub-transmission window based on resource data of the sub-transmission window provided by an embodiment of the present application.

[0056] Figure 6 This is a flowchart of encapsulating at least one information message based on a sub-window baseline provided by an embodiment of the present application.

[0057] Figure 7 This is a schematic diagram of an information message feedback node provided in an embodiment of the present application.

[0058] Figure 8 This is a schematic diagram of the information message sending process of the sub-transmission window provided in an embodiment of the present application.

[0059] Figure 9 A schematic diagram of a process for updating a sub-window baseline of a next sub-transmission window based on a transmission status and a transmission distance provided in an embodiment of the present application.

[0060] Figure 10 This is an overall flow chart for updating the sub-window baseline of the next sub-transmission window provided in an embodiment of the present application.

[0061] Figure 11 Schematic diagram of the maximum sub-window baseline provided in an embodiment of the present application.

[0062] Figure 12 This is a schematic diagram of sub-window baseline adjustment provided in an embodiment of the present application.

[0063] Figure 13 This is a module diagram of the network traffic control method of the RDMA network card provided in an embodiment of the present application.

[0064] Figure 14 This is a structural block diagram of a network traffic control device for an RDMA network card provided in another embodiment of the present application.

[0065] Figure 15 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0067] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flowchart.

[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0069] Remote Direct Memory Access (RDMA) allows a local node to directly access the memory of a remote node through RDMA. This directness means that remote memory can be read and written just like local memory access (Direct Memory Access, DMA), bypassing the complex TCP / IP network protocol stack of traditional Ethernet. This process is invisible to the remote node, meaning that no CPU involvement is required. The majority of the read and write work is performed by hardware, not software.

[0070] The implementation of RDMA transmission solutions in related technologies has high requirements for the hardware environment. Most of them are based on switches within the data center or switches plus network cards, so they are highly dependent on switches. However, due to the long-distance and complex network topology structure of the interconnection between data centers, solutions with less dependence on switches are required. For example, the RoCE (RDMA over Converged Ethernet) protocol based on the Ethernet link layer or the iWARP (Internet Wide Area RDMA Protocol) protocol based on TCP. However, the RoCE protocol mechanism itself has certain transmission losses, and the iWARP protocol also has certain transmission losses when the TCP connection is unreliable. Therefore, the RDMA transmission solutions in related technologies have poor transmission performance during network traffic control.

[0071] Based on this, embodiments of the present application provide a network flow control method and related apparatus for an RDMA network card. This method implements flow control using a two-level window approach during RDMA transmission, where a sub-transmission window is used for window updates and a transmission window is used for overall control. Furthermore, the sub-window baseline of the next sub-transmission window is updated in real time based on the transmission status and transmission distance to better adapt to the actual transmission flow. This method implements end-to-end flow control for the RDMA network card, using the intermediate switch as a transparent transmission node to reduce the impact of the intermediate switch on transmission flow.

[0072] The embodiments of the present application provide a network traffic control method and related devices for an RDMA network card, which are specifically described through the following embodiments. First, the network traffic control method for an RDMA network card in the embodiments of the present application is described.

[0073] The network traffic control method of the RDMA network card provided in the embodiment of the present application relates to the field of communication technology. The network traffic control method of the RDMA network card provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be a computer program running in the terminal or the server side. For example, the computer program can be a native program or software module in the operating system; it can be a local (Native) application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a client that supports the network traffic control of the RDMA network card, or it can be a small program, that is, a program that can be run only by downloading it into the browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in. Among them, the terminal communicates with the server through the network. The network traffic control method of the RDMA network card can be executed by the terminal or the server, or by the terminal and the server in collaboration.

[0074] In some embodiments, the terminal can be a smartphone, tablet computer, laptop computer, desktop computer, or smartwatch. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It can also be a service node in a blockchain system, where each service node in the blockchain system forms a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP). The terminal and server can be connected via Bluetooth, Universal Serial Bus (USB), or a network, etc., and this embodiment does not impose any restrictions on this.

[0075] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0076] First refer to Figure 1 , Figure 1 This is a schematic diagram of an implementation scenario of the network traffic control method of the RDMA network card provided in an embodiment of the present application.

[0077] Figure 1 The sender and receiver are included. The sender uses the network to send a piece of data to be transmitted in the sender's memory to the receiver. The sender's RDMA network card (RNIC) sends the data to be transmitted through the transmission window. Each transmission window corresponds to a fragment of data.

[0078] An RDMA network adapter is a specialized network adapter for Remote Direct Memory Access (RDMA). It establishes a direct memory-mapped channel between the source and target computers, allowing one computer to directly access the other's memory over the network without CPU or operating system intervention. RDMA network adapters typically support various RDMA protocols, such as InfiniBand and RoCE (RDMA over ConvergedEthernet).

[0079] In one embodiment, in order to improve transmission efficiency and reliability, the transmission windows are graded in the embodiment of the present application, and each transmission window includes at least one sub-transmission window. Through this division method, the data corresponding to the transmission window is further subdivided into smaller data blocks to better control the speed and order of data transmission.

[0080] It will be appreciated that each sub-transmission window includes at least a starting address, a sub-window baseline, and a window sequence number. The starting address indicates the starting location of the data corresponding to the sub-transmission window in memory; the sub-window baseline indicates the size of the sub-transmission window, i.e., the amount of data to be sent; and the window sequence number identifies the order of each sub-transmission window, allowing the receiver to correctly reassemble the data. When the sender prepares to send the data related to a specific transmission window, it divides the data into multiple sub-transmission windows according to the sub-transmission window format and sends them to the receiver one by one. After receiving the relevant data, the receiver reassembles it according to the window sequence number to restore the original data order. This method achieves efficient data transmission, allowing the sender to dynamically adjust the transmission speed based on network conditions and the receiver's processing power. It also provides a certain degree of error recovery. If the data in a sub-transmission window is lost or damaged, the data can be repaired by resending the sub-transmission window.

[0081] Reference Figure 2 , Figure 2 A schematic diagram of the transmission window provided in an embodiment of the present application. Figure 2 N transmission windows are shown, which are illustrated by win1, win2, win3, ..., winN, wherein each transmission window includes M sub-transmission windows, which are illustrated by sub_winX. For example, the i-th sub-transmission window of win1 is represented as sub_win1i, and the M-th sub-transmission window of winN is represented as sub_winNM.

[0082] The following describes a method for controlling network traffic of an RDMA network card in an embodiment of the present application.

[0083] Figure 3 This is an optional flow chart of the network traffic control method of the RDMA network card provided in the embodiment of the present application. Figure 3 The method may include but is not limited to steps 110 to 140. It is also understood that this embodiment is Figure 3 The order of step 110 to step 140 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.

[0084] Step 110: In response to a transmission request corresponding to a task queue element, obtain at least one transmission window and a sub-window baseline of a sub-transmission window of each transmission window according to transmission parameters of the data to be transmitted.

[0085] In one embodiment, in RDMA transmission, the control plane sends a work queue element (WQE) to the task management module, triggering the task management module to start a data request operation. Specifically, when an application needs to perform data transmission via RDMA, it first creates a work queue element and adds it to the task queue. This work queue element contains information such as the source memory address, the target memory address, and the data length. The control plane then takes the work queue element out of the task queue and passes it to the task management module. After receiving the work queue element, the task management module determines the current data transmission request based on the information therein. Therefore, in an embodiment of the present application, in response to the transmission request corresponding to the work queue element, prepare to perform RDMA data transmission, and control network traffic during the data transmission process.

[0086] Next, in one embodiment, at least one transmission window and a sub-window baseline of each transmission window are obtained in advance based on transmission parameters of the data to be transmitted. This process is described as follows: obtaining transmission parameters, which include one or more of link bandwidth, optical device conversion rate, transmission distance, distance incorporation rate, maximum transmission unit (MTU), and number of sub-windows, wherein a first data relationship exists between the number of sub-windows and the maximum transmission unit (MTU), and a second data relationship exists between the distance incorporation rate and the transmission distance. Then, at least one transmission window is calculated based on the transmission parameters, and a sub-window baseline is calculated based on the number of sub-windows.

[0087] The complete calculation process mentioned above is described below.

[0088] First, in order to fully utilize the high throughput performance of RDMA in the embodiment of the present application, the RDMA transmission process is set to be continuously sent under an ideal state, and the transmission window for sending is expressed as:

[0089] swnd=BW×RTT

[0090] Here, swnd represents the transmission window, BW represents the link bandwidth, and is expressed in bytes. For example, for a 100 Gbps network card, the link bandwidth can be 1000000000000 / 8 = 125000000000 bytes. RTT (Round-Trip Time) represents the round-trip transmission time.

[0091] When the transmission distance between the sender and the receiver is expressed as Distance (km), the ideal value of the transmission time RTT during the optical transmission process is:

[0092]

[0093] Among them, V lightRepresents the speed of light. When a signal is transmitted in an optical fiber, the transmission rate is about 2 / 3 of the speed of light. Therefore, the transmission time in the optical fiber is approximately:

[0094]

[0095] In the actual transmission process, there will be processing processes of intermediate optical devices, etc. Therefore, in order to quantify the delay effect of this processing process on the transmission process, the embodiment of the present application introduces the optical device conversion rate λ r Among them, the optical equipment conversion rate λ r The value of is [0.5~0.9], for example, it can be 0.6.

[0096] Then the actual transmission time in the optical fiber is approximately:

[0097]

[0098] Assuming the speed of light is 300,000 km / s, the actual transmission time in optical fiber is approximately:

[0099]

[0100] According to the above formula, the relationship between transmission time and transmission distance is expressed as:

[0101] Distance=RTT×λ r ×10 5

[0102] In one embodiment, the transmission distance between the sender and the receiver can be calculated during the negotiation phase before transmission. Figure 4 , Figure 4 It is a schematic diagram of calculating the transmission distance in an embodiment of the present application.

[0103] During negotiation, the sender first sends a request for negotiation of other parameters to the receiver, and the receiver returns a request response result. Next, the receiver sends a reference message with a timestamp Tn to the receiver. After receiving the corresponding reference message, the receiver generates a corresponding response message and returns the timestamp value intact to the sender. After receiving the response message, the sender records the received timestamp Tn' and calculates the round-trip time from the difference between the two timestamps. Through multiple negotiation processes, an average response time RTT is calculated. dis , expressed as:

[0104]

[0105] Here, m represents the negotiation process, which is no less than three times. The figure shows three negotiation processes, and the timestamps carried in these three negotiation processes are T1, T2 and T3 respectively.

[0106] The response time RTT dis Substituting the transmission time into the relationship between transmission time and transmission distance, the current transmission distance can be calculated.

[0107] After obtaining the transmission distance, link bandwidth, and optical device conversion rate, the transmission window can be calculated. The transmission window is expressed as:

[0108]

[0109] Therefore, the transmission window can be calculated based on part of the transmission parameters, such as link bandwidth, optical equipment conversion rate, and transmission distance. The calculation process of the sub-window baseline is described below.

[0110] In one embodiment, the distance incorporation rate λ is introduced c To quantify the number of connections or operations that can be active simultaneously during RDMA transmission in a multi-QP (Queue Pair) environment, the transmission window is updated to:

[0111]

[0112] In one embodiment, the data to be transmitted needs to be encapsulated according to the Maximum Transmission Unit (MTU) size during the transmission process. Therefore, the number of packets corresponding to each transmission window is P. c Expressed as:

[0113]

[0114] When the number of sub-windows in a sub-transmission window is θ, θ is set according to the actual hardware capability. At this time, the number of messages in the sub-transmission window is P s Expressed as:

[0115]

[0116] Next, align the sub-transmission windows according to the n-bit width to obtain the actual sub-window baseline P s_base , expressed as:

[0117] P s_base =[(P s +2 n -1)>>n]< <n

[0118] The above-mentioned n-bit width is 4 to 8 according to the hardware capability, for example, it can be 4.

[0119] Specifically, the number of packets in the sub-transmission window P s The operation of aligning to n-bit width is realized by shifting. First, Ps +2 n -1 ensures that P s +2 n -1 is adjusted to a number divisible by 2 before alignment, ensuring that no packet information is lost during the alignment operation in the next step. Then, the ">>n" operation is used to shift the adjusted value n bits to the right, which is equivalent to dividing the value by 2 n to obtain a quotient aligned based on 2 n . Finally, through the "<<n" operation, the obtained quotient is shifted n bits to the left, that is, multiplied by 2 n to obtain the final sub-window baseline P n . Through this operation, it is ensured that the sub-window baseline P s_base can effectively reflect the actual data volume in the sub-transmission window and can improve the data processing speed and reduce the boundary error through memory alignment. This is particularly important for concurrent operations in a multi-QP environment because the synchronization and interoperability between multiple QPs require high data consistency and low latency.

[0120] Next, after obtaining the sub-window baseline monkey, the window baseline P of the transmission window can also be obtained according to the sub-window baseline c_base , which is expressed as:

[0121] P c_base = P s_base × θ

[0122] where the minimum transmission unit MTU is the result of negotiation between the sender and the receiver. For example, it can take values such as 256, 512, 1024, 2048, 4096, etc., and the minimum transmission unit affects the number of sub-windows. There is a first data relationship between them: the number of sub-windows θ is selected according to the reverse index of the MTU. For example, when the minimum transmission unit MTU is 256, the number of sub-windows θ is 8. An example of the first data relationship is as follows:

[0123]

[0124] In one embodiment, according to the transmission protocol definition of RDMA, the timer for the expected maximum time interval is expressed as:

[0125] Timeout = 4.096 μsec × 2 Interval

[0126] where Interval represents the timer interval and Timeout represents the expected maximum time interval.

[0127] Theoretically, the expected maximum time interval should be slightly greater than the transmission time of the packet. In the embodiment of the present application, half of the expected maximum time interval Timeout is used as the response time RTT​dis During the estimation process of transmission distance, assuming the optical equipment conversion rate λ r is 0.6, and the data relationship between the timer interval and the transmission distance can be obtained, as shown in Table 1 below.

[0128]

[0129]

[0130] Table 1 Data relationship between timer interval and transmission distance

[0131] As can be seen from the above, in one embodiment, based on the data relationship in Table 1, if the transmission distance is known, a reasonable timer can be adaptively set, or conversely, an adaptive transmission distance can be set for a manually set timer. By adaptively setting reasonable parameters in this way, data stability and accuracy during the transmission process are improved.

[0132] In one embodiment, since the transmission distance affects the distance integration rate, the timer interval and the distance integration rate λ are determined according to the actual measurement results. c There exists a second data relationship between them, expressed as:

[0133]

[0134] In one embodiment, in combination with the above calculation process, the transmission parameters are calculated by taking a 100 Gbps port as an example. Assuming that the optical equipment conversion rate λ r Take 0.6, the maximum transmission unit MTU is 1024, the number of sub-windows is 6, and the light rate is 200000. At this time, the public information is shown in Table 2 below.

[0135] Link bandwidth (Bps) Fiber speed (km) Optical equipment discount rate Conversion rate MTU Number of subwindows 12500000000 200000 0.6 120000 1024 6

[0136] Table 2 shows the public information. Next, the transmission parameters calculated based on the public information in Table 2 are shown in Table 3 below.

[0137] Distance(km) Distance incorporation rate RTT(us) Window Bytes PC Ps <![CDATA[P s_base ]]> <![CDATA[P c_base ]]> 120 128 2000 195312.5 191 32 32 192 2400 512 40000 976562.5 954 159 160 960

[0138] After obtaining the sub-window baselines of at least one transmission window and each transmission window's sub-transmission window, the amount of fragmented data to be sent for each transmission window and the amount of fragmented data for each sub-transmission window can be determined. The embodiment of the present application further adjusts the amount of data transmitted by each sub-transmission window within the transmission window, as described below.

[0139] Step 120: Under the transmission window, the transmission permission information of the sub-transmission window is generated according to the resource data of the sub-transmission window.

[0140] In one embodiment, the process of generating the transmission permission information of the sub-transmission window based on the resource data of the sub-transmission window specifically includes: querying the resource data corresponding to the current sub-transmission window from the window management information; if the resource data exists, adjusting the transmission permission information to the sending state; if the resource data does not exist, generating the resource data, updating the start and end information messages of the sub-transmission window, and adjusting the transmission permission information to the sending state; if the resource data cannot be generated, adjusting the transmission permission information to the stop state.

[0141] Reference Figure 5 , Figure 5 This is a flowchart of generating transmission permission information of a sub-transmission window based on resource data of the sub-transmission window provided by an embodiment of the present application.

[0142] Combine Figure 5 In the embodiment of the present application, during the RDMA transmission process, a window management module is used to manage the resource allocation of each transmission window and sub-transmission window. The window management module can be used to maintain and manage the status of the sending window. Therefore, the window management module includes current window management information, such as window size, window position, and other information. Therefore, the currently sent transmission window or sub-transmission window can be determined based on the window management information. For each transmission window, if the resource data corresponding to the current sub-transmission window is queried from the window management information, this resource data is called a sub-window management information block. If a sub-window management information block exists, it means that the resources required for transmission have been previously allocated to this sub-transmission window. In this case, the transmission permission information of the sub-transmission window is updated to the sending state. In other words, the sub-transmission window can perform or continue to send data. This is because the fragmented data of each sub-transmission window in the embodiment of the present application can be divided into one or more data packets for transmission. Next, if the sub-window management information block does not exist, a new sub-transmission window needs to be created to send the data packet. At this point, resource data corresponding to the new sub-transmission window needs to be created. If the creation is successful, the information packets at the start and end positions of the sub-transmission window, as well as the information packets to be sent in the middle, are determined. At the same time, the transmission permission information is adjusted to the send state, indicating that the data in the sub-transmission window can be sent. If the creation fails and the resource data cannot be generated, that is, there are insufficient resources to support the send operation of the new sub-transmission window, the transmission permission information is adjusted to the stop state.

[0143] Next, the flow control decision process is carried out.

[0144] Step 130: When the transmission permission information indicates that the sub-transmission window is in a sending state, encapsulate at least one information message based on the sub-window baseline and transmit the information message to the receiver.

[0145] In one embodiment, the information message includes an identifier for instructing the receiver to generate a feedback message based on the reception result of the information message. If the transmission permission information indicates that the sub-transmission window is in the sending state, the information message can be encapsulated and sent. Figure 6 , Figure 6 This is a flowchart of encapsulating at least one information message based on a sub-window baseline provided by an embodiment of the present application, specifically including the following steps:

[0146] Step 610: Obtain data to be transmitted based on the task queue element.

[0147] Step 620: Determine the data content in the information message according to the sub-window baseline, and generate a message sequence number according to the transmission order of the information message.

[0148] In one embodiment, data to be transmitted is read from memory based on task queue elements, and then the corresponding fragmented data for each transmission window is determined based on the window baseline of the transmission window. The fragmented data is then further divided based on sub-transmission windows. It will be understood that, in theory, the amount of data to be transmitted in each sub-transmission window can be determined based on the sub-window baseline of each sub-transmission window. In the embodiment of the present application, the sub-window baseline corresponding to the first sub-transmission window is calculated based on the transmission parameters. The sub-window baselines of subsequent sub-transmission windows are updated in real time based on the actual transmission situation. The update process is described in detail below.

[0149] The embodiment of the present application obtains the data content corresponding to each information message in the current sub-transmission window based on the sub-window baseline. Since the number of information messages in each sub-transmission window can be multiple, the message sequence number corresponding to each information message is also generated according to the transmission order of the information messages.

[0150] Step 630: Based on the message sequence numbers, the first information message of the transmission window and the last information message of each sub-transmission window are used as information messages to be fed back.

[0151] Since each sub-transmission window has several information messages to be transmitted, in order to avoid the accumulation of errors caused by transmission errors of some information messages, the receiver needs to provide feedback on the reception results of some information messages. Considering that the sub-transmission window is sent continuously, the information messages in the sub-transmission window are also sent continuously. Therefore, in order to reduce the number of feedbacks, refer to Figure 7 , Figure 7This is a schematic diagram of the information message feedback node provided by an embodiment of the present application. The first information message of a transmission window and the last information message of each sub-transmission window are used as information messages to be fed back. The receiver is required to provide feedback in the information messages to be fed back. This allows the accuracy of the transmitted data in each sub-transmission window to be determined. This eliminates the need for frequent feedback, saves transmission bandwidth, and reduces computing costs. It is understood that the first information message of the data to be transmitted and the first information message of the first sub-transmission window of the first transmission window are duplicated.

[0152] In one embodiment, referring to Figure 8 , Figure 8 This is a schematic diagram of the information message sending process of the sub-transmission window provided in an embodiment of the present application. Figure 8 Taking one of the transmission windows as an example, the first information message of sub-transmission window 0 (the first sub-transmission window), the last information message of sub-transmission window 0, the last information message of sub-transmission window 1, etc., need to be fed back by the receiver.

[0153] Step 640: Set the identifier of the information message to be fed back to one, and set the identifiers of other information messages to zero.

[0154] In one embodiment, in order to allow the receiver to distinguish the information message to be fed back from the information message, the A (Acknowledge Request) field in the BTH (Base Transport Header) header of the information message is used as an identifier, the identifier in the information message to be fed back is set to 1, and the identifiers of other information messages are set to 0. For example: the identifier of the first information message of a transmission task, that is, the first information message of the first transmission window, is set to 1. The identifier of the last information message of the transmission task, that is, the last information message of the last sub-transmission window of the last transmission window, is set to 1. The identifier of the last information message of each sub-transmission window is set to 1. The identifiers of other information messages are all set to 0.

[0155] Next, in one embodiment, the corresponding information message is sent and the expected feedback message is received. Feedback messages include ACK (Acknowledgment) messages and NAK (Negative Acknowledgment) messages. If the receiver successfully receives the information message to be fed back, it sends an ACK message as feedback to the sender, indicating that the information message has been correctly received. If the receiver does not receive the information message to be fed back, or if other errors occur, it sends a NAK message as feedback to the sender, indicating that the information message needs to be resent.

[0156] Step 140: Acquire the feedback message generated by the receiver, obtain the transmission status and transmission distance according to the feedback message, and update the sub-window baseline of the next sub-transmission window based on the transmission status and transmission distance.

[0157] In one embodiment, after sending the first sub-transmission window, the sender needs to update the sub-window baselines of subsequent sub-transmission windows in real time based on feedback messages generated by the receiver. The feedback messages can be used to determine the transmission status. For example, if the feedback message is received later than the expected time, the status is considered poor; if it is close to the expected time, the status is considered good. The expected time here is set by the sender based on actual needs.

[0158] In one embodiment, combining Figure 8 According to the time difference between the sending time of the to-be-feedback message and the receiving time of the corresponding feedback message, combined with the relationship between the transmission time and the transmission distance, the real-time transmission distance corresponding to the current sub-transmission window can also be determined.

[0159] After obtaining the transmission distance and transmission status, it is determined whether the sub-window baseline of the next transmission window needs to be updated. Figure 9 , Figure 9 The flowchart of updating the sub-window baseline of the next sub-transmission window based on the transmission status and transmission distance provided in the embodiment of the present application specifically includes the following steps:

[0160] Step 910: Determine and update the next sub-transmission window according to the message sequence number of the ACK message.

[0161] In one embodiment, referring to Figure 10 , Figure 10 This is an overall flow chart for updating the sub-window baseline of the next sub-transmission window provided in an embodiment of the present application.

[0162] First, when the feedback message is an ACK message, it is determined whether the information message corresponding to the current sub-transmission window has been transmitted. Only when the information message transmission of the current sub-transmission window is completed can the next sub-transmission window be switched.

[0163] In one embodiment, the sub-transmission window corresponding to the message sequence number of the ACK message is obtained, and the minimum sequence number to be confirmed is obtained based on the sub-transmission window. When the message sequence number of the ACK message is greater than or equal to the minimum sequence number to be confirmed, it is determined to switch to the next sub-transmission window. The minimum sequence number to be confirmed may be the sequence number of the first information message in the sub-transmission window.

[0164] Combine Figure 8If the current state is sub-transmission window 0, and the ACK message at this time is the feedback message corresponding to the first information message, then the minimum sequence number to be confirmed is the message sequence number corresponding to the first information message. At this time, the message sequence number of the ACK message is greater than the current minimum sequence number to be confirmed, and the sub-window baseline of sub-transmission window 1 can be updated. At this time, the information message of sub-transmission window 1 has not yet been transmitted, so the data size of the information message therein can be determined according to the updated sub-window baseline. At the same time, sub-transmission window 0 continues to transmit information messages until the transmission is completed. Next, for sub-transmission window 1, an ACK message is received during its data transmission phase. At this time, its corresponding minimum sequence number to be confirmed is the message sequence number corresponding to the first information message of sub-transmission window 1. Based on this, the sub-window baseline of the next sub-transmission window can be updated.

[0165] Step 920: Update the transmission distance based on the ACK message, generate the transmission status of the current sub-transmission window, and obtain the distance change information of the transmission distance corresponding to the adjacent sub-transmission window.

[0166] In one embodiment, to update the sub-window baseline of the next sub-transmission window, it is necessary to obtain the current transmission performance data. The embodiment of the present application updates the transmission distance according to the ACK message, generates the transmission status of the current sub-transmission window, and obtains the distance change information of the transmission distance corresponding to the adjacent sub-transmission window. Figure 10 If it is the first transmission of the first sub-transmission window, the transmission distance calculated by the transmission parameters is used as the default value, and the default value of the transmission status is set. The default value can be a pending status, and the transmission status is updated after receiving the ACK message.

[0167] In the case of non-first transmission, the sender has received an ACK message returned by at least one receiver, obtains the sending timestamp of the information message indicating the generation of the ACK message and the receiving timestamp of the ACK message, generates the time difference between the receiving timestamp and the sending timestamp, and then calculates the transmission distance based on the time difference and the optical equipment conversion rate according to the relationship between the transmission time and the transmission distance.

[0168] The calculated real-time transmission distance is compared with the transmission distance corresponding to the previous sub-transmission window to generate distance change information.

[0169] Step 930: When the distance change information indicates that the transmission distance is decreasing, increase the sub-window baseline of the next sub-transmission window based on the transmission status; otherwise, decrease the sub-window baseline of the next sub-transmission window based on the transmission status.

[0170] In one embodiment, combining Figure 10If the distance change information indicates that the transmission distance has become shorter, it means that the transmission performance has improved. Therefore, the sub-window baseline can be expanded to increase the amount of data sent each time. Specifically, each ACK message can generate a transmission status. Therefore, the previous transmission status is obtained for reference. If the previous transmission status is poor and the current transmission status is good, it means that the transmission performance is improving. Therefore, the sub-window baseline can be quickly increased. For example, the maximum sub-window baseline under the transmission window is obtained, and then the sub-window baseline of the next sub-transmission window is directly adjusted to the maximum sub-window baseline. It can be understood that in the embodiment of the present application, the sub-window baseline in the transmission window will not be less than the sub-window baseline initially calculated according to the transmission parameters.

[0171] Reference Figure 11 , Figure 11 Schematic diagram of the maximum sub-window baseline provided in an embodiment of the present application. Figure 11 The sub-window baselines in the transmission window are sorted. The smallest one is the sub-window baseline initially calculated according to the transmission parameters, that is, base in the figure. The largest sub-window baseline is max in the figure. max is greater than the sub-window baseline level_1, the sub-window baseline level_1 is greater than the sub-window baseline level_2, ..., and then when rapidly increasing, the corresponding sub-window baseline can be directly adjusted to the maximum sub-window baseline max.

[0172] Reference Figure 12 , Figure 12 This is a schematic diagram of sub-window baseline adjustment provided in an embodiment of the present application. Figure 12 The sub-window baselines from sub-transmission window T1 to sub-transmission window T3 are continuously increasing, the sub-window baselines from sub-transmission window T4 to sub-transmission window T5 are continuously decreasing, and the sub-window baseline of sub-transmission window T6 is increasing. Therefore, the previous transmission state is poor, and the current transmission state is good, indicating that the transmission performance is improving. The sub-window baselines of the sub-transmission windows are switched to the maximum sub-window baseline, that is, the sub-window baseline corresponding to sub-transmission window T3.

[0173] Furthermore, assuming that network performance continues to improve, the subwindow baselines of subsequent sub-transmission windows can be incremented by a first preset ratio based on the previous subwindow baseline. The maximum subwindow baseline needs to be updated after each increment. This increment is stopped when the distance change information indicates an increase in transmission distance, indicating that network transmission performance may be deteriorating. The first preset ratio can be 10%, which can be adjusted based on actual conditions.

[0174] In one embodiment, if the distance change information indicates that the transmission distance has increased, it is necessary to reduce the sub-window baseline of the next sub-transmission window based on the transmission status. Figure 10At this point, the actual distance change of the transmission distance is obtained. If the distance change exceeds a preset distance threshold, it is considered that the network performance has degraded significantly, and the sub-window baseline of the next sub-transmission window is directly reduced by a second preset ratio. The second preset ratio here can be 10%, which can be adjusted according to actual conditions.

[0175] If the distance change does not exceed the preset distance threshold, the sub-window baseline of the next sub-transmission window can be adjusted in combination with the previous transmission status. Figure 10 If the previous transmission state was good, considering that network performance has deteriorated, the current transmission state is adjusted to poor, and the number of states is recorded as 1 to facilitate subsequent decision-making. If the previous transmission state was also poor, the number of consecutive poor states is obtained. When the number of states exceeds a preset state threshold, it can also indicate that the network performance has deteriorated significantly, and the sub-window baseline of the next sub-transmission window can be reduced by a third preset ratio. The third preset ratio here can be 10%, which can be adjusted according to actual conditions.

[0176] Similarly, if the transmission distance has not decreased and the transmission status is good, subsequent sub-transmission windows can be gradually reduced according to the third preset ratio. At the same time, the minimum sub-window baseline needs to be recorded to ensure that it does not fall below the basic sub-window baseline initially calculated based on the transmission parameters. It is understood that after the sub-window baseline in a transmission window changes, the number of sub-transmission windows can be dynamically adjusted based on actual conditions within the framework of the window baseline of the transmission window.

[0177] In one embodiment, when the feedback message is a NAK message or the ACK message is not received for a long time, the sub-window baseline is directly reduced according to a fourth preset ratio. The fourth preset ratio here may be 10%, which can be adjusted according to actual conditions.

[0178] In one embodiment, referring to Figure 13 , Figure 13 This is a module diagram of the network traffic control method of the RDMA network card provided in an embodiment of the present application.

[0179] The window management module executes step 1. In response to a transmission request corresponding to a task queue element, it obtains the subwindow baselines of at least one transmission window and each sub-transmission window of each transmission window based on the transmission parameters of the data to be transmitted. Next, step 2 is executed. The control plane sends the task queue element to the task management module, triggering the task management module to initiate data requests. The flow control decision module executes steps 3, 4, 5, and 6. Within the transmission window, it generates transmission permission information for the sub-transmission window based on the resource data of the sub-transmission window. After the flow control decision module determines that transmission is permitted, step 7 enters the data transmission module for transmission processing. When the transmission permission information indicates that the sub-transmission window is in the sending state, the data transmission module encapsulates at least one information message based on the sub-window baseline and transmits the information message to the receiver. Next, step 8 is executed. The receiving module is responsible for triggering an update of the sub-window baseline of the sub-transmission window based on an ACK message or NAK message received from the receiver. In step 9, the evaluation and update module determines whether to update based on the transmission distance and transmission status. In step 10, the window management module manages the update of the sub-window baseline.

[0180] The embodiment of the present application is an RDMA network card that supports the RoCEv2 protocol. It uses one or more of the link bandwidth, optical device conversion rate, transmission distance, distance incorporation rate, maximum transmission unit, and number of sub-windows to calculate the sub-window baseline, so that the window division process can be more adaptable to a changing environment. In addition, the transmission window is further classified into sub-transmission windows using a hierarchical window method. The sub-transmission window is used for fast calculation and update, and the transmission window controls the overall sliding window process. And adopts a strategy of rising fast and falling slow. When the speed reduction is triggered, the window is slowly lowered, and when the window is restored, the window is quickly raised to improve the update efficiency of the sub-window baseline.

[0181] The technical solution provided by the embodiment of the present application obtains the subwindow baseline of at least one transmission window and each sub-transmission window of each transmission window based on the transmission parameters of the data to be transmitted. Within the transmission window, transmission permission information for the sub-transmission window is generated based on the resource data of the sub-transmission window. When the transmission permission information indicates that the sub-transmission window is in the sending state, at least one information message is encapsulated based on the subwindow baseline and transmitted to the receiver. The information message includes an identifier for instructing the receiver to generate a feedback message based on the reception result of the information message. The feedback message generated by the receiver is obtained, and the transmission status and transmission distance are obtained based on the feedback message. The subwindow baseline of the next sub-transmission window is updated based on the transmission status and transmission distance. In the embodiment of the present application, a two-level window approach is used for flow control during the RDMA transmission process, wherein the sub-transmission window is used for window update and the transmission window is used for overall control. The subwindow baseline of the next sub-transmission window is also updated in real time based on the transmission status and transmission distance to better adapt to the actual transmission traffic. End-to-end flow control of the RDMA network card is implemented, and the intermediate switch is used as a transparent transmission node to reduce the impact of the intermediate switch on the transmission traffic.

[0182] The embodiment of the present application also provides a network traffic control device for an RDMA network card, which can implement the network traffic control method of the RDMA network card. Figure 14 , the device comprises:

[0183] Parameter calculation module 1410: for responding to a transmission request corresponding to a task queue element, and obtaining a sub-window baseline of at least one transmission window and a sub-transmission window of each transmission window according to transmission parameters of the data to be transmitted.

[0184] The permission acquisition module 1420 is configured to generate transmission permission information of the sub-transmission window according to the resource data of the sub-transmission window under the transmission window.

[0185] Data generation and sending module 1430: used to encapsulate at least one information message based on the sub-window baseline when the transmission permission information indicates that the sub-transmission window is in a sending state, and transmit the information message to the receiver, wherein the information message includes an identifier for instructing the receiver to generate a feedback message according to the reception result of the information message.

[0186] Update module 1440: used to obtain the feedback message generated by the receiver, obtain the transmission status and transmission distance according to the feedback message, and update the sub-window baseline of the next sub-transmission window based on the transmission status and the transmission distance.

[0187] The specific implementation of the network traffic control device for the RDMA network card of this embodiment is substantially the same as the specific implementation of the network traffic control method for the RDMA network card described above, and will not be described in detail here.

[0188] An embodiment of the present application further provides an electronic device, including:

[0189] at least one memory;

[0190] at least one processor;

[0191] at least one program;

[0192] The program is stored in the memory, and the processor executes the at least one program to implement the network traffic control method of the RDMA network card implemented in this application. The electronic device can be any intelligent terminal including a server, a mobile phone, a tablet computer, a personal digital assistant (PDA), an in-vehicle computer, etc.

[0193] See also Figure 15 , Figure 15 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:

[0194] The processor 1501 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0195] The memory 1502 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1502 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program codes are stored in the memory 1502, and the processor 1501 calls and executes the network traffic control method of the RDMA network card in the embodiments of this application.

[0196] Input / output interface 1503, used to implement information input and output;

[0197] Communication interface 1504, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and

[0198] Bus 1505 , which transmits information between various components of the device (e.g., processor 1501 , memory 1502 , input / output interface 1503 , and communication interface 1504 );

[0199] The processor 1501 , the memory 1502 , the input / output interface 1503 and the communication interface 1504 are connected to each other in communication within the device via the bus 1505 .

[0200] An embodiment of the present application further provides a storage medium, which is a storage medium storing a computer program. When the computer program is executed by a processor, the network traffic control method of the RDMA network card is implemented.

[0201] The memory, as a non-transient storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0202] The network flow control method and related device for an RDMA network card proposed in an embodiment of the present application obtains a subwindow baseline for at least one transmission window and a subwindow of each transmission window based on the transmission parameters of the data to be transmitted. Within the transmission window, transmission permission information for the subwindow is generated based on the resource data of the subwindow. When the transmission permission information indicates that the subwindow is in the sending state, at least one information message is encapsulated based on the subwindow baseline and transmitted to the receiver. The information message includes an identifier for instructing the receiver to generate a feedback message based on the reception result of the information message. The feedback message generated by the receiver is obtained, and the transmission status and transmission distance are obtained based on the feedback message. The subwindow baseline of the next subwindow is updated based on the transmission status and transmission distance. In the embodiment of the present application, a two-level window approach is used for flow control during the RDMA transmission process, wherein the subwindow is used for window update and the transmission window is used for overall control. The subwindow baseline of the next subwindow is updated in real time based on the transmission status and transmission distance to better adapt to the actual transmission flow. End-to-end flow control of the RDMA network card is achieved, and the intermediate switch is used as a transparent transmission node to reduce the impact of the intermediate switch on the transmission flow.

[0203] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0204] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0205] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0206] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0207] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0208] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0209] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0210] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0211] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0212] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0213] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A network traffic control method for an RDMA network card, characterized in that: include: In response to a transmission request corresponding to a task queue element, obtaining, according to transmission parameters of data to be transmitted, at least one transmission window and a sub-window baseline of a sub-transmission window of each transmission window, wherein the sub-window baseline is used to indicate a size of the sub-transmission window; generating, under the transmission window, transmission permission information of the sub-transmission window according to resource data of the sub-transmission window; When the transmission permission information indicates that the sub-transmission window is in a sending state, encapsulating at least one information message based on the sub-window baseline, and transmitting the information message to a receiver, wherein the information message includes an identifier for instructing the receiver to generate a feedback message according to a reception result of the information message; Obtain a feedback message generated by the receiver, and obtain a transmission status and a transmission distance based on the feedback message, wherein the feedback message includes an ACK message, and determine to update the next sub-transmission window based on the message sequence number of the ACK message; update the transmission distance based on the ACK message, generate the transmission status of the current sub-transmission window, and obtain distance change information of the transmission distance corresponding to the adjacent sub-transmission window; when the distance change information indicates that the transmission distance becomes smaller, increase the sub-window baseline of the next sub-transmission window based on the transmission status; otherwise, reduce the sub-window baseline of the next sub-transmission window based on the transmission status.

2. The network traffic control method of the RDMA network card according to claim 1, characterized in that: The increasing the sub-window baseline of the next sub-transmission window based on the transmission state includes: The current transmission state is poor, and the current transmission state is good, obtaining a maximum sub-window baseline under the transmission window, and adjusting the sub-window baseline of the next sub-transmission window to the maximum sub-window baseline; The sub-window baselines of the subsequent sub-transmission windows are incrementally increased according to a first preset ratio based on the previous sub-window baseline, and the maximum sub-window baseline is updated until the distance change information indicates that the transmission distance becomes longer.

3. The network traffic control method of the RDMA network card according to claim 1, characterized in that: The reducing the sub-window baseline of the next sub-transmission window based on the transmission state includes: Obtaining a distance change of the transmission distance; When the distance variation exceeds a preset distance threshold, the sub-window baseline of the next sub-transmission window is reduced according to a second preset ratio; otherwise, the sub-window baseline of the next sub-transmission window is adjusted in combination with the previous transmission state.

4. The network traffic control method of the RDMA network card according to claim 3, characterized in that: The adjusting the sub-window baseline of the next sub-transmission window in combination with the previous transmission state includes: If the previous transmission state is good, adjusting the current transmission state to poor; If the previous transmission state is a state difference, the number of consecutive state differences is obtained. When the number of states exceeds a preset state threshold, the sub-window baseline of the next sub-transmission window is reduced according to a third preset ratio.

5. The network traffic control method of the RDMA network card according to claim 1, characterized in that: The determining, according to the message sequence number of the ACK message, to update the next sub-transmission window comprises: Obtain the sub-transmission window corresponding to the message sequence number of the ACK message, and obtain a minimum sequence number to be confirmed based on the sub-transmission window; When the message sequence number of the ACK message is greater than or equal to the minimum sequence number to be confirmed, it is determined to update the next sub-transmission window.

6. The network traffic control method of the RDMA network card according to claim 1, characterized in that: The obtaining, according to the transmission parameters of the data to be transmitted, at least one transmission window and a sub-window baseline of each sub-transmission window of the transmission window comprises: Acquire transmission parameters, where the transmission parameters include one or more of a link bandwidth, an optical device conversion rate, a transmission distance, a distance incorporation rate, a maximum transmission unit, and a number of subwindows, where a first data relationship exists between the number of subwindows and the maximum transmission unit; At least one transmission window is calculated according to the transmission parameters, and the sub-window baseline is calculated according to the number of sub-windows.

7. The network traffic control method of the RDMA network card according to claim 6, characterized in that: The updating of the transmission distance based on the ACK message includes: Obtaining a sending timestamp of the information message indicating that the identifier generates the ACK message, and a receiving timestamp of the ACK message; Generating a time difference between the receiving timestamp and the sending timestamp; The transmission distance is calculated based on the time difference and the optical equipment conversion rate.

8. The network traffic control method of the RDMA network card according to claim 1, characterized in that: The generating the transmission permission information of the sub-transmission window according to the resource data of the sub-transmission window includes: Querying the resource data corresponding to the current sub-transmission window from the window management information; If the resource data exists, adjusting the transmission permission information to a sending state; If the resource data does not exist, generate the resource data, update the information message of the sub-transmission window, and adjust the transmission permission information to a sending state; If the resource data cannot be generated, the transmission permission information is adjusted to a stop state.

9. The network traffic control method of the RDMA network card according to claim 1, characterized in that: The encapsulating at least one information message based on the sub-window baseline includes: Acquire the data to be transmitted based on the task queue element; determining data content in the information message according to the sub-window baseline, and generating a message sequence number according to the transmission order of the information message; Based on the message sequence number, taking the first information message of the transmission window and the last information message of each sub-transmission window as the information message to be fed back; The identifier in the information message to be fed back is set to one, and the identifiers of the other information messages are set to zero.

10. A network traffic control device for an RDMA network card, characterized in that: include: a parameter calculation module configured to respond to a transmission request corresponding to a task queue element and obtain, based on transmission parameters of the data to be transmitted, at least one transmission window and a sub-window baseline of each sub-transmission window of the transmission window, wherein the sub-window baseline is used to indicate the size of the sub-transmission window; The permission acquisition module is used to generate the transmission permission information of the sub-transmission window according to the resource data of the sub-transmission window under the transmission window; a data generation and transmission module configured to, when the transmission permission information indicates that the sub-transmission window is in a sending state, encapsulate at least one information message based on the sub-window baseline and transmit the information message to a receiver, wherein the information message includes an identifier for instructing the receiver to generate a feedback message based on a reception result of the information message; An update module is configured to obtain a feedback message generated by the receiver, and obtain a transmission status and a transmission distance based on the feedback message, wherein the feedback message includes an ACK message, and determine whether to update the next sub-transmission window based on the message sequence number of the ACK message; update the transmission distance based on the ACK message, generate the transmission status of the current sub-transmission window, and obtain distance change information of the transmission distance corresponding to the adjacent sub-transmission window; when the distance change information indicates that the transmission distance becomes smaller, increase the sub-window baseline of the next sub-transmission window based on the transmission status; otherwise, reduce the sub-window baseline of the next sub-transmission window based on the transmission status.

11. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the network traffic control method for the RDMA network card according to any one of claims 1 to 9 when executing the computer program.

12. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the network traffic control method for the RDMA network card according to any one of claims 1 to 9 is implemented.