A data transmission method and apparatus based on RDMA
Patent Information
- Application Number
- CN202211103274.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-09-09
AI Technical Summary
当内存访问Cache未命中的情况时,由于当前接收包在当前处理流程等待处理导致后面的接收包处于堵塞状态,头阻塞现象明显增多,导致整个接收端的延迟时间明显增加,其处理性能降低
[0005] The purpose of this invention is to provide a data transmission method and apparatus based on RDMA, which avoids the head-blocking phenomenon caused by serial processing in existing data transmission processes. By using parallel processing, the time for accessing memory overlaps in time, which reduces latency to a certain extent and improves the processing performance of RDMA.
Smart Images

Figure CN115658592B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a data transmission method and apparatus based on RDMA. Background Technology
[0002] In emerging data-intensive applications such as high-performance computing (HPC), financial services, storage and backup systems, cloud computing, graphics analytics, and machine learning, Remote Direct Memory Access (RDMA) technology has a wide range of applications and is considered to be the future direction of high-speed network development.
[0003] Currently, RDMA hardware network cards use a serial pipelined implementation scheme for the receiver, meaning that all received packets must enter all processes sequentially to achieve the function of ordered reception. Figure 1 A schematic diagram illustrating the application processing of the receiver side of an existing RDMA hardware network card, such as... Figure 1 As shown, all received packets sequentially enter the response packet processing flow, SEND request packet processing flow, ATOMIC request packet processing flow, READ request packet processing flow, WRITE request packet processing flow, MR checksum and address translation flow, payload message write to memory flow, and CQ / CEQ / AEQ reporting flow, etc., in a pipeline. If two adjacent packets are not of the same type, the subsequent received packet must wait for the preceding received packet to complete its processing in the current stage before entering the current processing flow. When a memory access cache miss occurs, the subsequent received packets are blocked because the current received packet is waiting for processing in the current stage, significantly increasing header blocking and resulting in a significant increase in the overall latency of the receiving end, thus reducing its processing performance.
[0004] Therefore, how to reduce the latency of the RDMA hardware receiver is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a data transmission method and apparatus based on RDMA, which avoids the head-blocking phenomenon caused by serial processing in existing data transmission processes. By using parallel processing, the time for accessing memory overlaps in time, which reduces latency to a certain extent and improves the processing performance of RDMA.
[0006] To address the aforementioned technical problems, this invention provides a data transmission method based on RDMA, comprising:
[0007] Obtain multiple receive packets and preprocess them to obtain the corresponding request packet operation type;
[0008] The request packet is processed according to the operation type of the multiple received packets to achieve parallel processing of multiple received packets. The data transmission processing flow of RDMA includes parallel processing and serial processing.
[0009] Multiple received packets processed in parallel are aggregated according to a preset period, and then processed serially according to the sequence order to complete the data transmission.
[0010] Preferably, before preprocessing multiple received packets to obtain the corresponding request packet operation type, the method further includes:
[0011] According to the RDMA data transmission protocol, there are different request packet operation types, which include at least the response packet processing type, send request packet processing type, atomic request packet processing type, read request packet processing type, and write request packet processing type.
[0012] Preferably, preprocessing multiple received packets to obtain the corresponding request packet operation type includes:
[0013] Determine if the header information of the currently received packet is correct;
[0014] If so, the request packet operation type corresponding to the current received packet is determined based on the correspondence between the packet header information and the request packet operation type.
[0015] Preferably, processing the request packets according to the multiple received packets and their corresponding request packet operation types includes:
[0016] If the request packet operation type corresponding to the current received packet is a response packet processing type, identify the lost response information of the current received packet, update the queue context and response packet field of the current received packet, and mark the updated current received packet as an abnormal packet to complete the processing of the current received packet.
[0017] If the request packet operation type corresponding to the current received packet is the send request packet processing type, obtain the queue information of the current received packet, and mark the current received packet as an abnormal packet to complete the processing of the current received packet;
[0018] If the request packet operation type corresponding to the current received packet is an atomic request packet processing type, read the memory data according to the current received packet, record the atomic information in the atomic context queue, and mark the current received packet as an abnormal packet to complete the processing of the current received packet;
[0019] If the request packet operation type corresponding to the current received packet is a read request packet processing type, write the current read request information into the receive read context queue, and mark the current received packet as an exception packet to complete the processing of the current received packet;
[0020] If the request packet operation type corresponding to the current received packet is a write request packet processing type, then an exception packet identification mark is made on the current received packet to complete the processing of the current received packet.
[0021] Preferably, when the request packet operation type corresponding to the current received packet is obtained, before processing the corresponding request packet based on the current received packet and the corresponding request packet operation type, the method further includes:
[0022] Obtain the prediction result for processing the corresponding request packet in the currently received packet;
[0023] The prediction results are refreshed to the queue context so that the queue context remains consistent for the next currently received packet.
[0024] Preferably, before processing the corresponding request packets based on the multiple received packets and their corresponding request packet operation types, the method further includes:
[0025] Multiple received packets are preprocessed to match the corresponding order-preserving IDs for parallel processing, and then processed serially according to the sequence order.
[0026] Preferably, it further includes:
[0027] Establish a shared cache space to store storage information for multiple received packets during parallel processing.
[0028] To address the aforementioned technical problems, the present invention also provides an RDMA-based data transmission device, comprising:
[0029] The acquisition module is used to acquire multiple receive packets and preprocess the multiple receive packets to obtain the corresponding request packet operation type;
[0030] The parallel processing module is used to process the corresponding request packets according to the operation type of the multiple received packets to achieve parallel processing of multiple received packets. The data transmission processing flow of RDMA includes parallel processing and serial processing.
[0031] The serial processing module is used to summarize multiple received packets after parallel processing according to a preset period, and to perform serial processing on the summarized multiple received packets according to the sequence order in order to complete the data transmission.
[0032] This invention provides a data transmission method based on RDMA, comprising: acquiring multiple receive packets and preprocessing the multiple receive packets to obtain corresponding request packet operation types; performing corresponding request packet processing according to the multiple receive packets and their corresponding request packet operation types to achieve parallel processing of multiple receive packets, wherein the RDMA data transmission processing flow includes parallel processing and serial processing; summarizing the multiple receive packets after parallel processing according to a preset period, and performing serial processing on the summarized multiple receive packets according to the sequence order to complete data transmission. This method determines the request packet operation type corresponding to the receive packet through preprocessing, performs corresponding request packet processing according to different request packet operation types to achieve parallel processing of multiple receive packets, summarizes the multiple receive packets after parallel processing, and performs serial processing according to the sequence order. This avoids the head-blocking phenomenon caused by serial processing in existing data transmission processes, and the parallel processing allows memory access time to overlap, reducing latency to a certain extent and improving the processing performance of RDMA.
[0033] In addition, the present invention also provides an RDMA-based data transmission device, which has the same beneficial effects as the RDMA-based data transmission method described above. Attached Figure Description
[0034] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A schematic diagram illustrating the application processing of the receiver end of an existing RDMA hardware network card;
[0036] Figure 2 A flowchart illustrating a data transmission method based on RDMA provided in an embodiment of the present invention;
[0037] Figure 3 A structural diagram of a data transmission device based on RDMA provided in an embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram illustrating an application of an RDMA-based data transmission method provided in an embodiment of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0040] The core of this invention is to provide a data transmission method and apparatus based on RDMA, which avoids the head-blocking phenomenon caused by the existing data transmission process relying solely on serial processing. By using parallel processing, the time for accessing memory overlaps in time, thereby reducing latency to a certain extent and improving the processing performance of RDMA.
[0041] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] It should be noted that, in order to mitigate the reduced throughput caused by head-blocking in existing technologies, a common approach is to increase the buffer depth at each pipeline stage in a serial pipeline architecture. However, this does not solve the problem of increased latency and also increases hardware resource consumption. Therefore, the RDMA-based output transmission method proposed in this invention is applicable to Smart Network Interface Controllers (Smart NICs), Data Processing Units (DPUs), and server network interface cards (NICs), and can avoid the aforementioned problems.
[0043] Figure 2 A flowchart of a data transmission method based on RDMA provided in an embodiment of the present invention is shown below. Figure 2 As shown, the method includes:
[0044] S11: Obtain multiple receive packets and preprocess them to obtain the corresponding request packet operation type.
[0045] Specifically, under normal circumstances, multiple packets are received. As the receiving end of the RDMA hardware network card, no operating system intervention is required, eliminating the overhead of copying and moving data packets between user space and kernel space and context switching. Therefore, memory bandwidth and CPU cycles can be freed up to improve the performance of application systems.
[0046] The acquired multiple received packets can be consecutive or non-consecutive, and can be of the same or different types, etc. This invention does not impose specific limitations and can be set according to the actual situation. Correspondingly, the period for acquiring multiple received packets is also not limited; it can be preprocessed on a first-come, first-served basis, or received according to a certain preset time.
[0047] After receiving multiple receive packets, they are preprocessed to obtain the corresponding request packet operation type. The request packet operation type is a type that can be processed in parallel according to the transmission protocol settings of the RDMA hardware network card. Preprocessing, based on existing routine processing, also requires predicting and identifying the request packet operation type corresponding to each receive packet. Routine processing includes at least header checking and refreshing the order-preserving segment of the queue context. Specifically, header checking can be divided into header error detection, RC request packet order detection and ePSN update, and previous packet information detection (Opcode, request MSN calculation, etc.). To save latency during the waiting process, the result of receiving packets entering the pipeline is predicted and refreshed in the queue context to avoid the pipeline failing to refresh the queue context segments. The corresponding response processing pipeline stage also requires actual segment updates when a receive packet enters.
[0048] S12: Process the corresponding request packets according to the operation type of the multiple received packets to achieve parallel processing of multiple received packets. The data transmission process of RDMA includes parallel processing and serial processing.
[0049] In step S11, the corresponding request packet is processed according to the received packet and the corresponding request packet operation type. It should be noted that multiple received packets can be consecutive and of the same type, non-consecutive but of the same type, consecutive and of different types, or non-consecutive and of different types. Request packet processing can be implemented for all four cases. If the packets are consecutive and of the same type, for example, five received packets a, b, c, d, and e, and packets a and b are of the same type, after obtaining the corresponding request packet type, packets a and b are of the same type. Therefore, they are queued at the corresponding request packet pipeline level, waiting for packet a to be processed before processing packet b. Since the different request packet processing modules process in parallel, the waiting time for packet b is only the processing time of packet c, and it does not affect packet c. At this time, packet c is already being processed in its corresponding request packet processing module, achieving parallel processing of request packets a and c. The same applies to request packets d and e.
[0050] If the five types of received packets are all different types, and the corresponding request packets are processed simultaneously, then the parallel processing of the five types of received packets can be achieved.
[0051] The transmission protocol of RDMA hardware network cards is divided into different operation types, with the latter targeting parallel processing. The hardware network card also includes a serial processing type; after parallel processing, the received packets, including the request packets corresponding to the received packets, need to be processed serially sequentially.
[0052] S13: Summarize multiple received packets after parallel processing according to a preset period, and perform serial processing on the summarized multiple received packets according to the sequence order in order to complete the data transmission.
[0053] It should be noted that after parallel processing, serial processing begins. Before serial processing, the first-in, first-out (FIFO) principle of received packets is followed. Due to the predetermined order of entry before parallel processing, multiple received packets enter the serial processing operation type in a certain order. Referring to the example above, the five received packets are consecutive and of different types. Received packets a, c, and e have a processing time of 0.25us for their respective request packets, while received packets b and d have a processing time of 0.2us for their respective request packets. At this point, the earliest finished received packets are b and d. Since a is still being processed within the request packet, received packet b must wait until a finishes and enters the serial processing before it can be processed serially, following the FIFO principle, but it does not need to wait for the processing time of received packet ce.
[0054] The received packets are aggregated after parallel processing according to a preset period. The length of the preset period is not limited and can be set according to the specific processing time of multiple received packets, or according to the number of consecutive received packets of the same or different types. Correspondingly, they are processed serially according to the sequence order. In this embodiment, the sequence order can be set by the marking of the received packets, or by defining the ID of the received packets, etc., and is not specifically limited.
[0055] As a preferred embodiment, before processing the corresponding request packets according to the multiple received packets and their corresponding request packet operation types, it further includes:
[0056] Multiple received packets are preprocessed to match the corresponding order-preserving IDs for parallel processing, and then processed serially according to the sequence order.
[0057] Based on the specific order-preserving ID to ensure the first-in-first-out principle, ordered output is achieved. Even if there is a head-blocking problem before serial processing, the memory access time (during parallel processing) overlaps with each other. When the cache misses, the total latency is significantly reduced.
[0058] As a preferred embodiment, the corresponding serial processing flow includes at least the MR check and address translation processing flow, the payload message write-to-memory processing flow, and the CQ / CEQ / AEQ reporting processing flow.
[0059] The local Virtual-to-Physical Address Translation (MR) table and other MR-related information are used to verify the validity of the entire field. A Memory Region (MR) refers to a region in memory allocated by the RDMA software layer for storing transmitted and received data. In the IB protocol, after requesting a memory region for data storage, the user needs to register the MR by calling the API provided by the IB framework before the RDMA network card can access this memory region. Registering the MR enables the translation between virtual and physical addresses.
[0060] The payload is the "real" data being transmitted. It can be broadcast data about a device, or service data sent to all devices within a certain area; it can be additional data from an active scan response, such as the device name and the service being provided; it can be information needed to establish or maintain a connection; or it can be application layer data from one device to another.
[0061] This invention provides a data transmission method based on RDMA, comprising: acquiring multiple receive packets and preprocessing the multiple receive packets to obtain corresponding request packet operation types; performing corresponding request packet processing according to the multiple receive packets and their corresponding request packet operation types to achieve parallel processing of multiple receive packets, wherein the RDMA data transmission processing flow includes parallel processing and serial processing; summarizing the multiple receive packets after parallel processing according to a preset period, and performing serial processing on the summarized multiple receive packets according to the sequence order to complete data transmission. This method determines the request packet operation type corresponding to the receive packet through preprocessing, performs corresponding request packet processing according to different request packet operation types to achieve parallel processing of multiple receive packets, summarizes the multiple receive packets after parallel processing, and performs serial processing according to the sequence order. This avoids the head-blocking phenomenon caused by serial processing in existing data transmission processes, and the parallel processing allows memory access time to overlap, reducing latency to a certain extent and improving the processing performance of RDMA.
[0062] Based on the above embodiments, before preprocessing the multiple received packets to obtain the corresponding request packet operation type in step S11, the method further includes:
[0063] According to the RDMA data transmission protocol, there are different request packet operation types, which include at least the response packet processing type, send request packet processing type, atomic request packet processing type, read request packet processing type, and write request packet processing type.
[0064] It should be noted that the request packet operation type needs to be pre-defined before preprocessing. This request packet operation type is distinguished according to the RDMA data transmission protocol. The main purpose is to decouple the request packet processing between different request packet types based on parallel processing.
[0065] The number of request packets processed in parallel processing is set according to the number of request packet operation types. One request packet operation type is one type of request packet processing in parallel processing.
[0066] As a preferred embodiment, the request packet operation type aims to achieve parallel processing of multiple request packets as much as possible. Therefore, it includes at least the above 5 operation types, and additional parallel processing operation types can be added according to the actual situation.
[0067] In step S11, the received packets are matched with the set request packet operation types. Specifically, multiple received packets are preprocessed to obtain the corresponding request packet operation types, including:
[0068] Determine if the header information of the currently received packet is correct;
[0069] If so, the request packet operation type corresponding to the current received packet is determined based on the correspondence between the packet header information and the request packet operation type.
[0070] Understandably, the preprocessing process includes routine processing, which has been discussed in detail in the above embodiments. Here, it is necessary to check the correctness of the packet header information. If correct, the corresponding request packet operation type needs to be determined based on the packet header information of the received packet and the pre-set request packet operation type. If incorrect, the currently received packet can be marked and not processed temporarily.
[0071] The present invention provides a method to set the request packet operation type before preprocessing, and to classify and determine the corresponding request packet operation type according to the set request packet operation type, so as to facilitate subsequent parallel processing.
[0072] Based on the above embodiments, step S12, which involves processing the corresponding request packets according to the multiple received packets and their corresponding request packet operation types, includes:
[0073] If the request packet operation type corresponding to the current received packet is a response packet processing type, identify the lost response information of the current received packet, update the queue context and response packet field of the current received packet, and mark the updated current received packet as an abnormal packet to complete the processing of the current received packet.
[0074] If the request packet operation type corresponding to the current received packet is the send request packet processing type, obtain the queue information of the current received packet, and mark the current received packet as an abnormal packet to complete the processing of the current received packet;
[0075] If the request packet operation type corresponding to the current received packet is an atomic request packet processing type, read the memory data according to the current received packet, record the atomic information in the atomic context queue, and mark the current received packet as an abnormal packet to complete the processing of the current received packet;
[0076] If the request packet operation type corresponding to the current received packet is a read request packet processing type, write the current read request information into the receive read context queue, and mark the current received packet as an exception packet to complete the processing of the current received packet;
[0077] If the request packet operation type corresponding to the current received packet is a write request packet processing type, then an exception packet identification mark is made on the current received packet to complete the processing of the current received packet.
[0078] It should be noted that the preprocessing process does not only classify the received packets, but also needs to refresh the queue context. In this embodiment, the queue context is refreshed during the preprocessing process, not during the request packet processing, in order to save waiting time and at the same time, to ensure the consistency of the queue context.
[0079] In a preferred embodiment, when the request packet operation type corresponding to the current received packet is obtained, before processing the corresponding request packet according to the current received packet and the corresponding request packet operation type, the method further includes:
[0080] Obtain the prediction result for processing the corresponding request packet in the currently received packet;
[0081] The prediction results are refreshed to the queue context so that the queue context remains consistent for the next currently received packet.
[0082] In this embodiment, the response packet processing type is the content that needs to be actually refreshed during the request packet processing to update the field segment. The updated current received packet is marked as abnormal. If it is abnormal, it is marked as abnormal; if it is normal, it can be marked as normal. After marking, the processing is completed, and the process of waiting for other received packets to be processed in other request packets is entered into serial processing.
[0083] The atomic request packet processing type, based on thread safety concerns, ensures that read, update, and write operations remain relatively safe even under intense thread resource contention, thus achieving high concurrency. It reads memory data based on the currently received packet, records atomic information in the atomic context queue, and marks the currently received packet as an exception to complete the processing of that packet.
[0084] The read request packet processing type: RDMA read operation is essentially a pull operation, pulling data from the remote system's memory back to the local system's memory. The current read request information is written to the receive read context queue, and the current received packet is marked as an exception packet to complete the processing of the current received packet.
[0085] Write request packet processing type: RDMA write operation is essentially a push operation, pushing data from the local system memory to the remote system memory. The current read request information is written to the receive read context queue, and the current received packet is marked as an exception packet to complete the processing of the current received packet.
[0086] It should be noted that the above request packet processing procedure can be based on the existing request packet processing procedure and is not specifically limited.
[0087] The present invention provides a method for processing request packets based on multiple received packets and their corresponding request packet operation types. By using parallel processing, the time for accessing memory overlaps, which reduces latency to a certain extent and improves the processing performance of RDMA.
[0088] In addition to the above embodiments, this method further includes the following to save cache space:
[0089] Establish a shared cache space to store storage information for multiple received packets during parallel processing.
[0090] In the existing serial processing, a corresponding storage space is set up for each request packet processing process, resulting in a large storage space in the last processing stage. At the same time, the corresponding storage space increases with each processing stage the received packet passes through, which undoubtedly increases the storage space significantly, resulting in a large cache depth and bit width.
[0091] By setting up a shared buffer space, received packets can be stored and used at any time, resulting in a smaller buffer depth and bit width. Each type of received packet is operated independently, and the data bit width is small. After parallel processing, the shared buffer depth of the packet header is smaller than the sum of the buffer depths of the five operation types when processed sequentially, thus saving buffer space.
[0092] The foregoing has described in detail various embodiments of the RDMA-based data transmission method. Based on this, the present invention also discloses an RDMA-based data transmission apparatus corresponding to the aforementioned method. Figure 3 This is a structural diagram of a data transmission device based on RDMA provided in an embodiment of the present invention. Figure 3 As shown, the RDMA-based data transmission device includes:
[0093] The acquisition module 11 is used to acquire multiple receive packets and preprocess the multiple receive packets to obtain the corresponding request packet operation type;
[0094] The parallel processing module 12 is used to process the corresponding request packets according to the operation type of the multiple received packets to realize the parallel processing of multiple received packets. The data transmission processing flow of RDMA includes parallel processing and serial processing.
[0095] The serial processing module 13 is used to summarize multiple received packets after parallel processing according to a preset period, and to perform serial processing on the summarized multiple received packets according to the sequence order in order to complete the data transmission.
[0096] Since the embodiments of the device part correspond to the embodiments described above, please refer to the embodiments described in the method part for the embodiments of the device part, and will not be repeated here.
[0097] For an introduction to the RDMA-based data transmission device provided by the present invention, please refer to the above method embodiments. The present invention will not be described in detail here, but it has the same beneficial effects as the above RDMA-based data transmission method.
[0098] Figure 4 This is an application diagram of an RDMA-based data transmission method provided in an embodiment of the present invention, such as... Figure 4 As shown, parallel processing of five types of request packet operation types reduces packet processing latency to 1 / 5 of existing technologies, such as... Figure 1 As shown, assuming the bus delay is Td, the RDMA receive packet performance is Pa, and the buffer depth of the five-stage pipeline is Dt = 5 * Td * Pa, when there are many MISSes in the on-chip cache, the delay from when the received packet flows out of the receive packet preprocessing module to when the five-stage pipeline processing is completed is approximately 5 * Td. The delay time in this application is the corresponding Td, thus shortening the delay time.
[0099] The present invention has provided a detailed description of an RDMA-based data transmission method and an RDMA-based data transmission apparatus. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
[0100] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A data transmission method based on RDMA, characterized in that, include: Multiple receive packets are acquired, and the multiple receive packets are preprocessed to obtain the corresponding request packet operation type; Based on the multiple received packets and the corresponding request packet operation type, corresponding request packet processing is performed to achieve parallel processing of the multiple received packets, wherein the RDMA data transmission processing flow includes the parallel processing and serial processing; Multiple received packets that have been processed in parallel are aggregated according to a preset period, and the aggregated multiple received packets are processed serially according to the first-in-first-out principle in order to complete the data transmission. Correspondingly, before performing corresponding request packet processing based on the multiple received packets and the corresponding request packet operation type, the method further includes: Multiple received packets are preprocessed to match corresponding order-preserving IDs for parallel processing, and then processed serially according to the sequence order. Correspondingly, when the request packet operation type corresponding to the current received packet is obtained, before performing corresponding request packet processing based on the current received packet and the corresponding request packet operation type, the method further includes: Obtain the prediction result for processing the corresponding request packet in the currently received packet; The prediction result is refreshed in the queue context so that the next currently received packet maintains the consistency of the queue context.
2. The data transmission method based on RDMA according to claim 1, characterized in that, Before preprocessing the multiple received packets to obtain the corresponding request packet operation type, the method further includes: According to the data transmission protocol of the RDMA, the request packet operation types are divided into different types, wherein the request packet operation types include at least the response packet processing type, the send request packet processing type, the atomic request packet processing type, the read request packet processing type, and the write request packet processing type.
3. The data transmission method based on RDMA according to claim 2, characterized in that, The step of preprocessing multiple received packets to obtain the corresponding request packet operation type includes: Determine if the header information of the currently received packet is correct; If so, the request packet operation type corresponding to the current received packet is determined according to the correspondence between the packet header information and the request packet operation type.
4. The data transmission method based on RDMA according to claim 3, characterized in that, The step of processing the request packets according to the multiple received packets and the corresponding request packet operation types includes: If the request packet operation type corresponding to the current received packet is the response packet processing type, identify the lost response information of the current received packet, update the queue context of the current received packet and the field segment of the response packet, and mark the updated current received packet as an abnormal packet to complete the processing of the current received packet. If the operation type of the request packet corresponding to the current received packet is the send request packet processing type, obtain the queue information of the current received packet, and mark the current received packet as an abnormal packet to complete the processing of the current received packet; If the operation type of the request packet corresponding to the current received packet is the atomic request packet processing type, read the memory data according to the current received packet, record the atomic information in the atomic context queue, and mark the current received packet as an abnormal packet to complete the processing of the current received packet; If the operation type of the request packet corresponding to the current received packet is the read request packet processing type, write the current read request information into the receive read context queue, and mark the current received packet as an abnormal packet to complete the processing of the current received packet; If the request packet operation type corresponding to the current received packet is the write request packet processing type, the current received packet is marked as an abnormal packet to complete the processing of the current received packet.
5. The RDMA-based data transmission method according to any one of claims 1 to 4, characterized in that, Also includes: A shared cache space is established to store storage information of multiple received packets during parallel processing.
6. A data transmission device based on RDMA, characterized in that, include: The acquisition module is used to acquire multiple received packets and preprocess the multiple received packets to obtain the corresponding request packet operation type; A parallel processing module is used to perform corresponding request packet processing according to the operation type of the multiple received packets and the corresponding request packet to realize the parallel processing of the multiple received packets, wherein the data transmission processing flow of the RDMA includes the parallel processing and serial processing. The serial processing module is used to summarize multiple received packets after parallel processing according to a preset period, and to perform serial processing on the summarized multiple received packets according to the first-in-first-out principle in order to complete the data transmission. Correspondingly, before performing corresponding request packet processing based on the multiple received packets and the corresponding request packet operation type, the method further includes: Multiple received packets are preprocessed to match corresponding order-preserving IDs for parallel processing, and then processed serially according to the sequence order. Correspondingly, when the request packet operation type corresponding to the current received packet is obtained, before performing corresponding request packet processing based on the current received packet and the corresponding request packet operation type, the method further includes: Obtain the prediction result for processing the corresponding request packet in the currently received packet; The prediction result is refreshed in the queue context so that the next currently received packet maintains the consistency of the queue context.
Citation Information
Patent Citations
Method and device for parallel processing
CN102694730A
Message order preserving method and device
CN114338559A