Data packet out-of-order recovery method based on selective confirmation

By maintaining a bitmap at the receiving end and retransmitting data packets at the sending end according to selective acknowledgment instructions, the problem of frequent retransmissions under high packet loss rates in the RoCE protocol is solved, improving data transmission efficiency and reducing latency.

CN121508749APending Publication Date: 2026-02-10SHANGHAI INTELLIGENT COMPUTING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511684664.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In high packet loss network environments, the RoCE protocol leads to frequent retransmissions, resulting in wasted network bandwidth and transmission delays, which seriously affect system performance.

Method used

A selective acknowledgment-based out-of-order packet recovery method is adopted. By maintaining a bitmap at the receiving end to indicate the packets that need to be retransmitted, the sending end retransmits specific packets according to the feedback hole information, thus avoiding the complete rollback process.

Benefits of technology

It improves data transmission efficiency, reduces the number of retransmissions, lowers transmission latency, and enhances network bandwidth utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121508749A_ABST
    Figure CN121508749A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of remote memory access, in particular to a selective confirmation-based data packet out-of-order recovery method, which comprises the following steps of: when a data packet is received, judging whether a hole region exists in a bitmap, whether the hole region is a newly generated hole region and whether all hole regions can be cleared; and feeding back a selective acknowledgement message or an acknowledgement response frame according to a judgment result. In order to solve the problem that the RoCE in the prior art needs to repeatedly transmit subsequent data packets for multiple times in the retransmission process, in the embodiment, the data packets needing to be retransmitted are indicated on the receiving end side in a bitmap maintenance mode. In the process of receiving the data packets, filling is sequentially carried out according to the received serial numbers of the data packets, the holes needing to be retransmitted are indicated, the sending end retransmits the specific data packets according to the fed back hole information, the backspacing process does not need to be completely executed, and therefore the transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote memory access technology, and more specifically to a method for recovering out-of-order data packets based on selective confirmation. Background Technology

[0002] RoCE (RDMA over Converged Ethernet) is a Remote Direct Memory Access protocol over Ethernet, designed to achieve high-performance, low-latency data transmission over Ethernet networks. RDMA is a data transfer method that allows data to be transferred from the memory of one computer to the memory of another without involving the host CPU. To ensure accuracy during transmission, RoCE employs a go-back-N retransmission algorithm to handle packet loss during data transmission.

[0003] In the packet transmission process of the RoCE (RDMA over Converged Ethernet) protocol, the Base Transformation Header (BTH) plays a crucial role. This header contains a key field—the Packet Serial Number (PSN)—which assigns a unique sequence identifier to each packet. Simultaneously, the receiving end maintains an expected Packet Serial Number (ePSN) for each communication link. This value represents the sequence number of the next packet the receiver expects to receive. Whenever the receiving end receives a packet, it rigorously checks the PSN value in the packet header and compares it with the locally maintained ePSN. Through this mechanism, the receiving end can accurately determine whether packet loss, out-of-order packet delivery, or other anomalies have occurred on the link.

[0004] For example, during a data transmission, a data packet with PSN 2 is lost for some reason. When the receiving end subsequently receives a data packet with PSN 3, it compares the PSNs and finds a gap in the PSN sequence (jumping directly from 1 to 3), indicating that the data packet with PSN 2 has been lost. The receiving end will quickly react by generating and sending a NACK (Negative Acknowledgment) packet containing PSN 2. When the sending end receives this NACK packet, regardless of how many subsequent data packets have been successfully sent (e.g., PSNs 4, 5, 6, etc.), it must immediately stop the current data transmission and retransmit all data packets starting from the lost PSN (i.e., PSN=2).

[0005] While this strict packet loss retransmission mechanism ensures the reliability of data transmission, it also introduces significant performance issues. Especially in network environments with high packet loss rates, the system frequently triggers the retransmission mechanism, resulting in a large number of data packets being repeatedly sent. This not only wastes network bandwidth but also significantly increases transmission latency. More seriously, as the network packet loss rate rises, system performance may even experience a sharp decline. Summary of the Invention

