Multistage selective retransmission system based on RDMA programmable switch gateway
By introducing a multi-stage selective retransmission system based on programmable switches into RDMA technology, the problems of latency and bandwidth waste in high packet loss rates and long-distance network environments are solved, and more efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510038024.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-27
AI Technical Summary
The existing RDMA technology has problems of bandwidth waste and increased latency in high packet loss rates and long-distance network environments, especially in cross-regional and long-distance network environments. The existing GBN and SACK mechanisms rely on feedback confirmation from the receiver, resulting in slow retransmission response speed.
A multi-level selective retransmission system based on RDMA programmable switch gateway is designed, including RDMA message cache module, RDMA stream tail packet detection module and SACK/NAK trigger retransmission module. Through the mechanism of active retransmission and fast response, retransmission delay is reduced and transmission efficiency is improved.
It significantly improves the performance of RDMA transmission, reduces retransmission delay, reduces network load on the host side, and improves the reliability and efficiency of data transmission.
Smart Images

Figure CN120050005A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network communication technologies, and particularly relates to a multi-level selective repeat system based on an RDMA programmable switch gateway. Background Art
[0002] RDMA (Remote Direct Memory Access) is an efficient network communication technology that allows computers in a network to access each other's memory without the direct participation of the CPU, thereby achieving lower latency and higher transmission speeds. Since the RDMA technology can significantly reduce the data processing load in network transmission, it is widely used in scenarios such as high-performance computing (HPC), distributed storage systems, and data center networks, and is particularly suitable for use in environments with high throughput and low latency requirements. In modern data centers, RDMA has become an important means to meet the requirements of low latency, high concurrency, and high throughput.
[0003] However, the existing RDMA technology has significant defects in handling packet loss. The current retransmission mechanism of RDMA is usually based on the GBN (Go-Back-N) or SACK (Selective Acknowledgment) algorithm. In the case of packet loss, the GBN mechanism will retransmit all subsequent packets starting from the lost packet. This method can work effectively in a low packet loss environment, but in an environment with a high packet loss rate, it will cause a large amount of bandwidth waste and significantly increase the latency. The SACK (Selective Acknowledgment) mechanism can alleviate the bandwidth waste to a certain extent, but its design mainly relies on end-to-end hardware implementation, such as NIC (Network Interface Card). Therefore, the SACK mechanism still has performance bottlenecks in long-distance environments with high latency and high packet loss, because the retransmission process needs to wait for end-to-end feedback confirmation, resulting in a slow retransmission response speed. Especially in a cross-regional, long-distance network environment, the existing GBN and SACK mechanisms both rely on feedback confirmation from the receiving end to trigger retransmission. This results in that in long-distance transmission, RDMA needs to wait for at least one RTT to start retransmission, increasing the transmission latency. In this way, the problems of high feedback latency and high packet loss rate in long-distance transmission have greatly reduced the RDMA communication efficiency and seriously affected its performance in scenarios such as distributed data centers. Summary of the Invention
[0004] In view of the above-mentioned defects of the prior art, the present invention proposes a multi-level selective repeat system based on an RDMA programmable switch gateway. The technical solutions designed by the present invention include:
[0005] A programmable switch, an RDMA server, and a SACK / NAK trigger retransmission module;
[0006] The programmable switch includes an RDMA packet cache module, an RDMA stream tail packet detection module, and an active retransmission module;
[0007] The RDMA packet cache module is used to send a connection request to the RDMA server, identify the RDMA packet, and cache it to the RDMA server;
[0008] The RDMA stream tail packet detection module is used to identify the loss situation of the stream tail packet of the RDMA packet during the process of caching the RDMA packet and generate a retransmission table;
[0009] The SACK / NAK trigger retransmission module is used to trigger the retransmission mechanism when the RDMA stream tail packet detection module generates a retransmission table;
[0010] The active retransmission module is used to scan the retransmission table from the RDMA packet cache module when the retransmission mechanism is triggered, read the stream tail packet of the lost RDMA packet, and return it to the RDMA packet cache module to complete the retransmission operation.
[0011] Preferably, the sending of the connection request from the RDMA packet cache module to the RDMA server includes the following steps:
[0012] S101: Initialize and configure the RDMA packet cache module and the RDMA server;
[0013] S102: The RDMA packet cache module initiates a connection request to the RDMA server
[0014] S103: Detect the connection status. If the connection is successful, execute step S105; if the connection fails, execute step S104;
[0015] S104: Print an error message and release resources;
[0016] S105: Issue a flow table to establish a connection with the RDMA server.
[0017] Preferably, the identification of the RDMA packet by the RDMA packet cache module and caching it to the RDMA server includes the following steps:
[0018] S201: In the Ingress Control stage, perform flow table matching on the RDMA packet;
[0019] S202: Set the mirror type for the RDMA packet;
[0020] S202: Based on the set mirror type, search for and match the feature hash table;
[0021] S203: Extract the IP and QP information of the RDMA packet and calculate the hash stream feature of the RDMA packet;
[0022] S204: In the Ingress Parser stage, mirror and transfer the hash stream feature of the RDMA packet together with the RDMA packet to the Egress stage;
[0023] S205: In the Egress stage, calculate two hash values respectively using the hash algorithm based on the hash stream feature and PSN of the RDMA packet;
[0024] S206: Perform an exclusive OR operation on the two hash values to determine the storage address of the RDMA packet;
[0025] S207: Fill in the header information of the RDMA packet and send it to the RDMA server together with the storage address of the RDMA packet to implement caching of the RDMA packet.
[0026] Preferably, the RDMA stream tail packet detection module is used to identify the loss situation of the stream tail packet of the RDMA packet during the caching process of the RDMA packet and generate a retransmission table, including the following steps:
[0027] S301: After receiving the RDMA packet on the data plane, calculate the hash stream feature of each RDMA packet and record the maximum PSN number;
[0028] S302: Regularly generate a digest packet according to the set rules;
[0029] S303: Check whether the maximum PSN number of the RDMA packet meets the condition for generating the digest information based on the generated digest packet. If it meets, execute step S304; otherwise, execute step S305;
[0030] S304: Generate the corresponding digest information and upload it to the control plane. The control plane resets the counter and waits for the next RDMA packet;
[0031] S305: The control plane determines whether the counter times out. If it times out, execute step S307; otherwise, execute step S306;
[0032] S306: The counter continues to wait;
[0033] S307: Determine the loss of the stream tail packet of the RDMA packet and generate a retransmission table based on its hash stream feature.
[0034] Preferably, the retransmission triggering mechanism of the SACK / NAK triggering retransmission module includes direct retransmission triggering, including the following steps:
[0035] S401: Generate a SACK / NAK packet and return it to the programmable switch to indicate that there is a loss of data packets;
[0036] S402: Calculate the hash stream feature of the SACK / NAK packet;
[0037] S403: Generate an RDMA READ packet based on the PSN and hash stream feature of the SACK / NAK packet;
[0038] S404: Read and cache the corresponding packet from the RDMA server, and then trigger a retransmission.
[0039] Preferably, the retransmission triggering mechanism of the SACK / NAK triggering retransmission module further includes a timeout count triggering retransmission, including the following steps:
[0040] S501: Generate a SACK / NAK packet and return it to the programmable switch to indicate that a data packet is lost;
[0041] S502: Generate digest information based on the SACK / NAK packet, check whether the digest information of this stream has been stored. If so, execute step S504; otherwise, execute step S503;
[0042] S503: Store this digest information in the linked list;
[0043] S504: Check whether the epsn has changed. If so, execute step S505; otherwise, execute step S506;
[0044] S505: Add the change information of this epsn to the linked list and reset the timeout timer;
[0045] S506: Decrease the timeout count;
[0046] S507: Check whether the timeout count value is 0. If so, execute step S509; otherwise, execute step S508;
[0047] S508: Reset the timer;
[0048] S509: Trigger a retransmission.
[0049] Preferably, when the retransmission mechanism is triggered, the active retransmission module scans the retransmission table from the RDMA packet cache module, reads the tail packet of the lost RDMA packet and returns it to the RDMA packet cache module to complete the retransmission operation, including the following steps:
[0050] S601: Scan the retransmission table. When the hash feature of a specific stream is matched, read the PSN number of this stream;
[0051] S602: Construct an RDMA READ request based on the read PSN number and send the request to the RDMA server;
[0052] S603: The RDMA server reads the end-of-stream packet of the lost RDMA packet and returns it to the RDMA packet cache module;
[0053] S604: The RDMA packet cache module receives the lost RDMA packet and re-caches it to the RDMA server.
[0054] Beneficial effects:
[0055] 1. The present invention designs a function for caching RDMA packets, enabling the RDMA server to actively cache data packets so as to quickly respond in case of packet loss or retransmission need, significantly improving the retransmission efficiency and the reliability of data transmission;
[0056] 2. The present invention designs a function for real-time detection and retransmission of the end-of-stream packet of RDMA packets. Through the real-time monitoring of the flow status by the switch, when the end-of-stream packet loss is detected, the retransmission operation is quickly triggered, the end-of-stream packet data is read from the RDMA server cache, and the retransmission delay is reduced from tens of milliseconds in the traditional case to within 500 microseconds, significantly improving the performance of RDMA transmission;
[0057] 3. The present invention designs a retransmission function triggered by SACK / NAK packets. When the switch receives a NAK or SACK packet, by parsing the flow feature information in the packet, an RDMA READ packet is constructed and the corresponding data packet is read from the cache of the RDMA server so as to quickly retransmit it to the receiving end. This function significantly reduces the delay of RDMA transmission and reduces the network load at the host side. Description of the drawings
[0058] Figure 1 is a schematic diagram of the system structure of a preferred embodiment of the present invention;
[0059] Figure 2 is a schematic diagram of the system operation of a preferred embodiment of the present invention;
[0060] Figure 3 is a schematic diagram of an RDMA packet of a preferred embodiment of the present invention;
[0061] Figure 4 is a schematic diagram of the flow of the RDMA packet cache module of a preferred embodiment of the present invention;
[0062] Figure 5 is a schematic diagram of the flow of the RDMA end-of-stream packet detection and active retransmission module of a preferred embodiment of the present invention;
[0063] Figure 6 is a schematic diagram of the flow of the SACK / NAK-triggered retransmission function module of a preferred embodiment of the present invention. Detailed implementation manners
[0064] The embodiments of the present invention will be described in detail below. The following embodiments are implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation processes are given. However, the protection scope of the present invention is not limited to the following embodiments.
[0065] The present invention designs a multi-level selective repeat system based on an RDMA programmable switch gateway, as Figures 1-3 shown. The technical solution specifically includes:
[0066] A programmable switch, an RDMA server, and a SACK / NAK-triggered retransmission module;
[0067] The programmable switch includes an RDMA packet cache module, an RDMA stream tail packet detection module, and an active retransmission module;
[0068] The RDMA packet cache module is used to send a connection request to the RDMA server, identify the RDMA packet, and cache it to the RDMA server;
[0069] The RDMA stream tail packet detection module is used to identify the loss of the stream tail packet of the RDMA packet during the caching process of the RDMA packet and generate a retransmission table;
[0070] The SACK / NAK-triggered retransmission module is used to trigger the retransmission mechanism after the RDMA stream tail packet detection module generates the retransmission table;
[0071] The active retransmission module is used to scan the retransmission table from the RDMA packet cache module after the retransmission mechanism is triggered, read the stream tail packet of the lost RDMA packet, and return it to the RDMA packet cache module to complete the retransmission operation.
[0072] Preferably, as Figure 4 shown, the sending of the connection request from the RDMA packet cache module to the RDMA server includes the following steps:
[0073] S101: Initialize and configure the RDMA packet cache module and the RDMA server;
[0074] S102: The RDMA packet cache module sends a connection request to the RDMA server.
[0075] S103: Detect the connection status. If the connection is successful, execute step S105; if the connection fails, execute step S104;
[0076] S104: Print an error message and release the resources;
[0077] S105: Issue a flow table to establish a connection with the RDMA server.
[0078] Preferably, the RDMA packet caching module for identifying and caching RDMA packets to an RDMA server includes the following steps:
[0079] S201: In the Ingress Control stage, perform flow table matching on the RDMA packet;
[0080] S202: Set the mirror type for the RDMA packet;
[0081] S202: Based on the set mirror type, search for and match the feature hash table;
[0082] S203: Extract the IP and QP information of the RDMA packet and calculate the hash stream feature of the RDMA packet;
[0083] S204: In the Ingress Parser stage, mirror and transfer the hash stream feature of the RDMA packet and the RDMA packet together to the Egress stage;
[0084] S205: In the Egress stage, calculate two hash values respectively using the hash algorithm according to the hash stream feature and PSN of the RDMA packet;
[0085] S206: Perform an exclusive OR operation on the two hash values to determine the storage address of the RDMA packet;
[0086] S207: Fill in the header information of the RDMA packet and send it to the RDMA server together with the storage address of the RDMA packet to implement the caching of the RDMA packet.
[0087] Specifically, in S201, performing flow table matching on the RDMA packet is used to check whether the packet belongs to an RDMA packet by matching with the entries in the flow table. If it is an RDMA packet, the switch will set relevant metadata information, such as the mirror type. This metadata information will be used in subsequent processing stages. According to the hash stream feature and PSN (Packet Sequence Number) in the packet, the switch calculates two hash values based on different hash algorithms, and the two hash values are used to determine the final storage address. PSN is Packet Sequence Number, that is, the packet sequence number. The header information of the RDMA packet includes the RDMA header and the IP header.
[0088] Preferably, as Figure 5 shown, the RDMA flow tail packet detection module is used to identify the loss situation of the flow tail packet of the RDMA packet during the process of caching the RDMA packet and generate a retransmission table, including the following steps:
[0089] S301: After receiving an RDMA message on the data plane, calculate the hash stream feature of each RDMA message and record the maximum PSN number;
[0090] S302: Regularly generate a digest message according to the set rules;
[0091] S303: Based on the generated digest message, check whether the maximum PSN number of the RDMA message meets the condition for generating digest information. If it meets, execute step S304; otherwise, execute step S305;
[0092] S304: Generate the corresponding digest information and upload it to the control plane. The control plane resets the counter and waits for the next RDMA message;
[0093] S305: The control plane determines whether the counter times out. If it times out, execute step S307; otherwise, execute step S306;
[0094] S306: The counter continues to wait;
[0095] S307: Determine that the end-of-stream packet of the RDMA message is lost, and generate a retransmission table based on its hash stream feature.
[0096] Specifically, the data plane will regularly generate a digest message according to the set rules, by default every 128 messages, and the configuration is adjustable.
[0097] Preferably, the retransmission triggering mechanism of the SACK / NAK triggering retransmission module includes directly triggering retransmission, including the following steps:
[0098] S401: Generate a SACK / NAK message and return it to the programmable switch to indicate that there is a packet loss;
[0099] S402: Calculate the hash stream feature of the SACK / NAK message;
[0100] S403: Generate an RDMA READ packet according to the PSN and hash stream feature of the SACK / NAK message;
[0101] S404: Read and cache the corresponding message from the RDMA server, and then trigger retransmission.
[0102] Preferably, as Figure 6 shown, the retransmission triggering mechanism of the SACK / NAK triggering retransmission module further includes timeout count triggering retransmission, including the following steps:
[0103] S501: Generate a SACK / NAK message and return it to the programmable switch to indicate that there is a packet loss;
[0104] S502: Generate digest information based on the SACK / NAK message, check whether the digest information of this stream has been stored. If so, execute step S504; otherwise, execute step S503;
[0105] S503: Store this digest information into the linked list;
[0106] S504: Check whether the epsn has changed. If so, execute step S505; otherwise, execute step S506;
[0107] S505: Add the change information of this epsn to the linked list and reset the timeout timer;
[0108] S506: Decrease the timeout count;
[0109] S507: Check whether the timeout count value is 0. If so, execute step S509; otherwise, execute step S508;
[0110] S508: Reset the timer;
[0111] S509: Trigger retransmission.
[0112] Preferably, as Figure 5 shown, the active retransmission module is used to, after the retransmission mechanism is triggered, scan the retransmission table from the RDMA message cache module, read the stream tail packet of the lost RDMA message and return it to the RDMA message cache module to complete the retransmission operation, including the following steps:
[0113] S601: Scan the retransmission table. When the hash feature of a specific stream is matched, read the PSN number of this stream;
[0114] S602: Construct an RDMA READ request according to the read PSN number and send the request to the RDMA server;
[0115] S603: The RDMA server reads the stream tail packet of the lost RDMA message and returns it to the RDMA message cache module;
[0116] S604: The RDMA message cache module receives the lost RDMA message and re-caches it to the RDMA server.
[0117] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations according to the concept of the present invention without creative labor. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the protection scope determined by the claims.
Claims
1. A multi-stage selective retransmission system based on RDMA programmable switch gateway, characterized in that: include: Programmable switch, RDMA server and SACK / NAK triggered retransmission module; The programmable switch includes an RDMA message cache module, an RDMA flow tail packet detection module and an active retransmission module; The RDMA message cache module is used to send a connection request to the RDMA server, identify the RDMA message and cache it to the RDMA server; The RDMA flow tail packet detection module is used to identify the flow tail packet loss of the RDMA message in the process of caching the RDMA message, and generate a retransmission table; The SACK / NAK triggered retransmission module is used to trigger the retransmission mechanism after the RDMA stream tail packet detection module generates a retransmission table; The active retransmission module is used to scan the retransmission table from the RDMA message buffer module when the retransmission mechanism is triggered, read the tail packet of the lost RDMA message and return it to the RDMA message buffer module to complete the retransmission operation.
2. According to claim 1, a multi-stage selective retransmission system based on RDMA programmable switch gateway is characterized in that: The RDMA message buffer module sends a connection request to the RDMA server, comprising the following steps: S101: Initialize and configure the RDMA message cache module and the RDMA server; S102: The RDMA message cache module initiates a connection request to the RDMA server. S103: Detect the connection status. If the connection is successful, execute step S105. If the connection fails, execute step S104. S104: Print error information and release resources; S105: Send the flow table and establish a connection with the RDMA server.
3. According to claim 2, a multi-stage selective retransmission system based on RDMA programmable switch gateway is characterized in that: The RDMA message caching module identifies the RDMA message and caches it to the RDMA server, including the following steps: S201: In the Ingress Control stage, the RDMA message is matched with the flow table; S202: Setting a mirror type for the RDMA message; S202: based on the set image type, searching and matching the feature hash table; S203: extracting IP and QP information of the RDMA message, and calculating the hash flow characteristics of the RDMA message; S204: In the Ingress Parser stage, the hash flow feature of the RDMA message is mirrored and transmitted to the Egress stage together with the RDMA message; S205: In the Egress phase, two hash values are calculated using a hash algorithm according to the hash flow characteristics and PSN of the RDMA message; S206: Perform an XOR operation on the two hash values to determine the storage address of the RDMA message; S207: Fill in the header information of the RDMA message and send it to the RDMA server together with the storage address of the RDMA message to achieve caching of the RDMA message.
4. According to claim 3, a multi-stage selective retransmission system based on RDMA programmable switch gateway is characterized in that: The RDMA flow tail packet detection module is used to identify the flow tail packet loss of the RDMA message in the process of caching the RDMA message, and generate a retransmission table, including the following steps: S301: After receiving the RDMA message on the data plane, the hash flow feature of each RDMA message is calculated and the maximum PSN number is recorded; S302: Generate a digest message periodically according to the set rules; S303: Check whether the maximum PSN number of the RDMA message meets the conditions for generating digest information based on the generated digest message. If yes, execute step S304; otherwise, execute step S305; S304: Generate corresponding digest information and upload it to the control plane. The control plane resets the counter and waits for the next RDMA message. S305: The control plane determines whether the counter has timed out. If so, step S307 is executed; otherwise, step S306 is executed. S306: The counter continues to wait; S307: Determine whether the tail packet of the RDMA message is lost, and generate a retransmission table based on its hash flow characteristics.
5. According to claim 4, a multi-stage selective retransmission system based on RDMA programmable switch gateway is characterized in that: The triggering retransmission mechanism of the SACK / NAK triggered retransmission module includes directly triggering retransmission, including the following steps: S401: Generate a SACK / NAK message and return it to the programmable switch to indicate that a data packet has been lost; S402: Calculate the hash flow characteristics of the SACK / NAK message; S403: Generate an RDMA READ packet according to the PSN and hash flow characteristics of the SACK / NAK message; S404: Read and cache the corresponding message from the RDMA server, and then trigger retransmission.
6. The multi-stage selective retransmission system based on RDMA programmable switch gateway according to claim 5 is characterized in that: The trigger retransmission mechanism of the SACK / NAK triggered retransmission module further includes timeout count trigger retransmission, including the following steps: S501: Generate a SACK / NAK message and return it to the programmable switch to indicate that a data packet has been lost; S502: Generate digest information according to the SACK / NAK message, and check whether the digest information of the flow has been stored. If yes, execute step S504; if no, execute step S503; S503: Store the digest information into a linked list; S504: Check whether the EPSN has changed. If yes, execute step S505; if no, execute step S506; S505: adding the change information of the EPSN to the linked list and resetting the timeout timer; S506: timeout count decreases; S507: Check whether the timeout count value is 0, if yes, execute step S509, if no, execute step S508; S508: Reset the timer; S509: trigger retransmission.
7. The multi-stage selective retransmission system based on RDMA programmable switch gateway according to claim 6 is characterized in that: The active retransmission module is used to scan the retransmission table from the RDMA message cache module when the retransmission mechanism is triggered, read the tail packet of the lost RDMA message and return it to the RDMA message cache module to complete the retransmission operation, including the following steps: S601: Scan the retransmission table, and when a hash feature of a specific flow is matched, read the PSN number of the flow; S602: construct an RDMA READ request according to the read PSN number, and send the request to the RDMA server; S603: The RDMA server reads the tail packet of the lost RDMA message and returns it to the RDMA message buffer module; S604: The RDMA message cache module receives the lost RDMA message and caches it to the RDMA server again.
Citation Information
Cited By
SACK-based packet loss retransmission and receiving method
CN120856277A