RoCE flow control method based on protocol stack

By building a RoCE traffic control system based on the protocol stack, network traffic control for different applications is realized, and the problem that hardware traffic control algorithms in the prior art cannot perceive applications is solved, effectively avoiding network congestion and packet loss.

CN119996329AActive Publication Date: 2025-05-13NAT UNIV OF DEFENSE TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510470526.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-05-13
Estimated Expiration
2045-04-15

AI Technical Summary

Technical Problem

The network traffic control algorithm implemented by hardware in the existing RoCE network cannot perceive applications, resulting in the inability to control network traffic for specific applications, and the inability to effectively avoid network congestion and packet loss.

Method used

By building a RoCE traffic control system based on the protocol stack, including a work request reception and analysis module, a work request sending control module, a work request sending module, a work request sending module, a current sending data update module and a current sending data clearing module, network traffic control for different applications is realized.

Benefits of technology

It realizes network traffic control for different applications, solves the problem that hardware traffic control algorithm cannot perceive applications, and effectively avoids network congestion and packet loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996329A_ABST
    Figure CN119996329A_ABST
Patent Text Reader

Abstract

The invention provides a RoCE flow control method based on a protocol stack. The RoCE flow control method based on the protocol stack comprises the following steps: constructing a RoCE flow control system based on the protocol stack; the work request receiving and analyzing module receives a work request of an application program and analyzes the work request to obtain a work request data size and a work request process ID; the work request sending control module judges whether to send the work request according to the size of the work request data, the work request process ID, the current sending data volume of the work request process ID and the preset cycle maximum sending data volume; and if the judgment result is yes, the work request sending module sends the work request to the RoCE network card, and data volume updating and preset period zero clearing are realized before sending. Network traffic control of different application programs is realized, the problem that a network traffic control algorithm realized by hardware in a network card cannot sense the application is solved, and network congestion and packet loss are effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network security, and in particular to a RoCE flow control method based on a protocol stack. Background Art

[0002] RoCE network is an Ethernet-based RDMA (Remote Direct Memory Access) network. The performance indicators of RoCE network, such as end-to-end latency and CPU resource utilization, are comparable to those of Infiniband network, but its deployment cost is much lower than that of Infiniband network. Therefore, it is widely deployed and applied in data center networks for application scenarios such as AI and supercomputing that have high requirements for network latency and CPU utilization.

[0003] At present, the network traffic control algorithms in the RoCE network field mainly include priority-based flow control (PFC), bandwidth delay product-based flow control (BDP-FC), credit-based flow control and dynamic traffic planning algorithm.

[0004] The above algorithms are all implemented in the network card through hardware logic, which has the disadvantages of large resource consumption, high implementation cost, long development cycle, inflexible algorithm, etc. At the same time, since the network card cannot perceive the process in the operating system, the network flow control algorithm implemented in the network card can only perform flow control based on the network status and limited flow priority, and cannot perform network flow control for specific applications.

[0005] Therefore, it is an urgent problem to be solved by those skilled in the art to provide a RoCE traffic control method based on a protocol stack to implement network traffic control for different applications and avoid network congestion and packet loss. Summary of the invention

[0006] The purpose of the present invention is to provide a RoCE traffic control method based on a protocol stack. The method has clear logic, is safe, effective, reliable and easy to operate, can realize network traffic control for different applications, solve the problem that the hardware network traffic control algorithm in the network card cannot perceive the application, and effectively avoid network congestion and packet loss.

[0007] Based on the above objectives, the technical solution provided by the present invention is as follows: The RoCE traffic control method based on the protocol stack includes the following steps: Construct a RoCE traffic control system based on the protocol stack, which consists of a work request receiving and parsing module, a work request sending control module, a work request sending module, a current sending data volume update module, and a current sending data volume clearing module; The work request receiving and parsing module receives a work request from an application program, and parses the work request to obtain a work request data size and a work request process ID; The work request sending control module determines whether to send the work request according to the work request data size, the work request process ID, the current sending data volume of the work request process ID and the preset periodic maximum sending data volume; If the judgment result is yes, the work request sending module sends the work request to the RoCE network card; Before the work request sending module sends the work request to the RoCE network card, it also includes: The current sending data amount updating module adds the current sending data amount of the process ID to the work request data size to update the current sending data amount of the process ID; The current sending data volume clearing module clears the current sending data volume of different process IDs according to a preset period.