[0006] To address the aforementioned problems in existing technologies, a method for restoring out-of-order data packets based on selective acknowledgment is provided.

[0007] The specific technical solution is as follows: A method for recovering out-of-order data packets based on selective acknowledgment, applicable to remote direct memory transfer processes, includes: The sending end sends data packets to the receiving end, and the receiving end maintains a bitmap according to the actual data packets received; The bitmap is a circular queue structure, and the bitmap is marked with holes corresponding to data packets that have not been received. Multiple consecutive holes form a hole area. The data packet out-of-order recovery method includes: Step S1: When the receiving end receives a data packet sent by the other end, it determines whether the bitmap has the hole area; If so, proceed to step S2; If not, proceed to step S5; Step S2: Determine whether the hole area is a newly generated hole area; If so, proceed to step S4; If not, proceed to step S3; Step S3: Determine whether the data packet can clear all the hole areas; If so, proceed to step S5; If not, proceed to step S4; Step S4: Enter the data packet into the corresponding position, generate a selective acknowledgment message and send it back to the sending end, then return to step S1; The selective acknowledgment message is used to indicate the data packet corresponding to the starting position of the hole area; Step S5: Enter the data packet into the corresponding position and generate an acknowledgment response frame corresponding to the data packet and send it back to the sending end, then return to step S1.

[0008] On the other hand, the bitmap records the reception status of each data packet respectively; The receiving status consists of receiving a data packet, not receiving a data packet, receiving the last data packet of the message, and receiving the last data packet of the message and needing to send a response.

[0009] On the other hand, each of the multiple data packets in each message includes a corresponding data packet sequence number; Step S1 includes: Step S11: When the receiving end receives the data packet sent by the other end, it determines whether the bitmap has the hole area; If so, proceed to step S2; If not, proceed to step S12; Step S12: Determine the expected sequence number of the currently received data packet according to the bitmap, and determine whether the data packet sequence number is greater than the expected sequence number; If so, proceed to step S2; If not, proceed to step S5.

[0010] On the other hand, it also includes the retransmission process performed at the sending end; The retransmission process includes: Step A1: Extract the hole information from the selective acknowledgment message, and compare the hole information with the historical hole information previously received by the transmitter to confirm whether the remaining out-of-order data packets are lost; Step A2: When the out-of-order data packet is lost, confirm the lost data packet according to the hole information; Step A3: Generate a new data packet based on the lost data packet and move it to the head of the sending queue.

[0011] On the other hand, during the first execution of step S2, a timer with holes is created; During each execution of step S2, the hole timer is refreshed. When the hole timer times out, a selective acknowledgment message is generated and sent back to the sending end, and then the process returns to step S1.

[0012] On the other hand, step S2 includes: Step S21: Obtain the data packet sequence number, and generate the expected sequence number and hole sequence number according to the bitmap; Step S22: Determine whether the data packet sequence number is inconsistent with both the expected sequence number and the hole sequence number; If so, proceed to step S4; If not, proceed to step S3.

[0013] On the other hand, step S3 includes: Step S31: Obtain the data packet sequence number and generate a hole sequence number based on the bitmap; Step S32: Compare the data packet sequence number and the hole sequence number, and map the data packet to the corresponding position when a matching hole sequence number is found; Step S33: Determine whether the hole area still exists after actual data entry; If so, proceed to step S5; If not, proceed to step S4.

[0014] On the other hand, in step S4, the selective acknowledgment message is sent when the SACK timestamp reaches a predetermined interval.

[0015] On the other hand, in step S5, the confirmation response frame is generated when the feedback event ends.

[0016] The above technical solution has the following advantages or beneficial effects: To address the issue in existing RoCE technologies that require multiple retransmissions of subsequent data packets during retransmission, this embodiment uses a bitmap maintained at the receiving end to indicate which data packets need retransmission. During data packet reception, the bitmap is filled in sequentially according to the received data packet sequence number, indicating the holes requiring retransmission. The sending end retransmits specific data packets based on the feedback hole information, eliminating the need for a complete rollback process and thus improving transmission efficiency. Attached Figure Description

