A method and system for processing response messages
By designing a message parsing module, a descriptor checking module and other modules in the response message processing system, the function division and processing flow of the response message processing system under the RoCEv2 protocol are realized, and the processing efficiency is improved.
Patent Information
- Application Number
- CN202510322099.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-03-19
AI Technical Summary
The existing response message processing system based on the RoCEv2 protocol lacks reasonable functional division and processing flow, resulting in inefficient processing of the requesting side to read response messages.
A response message processing system is designed, including a message parsing module, a descriptor checking module, a request control module, a request information reception module, an address reading module and a message construction module. Through the clear division and coordinated work of these modules, efficient response message processing is achieved.
Through reasonable functional module division, the efficiency of response message processing is significantly improved, and the problem of inefficient processing of existing systems is solved.
Smart Images

Figure CN119854394B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network chips, and particularly to a method and system for processing response messages. Background Art
[0002] RDMA (Remote Direct Memory Access) is a data transfer method directly from memory to memory. It allows a network adapter to directly transfer data into the memory of a target computer without the intervention of the CPU of the target host, which can significantly reduce the latency of network communication and improve data transfer efficiency. RoCEv2 (RDMA over Converged Ethernet version 2) is an RDMA protocol based on Ethernet and is the second generation of RDMA technology. It integrates Ethernet and RDMA, thus significantly enhancing performance and flexibility. RoCEv2 bypasses the processing layer of traditional data transfer through direct memory access between systems, thereby reducing CPU participation and communication latency. This feature makes RoCEv2 an ideal choice for applications with extremely high requirements for data interaction speed and efficiency, such as high-performance computing (HPC) environments, data centers, and cloud computing architectures.
[0003] In the actual application process, when a response message based on the RoCEv2 protocol returns to the requestor, various fields and descriptors need to be checked and processed. The existing response message processing systems do not have a reasonable functional division and processing flow, seriously affecting the processing efficiency of the requestor to read the response message.
[0004] In view of this, providing a response message processing method and system that support RoCEv2 and have a reasonable functional division and high processing ability is a technical problem that those skilled in the art urgently need to solve. Summary of the Invention
[0005] To solve the above technical problems, the object of the present invention is to provide a response message processing method and system that support RoCEv2 and have the characteristics of reasonable functional division and high response message processing efficiency.
[0006] Based on the above object, the technical solution provided by the present invention is as follows:
[0007] A response message processing system includes a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module, and a message constructing module;
[0008] The message parsing module is respectively connected to the descriptor checking module and the message constructing module;
[0009] The descriptor checking module is respectively connected to the request control module and the request information receiving module;
[0010] The request information receiving module is respectively connected to the request control module and the address reading module;
[0011] The message construction module is connected to the address reading module;
[0012] The message parsing module is used to parse the response message into response message data and a response message descriptor;
[0013] The descriptor checking module is used to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor;
[0014] The request control module is used to store the request information of the request message, and construct and send a request information descriptor according to the response information descriptor and the request information;
[0015] The request information receiving module is used to construct and send a request transfer descriptor according to the request information descriptor and the response information descriptor;
[0016] The address reading module is used to construct and send a request information address descriptor according to the request transfer descriptor and the storage address of the message construction module;
[0017] The message construction module is used to construct and send a request target message according to the request information address descriptor and the response message data, and send a request target message sending completion signal to the descriptor checking module;
[0018] The descriptor checking module is further used to construct and send a corresponding response information descriptor according to the request target message sending completion signal.
[0019] Preferably, the response message processing system further includes: a message parsing module;
[0020] The message parsing module is respectively connected to the descriptor checking module and the message construction module;
[0021] The message parsing module is used to parse the response message into the response message data and the response message descriptor.
[0022] Preferably, the response message processing system further includes: a queue pair status management module;
[0023] The queue pair status management module is connected to the descriptor checking module;
[0024] The queue pair status management module is used to monitor the queue pair status.
[0025] Preferably, the descriptor checking module is configured to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor in the queue pair, specifically:
[0026] When the queue pair status is an abnormal state or there is an error message in the response message descriptor, the constructed response information descriptor is a response information descriptor including an error message.
[0027] Preferably, the descriptor checking module is configured to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor in the queue pair, specifically:
[0028] When the response message is a non-read response message, send a first response information descriptor to the request control module;
[0029] When the response message is a read response message and is the first read response message expected to be received by the request end, construct a first response information descriptor and send it to the request control module, and construct a second response information descriptor and send it to the request information receiving module;
[0030] When the response message is a read response message and is not the first or last read response message expected to be received by the request end, construct a second response information descriptor and send it to the request information receiving module.
[0031] Preferably, the descriptor checking module is further configured to construct and send a corresponding response information descriptor according to the request target message sending completion signal, specifically:
[0032] When the descriptor checking module receives the request target message sending completion signal, construct a first response information descriptor and send it to the request control module.
[0033] Preferably, the descriptor checking module processes one response message descriptor at a time;
[0034] After the descriptor checking module receives the request target message sending completion signal and sends the first response information descriptor, the descriptor checking module starts to process the next response information descriptor in sequence.
[0035] Preferably, the response message processing system further includes: a bridging module;
[0036] The bridging module is respectively connected to the address reading module and the message constructing module;
[0037] The bridging module is configured to obtain the storage address of the message constructing module;
[0038] The bridging module is further configured to send the request target message to the corresponding request - end address.
[0039] A response message processing method is applied to a response message processing system. The response message processing system includes a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module, and a message constructing module. The method includes:
[0040] Using the message parsing module, parsing the response message into response message data and a response message descriptor;
[0041] Using the descriptor checking module, constructing and sending a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor;
[0042] Using the request control module, storing the request information of the request message, and constructing and sending a request information descriptor according to the response information descriptor and the request information;
[0043] Using the request information receiving module, constructing and sending a request transfer descriptor according to the request information descriptor and the response information descriptor;
[0044] Using the address reading module, constructing and sending a request information address descriptor according to the request transfer descriptor and the storage address of the message constructing module;
[0045] Using the message constructing module, constructing and sending a request target message according to the request information address descriptor and the response message data, and sending a request target message sending completion signal to the descriptor checking module;
[0046] Using the descriptor checking module, constructing and sending a corresponding response information descriptor according to the request target message sending completion signal.
[0047] The present invention discloses a response message processing system, including: a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module, and a message constructing module; The message parsing module is used to parse a response message into response message data and a response message descriptor; The descriptor checking module constructs a response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor; The request control module constructs a request information descriptor; The request information receiving module constructs a request transfer descriptor; The address reading module constructs a request information address descriptor; The message constructing module constructs and sends a request target message according to the request information address descriptor and the response message data. Compared with the prior art, the RoCEv2-supported response message processing system of the present invention significantly improves the processing efficiency of the system through reasonable and clear functional module division. This method has the same beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0049] Figure 1 It is a schematic structural diagram of a response message processing system in an embodiment of the present invention;
[0050] Figure 2 It is a flowchart of a response message processing method in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] In order to enable those skilled in the art to better understand the technical solutions in the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0052] As Figure 1 shown, an embodiment of the present invention provides a response message processing system, including a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module, and a message constructing module;
[0053] The message parsing module is respectively connected to the descriptor checking module and the message constructing module;
[0054] The descriptor check module is respectively connected to the request control module and the request information receiving module;
[0055] The request information receiving module is respectively connected to the request control module and the address reading module;
[0056] The message construction module is connected to the address reading module;
[0057] The message parsing module is used to parse the response message into response message data and a response message descriptor;
[0058] The descriptor check module is used to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor;
[0059] It should be noted that the message parsing module parses the response message according to the received order of the response message to obtain the response message data and the response message descriptor; the message parsing module sends the response message descriptor to the descriptor check module and sends the response message data to the message construction module.
[0060] In the actual application process, most of the information of the response message is included in the response message descriptor, including the response message type, opcode (operation code), syndrome, qpn (queue pair number), psn (packet sequence number), msn (message sequence number), and len (message data length); the descriptor check module is also used to judge the correctness of the response message descriptor, specifically to check whether the number of fields, names, and contents included in the response descriptor conform to the preset rules of the request end and the RoCEv2 protocol rules; the response message processing module stores and processes the response message descriptor in the receiving order.
[0061] Preferably, the descriptor check module is used to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor in the queue pair, specifically:
[0062] When the queue pair status is an abnormal state or there is an error message in the response message descriptor, the constructed response information descriptor is a response information descriptor including the error message.
[0063] It should be noted that in the RDMA technology, the queue pair is the basic communication unit, and each queue pair has its own send queue and receive queue for processing data transmission. Therefore, in the present invention, it is necessary to further process the response message on the premise that the queue pair status is normal to ensure the effectiveness of the response message processing; the abnormal queue pair state is a situation where the queue pair cannot receive the response message or the valid bit is pulled low, etc.
[0064] Preferably, the descriptor checking module is configured to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor in the queue pair. Specifically:
[0065] When the queue pair status is an abnormal state or there is error information in the response message descriptor, the constructed response information descriptor is a response information descriptor including error information.
[0066] It should be noted that when the queue pair status is an abnormal state or there is error information in the response message descriptor, a response information descriptor including error information is constructed. Through the request control module, the request information receiving module, and the address reading module, the error information is sent to the message construction module, and the corresponding response message data is discarded.
[0067] Preferably, the descriptor checking module is configured to construct and send a corresponding response information descriptor according to the response message type, the queue pair status, and the correctness of the response message descriptor in the queue pair. Specifically:
[0068] When the response message is a non-read response message, send a first response information descriptor to the request control module;
[0069] When the response message is a read response message and is the first read response message expected to be received by the request end, construct a first response information descriptor and send it to the request control module, and construct a second response information descriptor and send it to the request information receiving module;
[0070] When the response message is a read response message and is not the first or the last read response message expected to be received by the request end, construct a second response information descriptor and send it to the request information receiving module.
[0071] It should be noted that the response message type includes read response messages and non-read response messages; when the response message corresponding to the response message descriptor processed by the descriptor checking module is the first read response message expected to be received by the request end, construct a first response information descriptor and send it to the request control module, obtain the request information in the request message from the request control module, and at the same time construct a second response information descriptor and send it to the request information receiving module; when the response message is a read response message and is not the first or the last read response message expected to be received by the request end, construct a second response information descriptor and send it to the request information receiving module.
[0072] During the actual working process, when the status of the queue pair is normal, the descriptor check module determines the type of the response message based on the response message descriptor. When the type of the response message is a non-read response message, it constructs the first response information descriptor and sends it to the request control module. At this time, the processing of the non-read response message is completed, and the descriptor check module starts to process the next response message descriptor; when the status of the queue pair is normal, the descriptor check module determines the type of the response message based on the response message descriptor. When the type of the response message is a read response message and it is the first read response message expected to be received by the request side, it constructs the first response information descriptor and sends it to the request control module, and constructs the second response information descriptor and sends it to the request information receiving module; the content of the first response information descriptor is shown in Table 1 below:
[0073] Table 1
[0074]
[0075] The content of the second response information descriptor is shown in Table 2 below:
[0076] Table 2
[0077]
[0078] The request control module is used to store the request information of the request message, and construct and send the request information descriptor according to the response information descriptor and the request information;
[0079] It should be noted that the content of the request information descriptor is shown in Table 3 below:
[0080] Table 3
[0081]
[0082] The request information receiving module is used to construct and send the request transfer descriptor according to the request information descriptor and the response information descriptor;
[0083] It should be noted that the content of the request transfer descriptor is shown in Table 4 below:
[0084] Table 4
[0085]
[0086] The address reading module is used to construct and send the request information address descriptor according to the request transfer descriptor and the storage address of the message construction module;
[0087] It should be noted that the content of the request information address descriptor is shown in Table 5 below:
[0088] Table 5
[0089]
[0090] It should be noted that when the request control module receives a response message descriptor including an error message, it constructs a transmission request message descriptor including the error message; the request message receiving module receives the transmission request message descriptor including the error message and constructs a request transfer descriptor including the error message.
[0091] The message construction module is used to construct and send a request target message according to the request message address descriptor and the response message data, and send a request target message transmission completion signal to the descriptor check module.
[0092] The descriptor check module is also used to construct and send a corresponding response message descriptor according to the request target message transmission completion signal.
[0093] It should be noted that when the message construction module receives the request message address descriptor, and when the request message corresponding to the request message address descriptor is the last message expected to be read by the request end, it constructs and sends the request target message, and at the same time sends a request target message transmission completion signal to the descriptor check module. The descriptor check module constructs and sends a corresponding second response message descriptor to the request control module according to the request target message transmission completion signal, and at this time, the processing of a read response message is completed.
[0094] Preferably, the descriptor check module processes one response message descriptor at a time.
[0095] After the descriptor check module receives the request target message transmission completion signal and sends the first response message descriptor, the descriptor check module starts to process the next response message descriptor in sequence.
[0096] In the actual working process, the response message processing system of the present invention processes response messages one by one and processes one response message at a time; the descriptor check module processes one response message descriptor at a time, and the processing order is FIFO (First In First Out).
[0097] Preferably, the response message processing system further includes: a queue pair status management module;
[0098] The queue pair status management module is connected to the descriptor check module;
[0099] The queue pair status management module is used to monitor the queue pair status.
[0100] Preferably, the response message processing system further includes: a bridging module;
[0101] The bridging module is respectively connected to the address reading module and the message construction module;
[0102] The bridging module is used to obtain the storage address of the message construction module.
[0103] The bridging module is also used to send the request target message to the corresponding request - end address.
[0104] As Figure 2 As shown, a response message processing method is applied to a response message processing system. The response message processing system includes a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module, and a message constructing module. The method includes:
[0105] S1. Using the descriptor checking module, construct and send a corresponding response information descriptor according to the response message type, queue pair status, and the correctness of the response message descriptor.
[0106] S2. Using the request control module, store the request information of the request message, and construct and send a request information descriptor according to the response information descriptor and the request information.
[0107] S3. Using the request information receiving module, construct and send a request transfer descriptor according to the request information descriptor and the response information descriptor.
[0108] S4. Using the address reading module, construct and send a request information address descriptor according to the request transfer descriptor and the storage address of the message constructing module.
[0109] S5. Using the message constructing module, construct and send a request target message according to the request information address descriptor and the response message data, and send a request target message sending completion signal to the descriptor checking module.
[0110] S6. Using the descriptor checking module, construct and send a corresponding response information descriptor according to the request target message sending completion signal.
[0111] In steps S1 to S6, the descriptor check module constructs and sends corresponding response information descriptors based on the response message type, queue pair status, and correctness of the response message descriptor; the request control module stores the request information of the request message and constructs and sends request information descriptors based on the response information descriptor and the request information; the request information receiving module constructs and sends request transfer descriptors based on the request information descriptor and the response information descriptor; the address reading module is used to construct and send request information address descriptors based on the request transfer descriptor and the storage address of the message construction module; the message construction module constructs and sends a request target message based on the request information address descriptor and the response message data, and sends a request target message sending completion signal to the descriptor check module; the descriptor check module constructs and sends corresponding response information descriptors based on the request target message sending completion signal. Compared with the prior art, the RoCEv2-supported response message processing method of the present invention is based on a clear division of modules between systems, making the processing flow more concise and smooth, and significantly improving the processing efficiency of response messages.
[0112] In the embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of modules is only a logical function division, and there may be other division methods in actual implementation. For example, 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 with each other can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0113] In addition, in each embodiment of the present invention, each functional module can be fully integrated in a processor, or each module can be separately used as a device, or two or more modules can be integrated in a device; each functional module in each embodiment of the present invention can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0114] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed through program instructions and related hardware. The foregoing program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, they execute the steps including the above method embodiments; and the foregoing storage medium includes: various media that can store program codes such as removable storage devices, read-only memory (ROM), magnetic disks, or optical discs.
[0115] It should be understood that in this application, if terms such as "system", "device", "unit" and / or "module" are used, they are only a way to distinguish different components, elements, parts, portions or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.
[0116] As shown in this application and the claims, unless the context clearly indicates otherwise, words such as "a", "an", "one" and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. A method or device may also include other steps or elements. An element defined by the statement "comprising one..." does not exclude the existence of other identical elements in the process, method, article or device that includes the element.
[0117] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this application, the meaning of "a plurality of" and "several" is two or more, unless otherwise specifically defined.
[0118] If a flowchart is used in this application, the flowchart is used to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the previous or subsequent operations do not necessarily need to be executed precisely in sequence. On the contrary, the steps can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or one or more steps can be removed from these processes.
[0119] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein 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 herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A response message processing system, characterized in that: It includes a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module and a message construction module; The message parsing module is connected to the descriptor checking module and the message construction module respectively; The descriptor checking module is connected to the request control module and the request information receiving module respectively; The request information receiving module is connected to the request control module and the address reading module respectively; The message construction module is connected to the address reading module; The message parsing module is used to parse the response message into response message data and a response message descriptor; The descriptor checking module is used to construct and send a corresponding response information descriptor according to the response message type, the queue pair status and the correctness of the response message descriptor; The request control module is used to store the request information of the request message, and construct and send the request information descriptor according to the response information descriptor and the request information; The request information receiving module is used to construct and send a request transfer descriptor according to the request information descriptor and the response information descriptor; The address reading module is used to construct and send a request information address descriptor according to the request transfer descriptor and the storage address of the message construction module; The message construction module is used to construct and send a request target message according to the request information address descriptor and the response message data, and send a request target message sending completion signal to the descriptor checking module; The descriptor checking module is further used to send a completion signal according to the request target message, and to construct and send a corresponding response information descriptor.
2. The response message processing system according to claim 1, characterized in that: Also includes: Queue pair state management module; The queue pair state management module is connected to the descriptor checking module; The queue pair status management module is used to monitor the queue pair status.
3. The response message processing system according to claim 1, characterized in that: The descriptor checking module is used to construct and send a corresponding response information descriptor according to the response message type, the queue pair status and the correctness of the response message descriptor in the queue pair, specifically: When the queue pair state is an abnormal state or error information exists in the response message descriptor, the constructed response message descriptor is a response message descriptor including the error information.
4. The response message processing system according to claim 3, characterized in that: The descriptor checking module is used to construct and send a corresponding response information descriptor according to the response message type, the queue pair status and the correctness of the response message descriptor in the queue pair, specifically: When the response message is a non-read response message, sending a first response information descriptor to the request control module; When the response message is a read response message and is the first read response message that the request end expects to receive, construct a first response information descriptor and send it to the request control module, and construct a second response information descriptor and send it to the request information receiving module; When the response message is a read response message and is not the first or last read response message that the requesting end expects to receive, a second response information descriptor is constructed and sent to the request information receiving module.
5. The response message processing system according to claim 4, characterized in that: The descriptor checking module is further used to send a completion signal according to the request target message, construct and send a corresponding response information descriptor, specifically: When the descriptor checking module receives the request target message sending completion signal, it constructs a first response information descriptor and sends it to the request control module.
6. The response message processing system according to claim 5, characterized in that: The descriptor checking module processes one response message descriptor at a time; After the descriptor checking module receives the request target message sending completion signal and sends the first response information descriptor, the descriptor checking module starts to process the next response information descriptor in sequence.
7. The response message processing system according to claim 1, characterized in that: Also includes: Bridge module; The bridge module is connected to the address reading module and the message construction module respectively; The bridging module is used to obtain the storage address of the message construction module; The bridge module is also used to send the request target message to the corresponding request end address.
8. A response message processing method, characterized in that: Applied to the response message processing system according to any one of claims 1 to 7, wherein the response message processing system comprises a message parsing module, a descriptor checking module, a request control module, a request information receiving module, an address reading module and a message construction module, and the method comprises: Utilizing the message parsing module, parsing the response message into response message data and a response message descriptor; Using the descriptor checking module, construct and send a corresponding response information descriptor according to the response message type, the queue pair status and the correctness of the response message descriptor; Utilizing the request control module, storing the request information of the request message, constructing and sending the request information descriptor according to the response information descriptor and the request information; Using the request information receiving module, construct and send a request transfer descriptor according to the request information descriptor and the response information descriptor; Using the address reading module, construct and send a request information address descriptor according to the request transfer descriptor and the storage address of the message construction module; Using the message construction module, construct and send a request target message according to the request information address descriptor and the response message data, and send a request target message sending completion signal to the descriptor checking module; The descriptor checking module is utilized to send a completion signal according to the request target message, and to construct and send a corresponding response information descriptor.
Citation Information
Patent Citations
Descriptor reading device and apparatus, method and integrated circuit
CN115113977A
RDMA-based request device, response device and system
CN119271589A