[0008] Preferably, the work request receiving and parsing module receives a work request from an application program, and parses the work request to obtain a data size and a process ID corresponding to the work request, specifically: The work request receiving and parsing module receives a work request issued by an application, and parses the work request according to the RoCE network protocol stack data format to obtain a data size and a process ID corresponding to the work request.

[0009] Preferably, the work request sending control module determines whether to send the work request according to the work request data size, the work request process ID, the current sending data volume of the work request process ID, and the preset periodic maximum sending data volume, specifically: Determine whether the sum of the current sending data volume of the process ID and the work request data size is greater than the preset periodic maximum sending data volume of the process ID; If so, discard the work request; If not, the work request is sent.

[0010] The RoCE flow control method based on the protocol stack provided by the present invention is specifically to construct a RoCE network flow control system composed of a work request receiving and parsing module, a work request sending control module, a work request sending module, a current sending data amount updating module and a current sending data amount clearing module. The application sends a work request to the RoCE network flow control system. After receiving the work request of the application, the work request receiving and parsing module parses the work request to obtain the data size and process ID corresponding to the work request; the work request sending control module receives the data size and the process ID, reads the current sending data amount of the process ID from the current sending data amount updating module, and determines whether to send the work request according to the data size, the current sending data amount of the process ID and the preset period maximum sending data amount of the process ID. If the judgment result is yes, the work request is sent to the work request sending module, and the work request sending module receives and sends the work request to the RoCE network card; before sending the work request, the work request sending module updates the current sending data amount of the process ID by the current sending data amount updating module; the current sending data amount clearing module clears the current sending data amounts of all process IDs according to the preset period.

[0011] Compared with the prior art, the present invention can realize network traffic control for different applications, solve the problem that the network traffic control algorithm implemented by the hardware in the network card cannot perceive the application, and pre-plan the network traffic distribution by this method, which can effectively avoid network congestion and packet loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0013] Figure 1 A flow chart of a RoCE traffic control method based on a protocol stack provided in an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a RoCE traffic control system based on a protocol stack provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0015] The embodiments of the present invention are written in a progressive manner.

[0016] The embodiment of the present invention provides a RoCE flow control method based on a protocol stack, which mainly solves the technical problem in the prior art that the network flow control algorithm implemented by the network card hardware cannot perceive the application, resulting in network congestion and packet loss.

[0017] The RoCE traffic control method based on the protocol stack includes the following steps: S1. Construct a RoCE flow control system based on the protocol stack consisting of a work request receiving and parsing module, a work request sending control module, a work request sending module, a current sending data volume update module, and a current sending data volume clearing module; S2. The work request receiving and parsing module receives the work request of the application and parses the work request to obtain the work request data size and the work request process ID; S3. The work request sending control module determines whether to send a work request based on the work request data size and the work request process ID and the current amount of data sent by the work request process ID and the preset cycle maximum amount of data sent; S4. If the judgment result is yes, the work request sending module sends the work request to the RoCE network card; Before the work request sending module sends the work request to the RoCE network card, the method further includes: The current sending data amount updating module adds the current sending data amount of the process ID to the work request data size to update the current sending data amount of the process ID; The current sending data volume clearing module clears the current sending data volume of different process IDs according to the preset period.

[0018] In step S1, a RoCE network traffic control system is constructed, which runs on the RoCE network end system and is deployed together with the RoCE network protocol stack; the system is provided with a work request receiving and parsing module, a work request sending control module, a work request sending module, a current sending data volume update module and a current sending data volume clearing module; In step S2 to step S4, the work request receiving and parsing receives the work request of the application, parses the work request, obtains the corresponding work request data size and the work request process ID; queries the system configuration, obtains the current sending data volume and the preset periodic maximum sending data flow corresponding to the work request process ID, and determines whether to send the work request; if the determination result is yes, sends the work request to the work request sending module, and the work request sending module receives and sends the work request to the RoCE network card; Before the work request sending module sends a work request, the current data sending amount update module adds the current data sending amount of the process ID to the work request data size to update the data amount as the new current data sending amount of the process ID; after the update is completed, the current data sending amount clearing module clears the current data sending amount of all process IDs according to the preset period.