[0017] Embodiments of the invention will be described more fully with reference to the accompanying drawings. However, the drawings are for illustration and explanation only and do not constitute a limitation on the scope of the invention.

[0018] Figure 1 This is an overall schematic diagram of an embodiment of the present invention; Figure 2 This is a schematic diagram of step S1 in an embodiment of the present invention; Figure 3 This is a schematic diagram of the retransmission process in an embodiment of the present invention; Figure 4 This is a schematic diagram of step S2 in an embodiment of the present invention; Figure 5 This is a schematic diagram of step S3 in an embodiment of the present invention. Detailed Implementation

[0019] 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 skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0021] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.

[0022] This invention includes: A method for recovering out-of-order data packets based on selective acknowledgment, applicable to remote direct memory transfer processes, includes: The sending end sends data packets to the receiving end, and the receiving end maintains a bitmap based on the actual data packets received; The bitmap is a circular queue structure. The bitmap is marked with holes corresponding to data packets that have not been received. Multiple consecutive holes form a hole area. like Figure 1 As shown, the data packet out-of-order recovery method includes: Step S1: When the receiving end receives the data packet sent by the other end, it determines whether there are any holes in the bitmap; If so, proceed to step S2; If not, proceed to step S5; Step S2: Determine whether the hole area is a newly generated hole area; If so, proceed to step S4; If not, proceed to step S3; Step S3: Determine whether the data packet can clear all the hole areas; If so, proceed to step S5; If not, proceed to step S4; Step S4: Enter the data packet into the corresponding position, generate a selective acknowledgment message and send it back to the sender, then return to step S1; Selective acknowledgment messages are used to indicate the data packet corresponding to the starting position of the hole area; Step S5: Enter the data packet into the corresponding position and generate an acknowledgment response frame corresponding to the data packet and send it back to the sending end, then return to step S1.

[0023] Specifically, addressing the issue in existing RoCE technologies that require multiple retransmissions of subsequent data packets during retransmission, this embodiment uses a bitmap maintained at the receiving end to indicate the data packets requiring retransmission. During data packet reception, the bitmap is filled sequentially according to the received data packet sequence number, indicating the holes requiring retransmission. The sending end retransmits specific data packets based on the feedback hole information, eliminating the need for a complete rollback process and thus improving transmission efficiency.

[0024] Specifically, the biggest difference between RoCE and traditional TCP / IP protocols lies in the fact that RoCE uses messages containing one or more data packets as the basic unit of transmission. During RDMA operations (such as Write and Read), the first data packet of each message carries a RETH (RDMA Extended Header), which contains metadata about the message (such as the destination memory address and length). Since the RETH header is crucial for message parsing, if the first packet is lost, even if subsequent data packets arrive, the receiving end cannot correctly parse the message content. Furthermore, the RoCE protocol requires messages to be received in order, meaning the receiving end must strictly follow the order in which messages were sent to avoid data inconsistencies caused by out-of-order delivery.

[0025] Therefore, in a packet tracking mechanism, it is necessary not only to monitor the transmission status of individual packets, but also to maintain the order and integrity of messages to ensure the reliable delivery of RETH headers and the orderly processing of messages.

[0026] To achieve precise monitoring of data packet transmission status and location of out-of-order points, the SACK-RoCE algorithm performs fine-grained status classification on received data packets and establishes anomaly markers based on this classification to fully track all abnormally transmitted data packets.

[0027] This algorithm efficiently records the reception status of each data packet by constructing a mapping relationship between data packets and bits in a circular queue bit data structure. Specifically, by maintaining the bits of the circular queue, the algorithm maps the packet sequence number (PSN) to specific bits in the bitmap and writes the status code corresponding to the reception status of the data packet into those specific bits. This allows for the rapid identification of the first missing packet and subsequent out-of-order packets, providing an accurate basis for subsequent retransmission scheduling decisions.

[0028] The reception status consists of received data packets (R), no data packets received (E), received the last data packet of the message (T), and a response (C) required after receiving the last data packet of the message. The first two reception statuses are determined according to the actual reception status of each data packet in a message, while the last two reception statuses correspond to the message tail and are determined according to whether a reception completion response (CQE) is required in the message tail.

[0029] Based on this setting, the transmission process of a RoCE message typically includes: The sending end assembles a sending queue according to the messages to be sent, and sends the data packets in sequence; The receiving end receives data packets sequentially and detects the data packet sequence number (PSN) and expected sequence number (ePSN). Based on the comparison result, it determines whether the data packet in the corresponding order in the queue has been received and writes the reception status to the corresponding position in the bitmap. This writing process can be controlled by pointers.

[0030] Ideally, the comparison results should all match, which should be represented by consecutive received data packet (R) bits at the corresponding positions in the bitmap. However, when the receiver detects that the data packet sequence number (PSN) does not match the expected ePSN, the bitmap state corresponding to the ePSN pointed to by the start pointer will definitely be marked as E (Empty). At this time, the bitmap will generate one or more consecutive E state regions, called holes.

[0031] According to the E state region that appears, the receiving end needs to generate a corresponding selective acknowledgment message as a retransmission indication and send it to the sending end. However, during this process, the sending end continues to send subsequent data packets, which is marked as an out-of-order transmission event.

[0032] In existing technologies, when similar data packet loss occurs, the receiving end stops receiving subsequent data packets until the sending end receives a retransmission instruction, at which point it reverts to the point of loss and retransmits. This results in intermediate data packets being effectively sent twice, leading to low efficiency.

[0033] In this embodiment, after an out-of-order transmission event occurs, the receiving end continues to receive data packets sent by the sending end and writes them into memory. Status markers are set at the corresponding positions in the bitmap, and the end pointer is dynamically updated to the bitmap address corresponding to the latest received out-of-order data packet.

[0034] It is important to note that the appearance of a hole directly indicates an out-of-order transmission event, and the arrival of subsequent out-of-order data packets may further expand the hole area. That is, multiple consecutive data packets are lost. In this case, it is necessary to generate corresponding selective acknowledgment messages according to the expected sequence numbers to request retransmission.

[0035] During the process of receiving retransmission instructions and parsing signaling, the sending end still sends data sequentially according to a queue. Once message parsing is complete and the sequence number of the data packet requiring retransmission is confirmed, the sending end retrieves the data packet from its buffer to generate a new data packet. The new data packet uses the same sequence number as the previous data packet and is inserted at the top of the queue for transmission.

[0036] After receiving the data packet, the receiving end will fill the corresponding hole position and will not treat it as a lost data packet. The next reception will still use the current expected sequence number for judgment.

[0037] Repeat this process until the message is sent and all holes are filled.

[0038] The following method is used to determine the integrity of messages: 1. When the last (or only) data packet of a message is received, its bitmap state is marked as T (Tail) or C (Complete). The bitmap area from the next bit after the previous T / C to the current position represents all data packets of the WQE message.

[0039] 2. If the bitmap state between the start pointer and the latest T / C is not E, the receiver determines that all data packets of the message have been completely received and triggers the following operation: 1) Update message sequence number (MSN) 2) Update the bitmap start pointer value 3) If it is the last data packet and is marked as C, generate the completion queue CQE. Using the bitmap described above, the receiving end can accurately track the transmission status and order of each data packet in each message, enabling fine-grained out-of-order detection and message integrity verification.

[0040] In one embodiment, each message contains multiple data packets, each including a corresponding data packet sequence number; like Figure 2 As shown, step S1 includes: Step S11: When the receiving end receives the data packet sent by the other end, it determines whether there are any holes in the bitmap; If so, proceed to step S2; If not, proceed to step S12; Step S12: Determine the expected sequence number of the currently received data packet according to the bitmap, and determine whether the data packet sequence number is greater than the expected sequence number; If so, proceed to step S2; If not, proceed to step S5.