[0019] Preferably, step S2 is specifically: The work request receiving and parsing module receives a work request sent by an application program, and parses the work request according to the RoCE network protocol stack data format to obtain the data size and process ID corresponding to the work request.

[0020] In actual use, the work request receiving and parsing module receives the work request sent by the application, parses the work request according to the RoCE network protocol stack data format (refer to https: / / github.com / linux-rdma / rdma-core.git), and extracts the corresponding data size and process ID from the work request.

[0021] Preferably, step S3 is specifically: Determine whether the sum of the current data volume sent by the process ID and the work request data size is greater than the preset periodic maximum data volume sent by the process ID; If so, the work request is discarded; If not, a work request is sent.

[0022] During actual use, the work request sending control module sums the current data sending volume of the process ID and the traffic data size, and compares the sum result with the preset maximum data sending volume of the process ID. If the sum result is greater than the preset maximum data sending volume of the process ID, the corresponding work request is discarded; if it is less than the maximum data sending volume of the process ID, the work request is sent.

[0023] In the embodiments provided in the present application, it should be understood that the disclosed methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0024] In addition, all functional modules in the embodiments of the present invention may be integrated into one processor, or each module may be a separate device, or two or more modules may be integrated into one device; each functional module in the embodiments of the present invention may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0025] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, the steps of the above method embodiment are executed; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.

[0026] It should be understood that the use of "system", "device", "unit" and / or "module" in this application is only a method for distinguishing different components, elements, parts, parts or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.

[0027] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "a kind" and / or "the" do not refer to the singular, but also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements. The elements defined by the sentence "includes a..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

[0028] If a flow chart is used in the present application, the flow chart is used to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, each step can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or a certain step or several steps of operations can be removed from these processes.

[0029] The above is a detailed introduction to the RoCE flow control method based on the protocol stack provided by the present invention. The above description of the disclosed embodiments enables professionals and technicians in this field to implement or use the present invention. Various modifications to these embodiments will be obvious to professionals and technicians in this field, and the general principles defined in this article can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in this article, but will conform to the widest range consistent with the principles and novel features disclosed in this article.

Claims

1. A RoCE flow control method based on a protocol stack, characterized in that: The steps include: Construct a RoCE traffic control system based on the protocol stack, which consists of a work request receiving and parsing module, a work request sending control module, a work request sending module, a current sending data volume update module, and a current sending data volume clearing module; The work request receiving and parsing module receives a work request from an application program, and parses the work request to obtain a work request data size and a work request process ID; The work request sending control module determines whether to send the work request according to the work request data size, the work request process ID, the current sending data volume of the work request process ID and the preset periodic maximum sending data volume; If the judgment result is yes, the work request sending module sends the work request to the RoCE network card; Before the work request sending module sends the work request to the RoCE network card, it also includes: The current sending data amount updating module adds the current sending data amount of the process ID to the work request data size to update the current sending data amount of the process ID; The current sending data volume clearing module clears the current sending data volume of different process IDs according to a preset period.

2. The RoCE flow control method based on the protocol stack as claimed in claim 1, characterized in that: The work request receiving and parsing module receives a work request from an application program and parses the work request to obtain a data size and a process ID corresponding to the work request, specifically: The work request receiving and parsing module receives a work request issued by an application, and parses the work request according to the RoCE network protocol stack data format to obtain a data size and a process ID corresponding to the work request.

3. The RoCE flow control method based on the protocol stack as claimed in claim 1, characterized in that: The work request sending control module determines whether to send the work request according to the work request data size, the work request process ID, the current sending data volume of the work request process ID, and the preset periodic maximum sending data volume, specifically: Determine whether the sum of the current sending data volume of the process ID and the work request data size is greater than the preset periodic maximum sending data volume of the process ID; If so, discard the work request; If not, the work request is sent.

Citation Information

Patent Citations

  • RDMA (Remote Direct Memory Access) service quality assurance method and system for multiple application scenes of data center

    CN114124830A

  • Congestion control method and system for optimizing RDMA reading and storage medium

    CN116582492A

  • Network flow control method of RDMA (Remote Direct Memory Access) network card and related device

    CN119544628A

  • Flow control method, apparatus, and device, and readable storage medium

    WO2022121469A1

  • Congestion control method and apparatus

    WO2023011179A1