[0041] Specifically, based on the above process definition, in order to achieve better transmission effect, in this embodiment, the receiving end first judges the bitmap to determine whether there are any hole areas during the continuous reception of messages.

[0042] If a hole exists, determine whether the data packet corresponds to a retransmission data packet of a selective acknowledgment message and whether a new hole has appeared.

[0043] If it does not exist, first determine the expected sequence number of the currently received data packet according to the bitmap, and then determine whether the data packet sequence number is greater than the expected sequence number. If so, it indicates that a packet loss has occurred, and a corresponding selective acknowledgment message needs to be generated. At the same time, the data packet is padded with the actual number of bits.

[0044] In one embodiment, a retransmission process performed at the sending end is also included; like Figure 3 As shown, the retransmission process includes: Step A1: Extract the hole information from the selective acknowledgment message, and compare the hole information with the historical hole information previously received by the transmitter to confirm whether the remaining out-of-order data packets have been lost. Step A2: When out-of-order data packets are lost, identify the lost data packets based on the hole information; Step A3: Generate a new data packet based on the lost data packet and move it to the head of the sending queue.

[0045] Specifically, to achieve better retransmission performance, in this embodiment, during transmission, the sending end will receive two types of responses from the receiving end based on the transmitted data packets: If an acknowledgment frame is received, the sender will parse the ePSN value in the frame. All packets prior to the ePSN are considered successfully received. At this point, the sender needs to perform the following operations: release the metadata corresponding to these acknowledgment packets stored in the Xmit_PKT object, including buffer pointers, PSN, and other information; and update the relevant register pointers to point to the area of ​​packets to be processed later, ensuring efficient management of the sending queue.

[0046] When a selective acknowledgment (SAC) message is received, the processing becomes more complex. The sender first releases the metadata of acknowledged data received before the ePSN and outside the aperture range (i.e., the unreceived data packet range explicitly identified in the SAC message), freeing up resources for subsequent use. Then, the sender parses the aperture information carried in the SAC message frame and compares it with previously recorded aperture information. This comparison allows the sender to accurately detect whether any remaining out-of-order data packets are lost. If data packet loss is confirmed, the sender immediately enters loss recovery mode: it reads the WQE content corresponding to the lost data packet, regenerates the data packet based on the original data information in the WQE, and then adds the regenerated lost data packet to the front of the transmission queue, assigning it the highest transmission priority. This ensures that these data packets can be retransmitted preferentially, thereby recovering the lost data as quickly as possible and reducing transmission delays caused by packet loss.

[0047] Furthermore, a timeout retransmission mechanism is implemented at the sending end. To address the performance degradation that may be caused by lost ACK packets, the sending end sets an independent timeout timer for each data packet. If no acknowledgment information for the corresponding data packet is received within the predetermined time, the sending end will determine that the data packet may have been lost or the acknowledgment information has not arrived, thereby triggering a retransmission operation for the data packet. This mechanism effectively compensates for the shortcomings of relying solely on acknowledgment frames, further improving the reliability of transmission.

[0048] In one embodiment, such as Figure 4 As shown, step S2 includes: Step S21: Obtain the data packet sequence number, and generate the expected sequence number and hole sequence number based on the bitmap; Step S22: Determine whether the data packet sequence number is inconsistent with both the expected sequence number and the hole sequence number; If so, proceed to step S4; If not, proceed to step S3.

[0049] Specifically, upon receiving a new data packet, the data packet sequence number is first parsed, and then the expected sequence number and hole sequence number are generated based on the bitmap.

[0050] During this process, it has been confirmed that there are corresponding holes in the diagram. At this point, the expected sequence number and the hole sequence number are compared to confirm whether the currently received data packet can be used to fill the hole. If so, the process of filling the hole is initiated. If not, the data packet is filled into the position of the corresponding sequence number and a selective acknowledgment message is generated to request retransmission.

[0051] In one embodiment, such as Figure 5 As shown, step S3 includes: Step S31: Obtain the data packet sequence number and generate the hole sequence number based on the bitmap; Step S32: Compare the data packet sequence number and the hole sequence number, and map the data packet to the corresponding position when a matching hole sequence number is found; Step S33: Determine whether there are still hole areas after actual data entry; If so, proceed to step S5; If not, proceed to step S4.

[0052] Specifically, after confirming that the data packet can be used to fill the hole area, the data packet sequence number is first obtained, and the hole sequence number is generated according to the bitmap. Then, the data packet sequence number and the hole sequence number are compared, and when a matching hole sequence number is found, the data packet is filled into the corresponding position.

[0053] Normally, the selective acknowledgment message sent always points to the earliest hole. However, in out-of-order transmission, the data packet actually received may be a data packet at any position after the starting hole. The effective filling of the hole area is achieved by recording and checking whether the hole area still exists.

[0054] In one embodiment, during the initial execution of step S2, a timer with holes is created; The hole timer is refreshed during each execution of step S2; When the hole timer times out, a selective acknowledgment message is generated and sent back to the sender, and then the process returns to step S1.

[0055] Specifically, to effectively maintain the bitmap, this embodiment also maintains a hole timer on the receiving end side. The hole timer is generated with out-of-order transmission events and refreshed each time a new data packet is received. When the hole timer times out, it indicates that a hole has appeared and no subsequent data packet has been received, resulting in packet loss. The receiving end immediately generates a selective acknowledgment message to achieve fast retransmission. This algorithm achieves accurate differentiation between packet loss events and out-of-order transmissions through the collaboration of the bitmap and the timer.

[0056] In one embodiment, in step S4, a selective acknowledgment message is sent when the SACK timestamp reaches a predetermined interval.

[0057] In one embodiment, in step S5, an acknowledgment response frame is generated when the feedback event expires.

[0058] Those skilled in the art will understand that various aspects, or possible implementations of various aspects, of the present invention can be embodied as systems, methods, or computer program products. Therefore, various aspects, or possible implementations of various aspects, of the present invention can take the form of entirely hardware embodiments, entirely software embodiments (including firmware, resident software, etc.), or embodiments combining software and hardware aspects, all collectively referred to herein as "circuit," "module," or "system." Furthermore, various aspects, or possible implementations of various aspects, of the present invention can take the form of computer program products, which are computer instructions stored in memory.

[0059] The memory can be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatuses, or any suitable combination thereof, such as random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, and portable read-only memory (CD-ROM).

[0060] A processor in a computer reads computer instructions stored in memory, enabling the processor to execute the functional actions specified in each step or combination of steps in a flowchart; and to generate means for implementing the functional actions specified in each block or combination of blocks in a flowchart.

[0061] It should be understood that a processor in a computer can be understood as one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components used to execute the aforementioned computer instructions.

[0062] Computer instructions may be executed entirely on the user's local computer, partially on the user's local computer, as a separate software package, partially on the user's local computer and partially on a remote computer, or entirely on a remote computer or server. It should also be noted that in some alternative implementations, the functions indicated by the steps in the flowchart or the blocks in the block diagram may not occur in the order shown in the diagram. For example, depending on the functions involved, two consecutive steps or blocks may actually be executed approximately simultaneously, or these blocks may sometimes be executed in reverse order.

[0063] Of course, in practical applications, the various components of a computer system are coupled together through a bus system. The bus system is used to enable communication and connection between these components. In addition to the data bus, the bus system also includes a power bus, a control bus, and a status signal bus.

[0064] While this application contains numerous specific implementation details, these should not be construed as limiting the scope of any disclosure or the scope of the claims, but rather are primarily used to describe the features of specific embodiments of a particular disclosure. Certain features described in the multiple embodiments of this application may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation of a sub-combination.

[0065] Similarly, although the configurations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these configurations to be executed in the specific order shown or sequentially, or requiring all illustrated configurations to be executed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the described embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0066] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for recovering out-of-order data packets based on selective acknowledgment, applicable to remote direct memory transfer processes, characterized in that, include: The sending end sends data packets to the receiving end, and the receiving end maintains a bitmap according to the actual data packets received; The bitmap is a circular queue structure, and the bitmap is marked with holes corresponding to data packets that have not been received. Multiple consecutive holes form a hole area. The data packet out-of-order recovery method includes: Step S1: When the receiving end receives the data packet sent by the other end, it determines whether the bitmap has the hole area; If so, proceed to step S2; If not, proceed to step S5; Step S2: Determine whether the hole area is a newly generated hole area; If so, proceed to step S4; If not, proceed to step S3; Step S3: Determine whether the data packet can clear all the hole areas; If so, proceed to step S5; If not, proceed to step S4; Step S4: Enter the data packet into the corresponding position, generate a selective acknowledgment message and send it back to the sending end, then return to step S1; The selective acknowledgment message is used to indicate the data packet corresponding to the starting position of the hole area; Step S5: Enter the data packet into the corresponding position and generate an acknowledgment response frame corresponding to the data packet and send it back to the sending end, then return to step S1.

2. The data packet out-of-order recovery method according to claim 1, characterized in that, The bitmap records the reception status of each data packet; The receiving status consists of receiving a data packet, not receiving a data packet, receiving the last data packet of the message, and receiving the last data packet of the message and needing to send a response.

3. The data packet out-of-order recovery method according to claim 1, characterized in that, Each message contains multiple data packets, each including a corresponding data packet sequence number; Step S1 includes: Step S11: When the receiving end receives the data packet sent by the other end, it determines whether the bitmap has the hole area; If so, proceed to step S2; If not, proceed to step S12; Step S12: Determine the expected sequence number of the currently received data packet according to the bitmap, and determine whether the data packet sequence number is greater than the expected sequence number; If so, proceed to step S2; If not, proceed to step S5.

4. The data packet out-of-order recovery method according to claim 1, characterized in that, It also includes the retransmission process performed at the sending end; The retransmission process includes: Step A1: Extract the hole information from the selective acknowledgment message, and compare the hole information with the historical hole information previously received by the transmitter to confirm whether the remaining out-of-order data packets are lost; Step A2: When the out-of-order data packet is lost, confirm the lost data packet according to the hole information; Step A3: Generate a new data packet based on the lost data packet and move it to the head of the sending queue.

5. The data packet out-of-order recovery method according to claim 1, characterized in that, During the initial execution of step S2, a timer with holes is created; The hole timer is refreshed each time step S2 is executed; When the hole timer times out, a selective acknowledgment message is generated and sent back to the sending end, and then the process returns to step S1.

6. The data packet out-of-order recovery method according to claim 3, characterized in that, Step S2 includes: Step S21: Obtain the data packet sequence number, and generate the expected sequence number and hole sequence number according to the bitmap; Step S22: Determine whether the data packet sequence number is inconsistent with both the expected sequence number and the hole sequence number; If so, proceed to step S4; If not, proceed to step S3.

7. The data packet out-of-order recovery method according to claim 3, characterized in that, Step S3 includes: Step S31: Obtain the data packet sequence number and generate a hole sequence number based on the bitmap; Step S32: Compare the data packet sequence number and the hole sequence number, and map the data packet to the corresponding position when a matching hole sequence number is found; Step S33: Determine whether the hole area still exists after actual data entry; If so, proceed to step S5; If not, proceed to step S4.

8. The data packet out-of-order recovery method according to claim 1, characterized in that, In step S4, the selective acknowledgment message is sent when the SACK timestamp reaches a predetermined interval.

9. The data packet out-of-order recovery method according to claim 1, characterized in that, In step S5, the confirmation response frame is generated when the feedback event ends.