SACK / NAK triggering retransmission method based on programmable switch
By implementing SACK/NAK triggered retransmission on programmable switches, the bandwidth waste and high latency problems caused by GBN and SR protocols in RDMA networks are solved, and more efficient RDMA data transmission performance is achieved.
Patent Information
- Application Number
- CN202510038031.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 GBN and SR protocols lead to problems of wasted bandwidth and high latency in RDMA networks, especially on long-distance wide-area networks, which cannot effectively solve the performance degradation caused by high latency.
The SACK/NAK trigger retransmission method based on a programmable switch is adopted. By receiving SACK/NAK messages, pre-cached data packets are obtained from the RDMA storage server and directly retransmitted to the receiver, reducing the transmission of duplicate data packets.
The performance of RDMA transmission under long-distance links is optimized, network bandwidth overhead is reduced, the performance and efficiency of RDMA data transmission in data centers is improved, and the retransmission burden on the host side is reduced.
Smart Images

Figure CN120050015A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network data transmission, and particularly relates to a method for triggering retransmission of SAC K / NAK based on a programmable switch. Background Art
[0002] Remote Direct Memory Access (RDMA) is an efficient network communication technology that allows computers on a network to directly exchange data in each other's memory without the intervention of the CPU and operating system, which greatly improves the data transmission speed and reduces resource consumption. RDMA technology is a key component in modern data centers and high-performance computing environments, especially in scenarios that require high throughput and low-latency networks.
[0003] The GBN protocol, also known as the Go-Back-N protocol, is a congestion control protocol for reliable transmission. Its core idea is that when continuously sending multiple data packets, the sender will stop waiting and retransmit the erroneous data packets. The working process of the GBN protocol: The sender continuously sends multiple data packets and continuously increases the sequence number within the sending window. When the receiver successfully receives the data packets and processes them in sequence number order, it sends an acknowledgment (ACK) back to the sender. If the sender does not receive the acknowledgment within the specified time, it assumes that the data packet is lost or damaged and retransmits from the erroneous data packet. The receiver sends an acknowledgment again based on the retransmitted data packet received. Repeat the above process until all data packets are successfully received and processed.
[0004] The SR protocol, also known as the Selective Repeat protocol, is a selective retransmission protocol that solves the possible vicious cycle problem in the GBN protocol. The core idea of the SR protocol is to take corresponding actions according to different events and ensure reliable data transmission through timeout and acknowledgment mechanisms. The following is the working process of the SR protocol: When upper-layer data arrives, if the sequence number is within the sending window, the data will be packed and sent. Otherwise, the data will be cached or rejected. The sender sets a separate timeout timer for each data packet. When the timer times out, only the corresponding data packet will be retransmitted, rather than retransmitting all data packets starting from the erroneous data packet. When the receiver successfully receives and processes the data packet, it sends an acknowledgment (ACK) back to the sender. If the receiver fails to receive the acknowledgment of a certain data packet within the specified time, it caches the data packet and waits for the next transmission. When the sender's window moves forward, it checks the receiver's window and sends the missing data packets. If there are missing data packets in the receiver's window, it delivers the data packet and the consecutive data packets cached before to the upper layer.
[0005] The relevant specifications of the RDMA protocol stipulate that a retransmission mechanism of Go-Back-N (GBN) is adopted for packet loss retransmission. However, the GBN algorithm will cause the retransmission of multiple packets that have reached the receiving end, resulting in bandwidth waste and the generation of duplicate redundant data packets in the network. Moreover, for the selective repeat (SR) technology, which is the currently mainstream commercial RDMA network card's choice retransmission technology, the lost packets need at least 1 RTT time to start retransmission when selectively retransmitted, and the transmission delay is still too large. Especially in long-distance wide area networks, it is impossible to effectively solve the problem of performance degradation caused by the high latency of long-distance RDMA transmission. The reason is that it is impossible to detect packet loss in a timely manner. Even in the best case, it is necessary to wait for the receiving end network card to discover and return a retransmission request. Due to the high latency problem caused by long distance, the receiving end network card cannot effectively process the subsequent arriving packets, resulting in network performance degradation and putting pressure on the network card cache.
[0006] Both of these two protocols ensure the reliable transmission of data on the network to a certain extent and improve the network performance to a certain extent. However, there are still obvious disadvantages that affect network performance and cannot adapt well to the current high-performance network. Summary of the Invention
[0007] In view of the above-mentioned defects of the prior art, the present invention proposes a method for SACK / NAK-triggered retransmission based on a programmable switch. The technical solution designed by the present invention includes:
[0008] The method is applied to a programmable switch. The programmable switch receives SACK / NAK packets; the programmable switch obtains the pre-cached data packets from the RDMA storage server according to the SACK / NAK packets; the data packets are the data packets cached during the normal forwarding process from the sender to the receiver; the programmable switch directly retransmits the data packets to the receiver.
[0009] Preferably, the programmable switch obtains the pre-cached data packets from the RDMA storage server according to the SACK / NAK packets, including:
[0010] The programmable switch determines the mirroring parameters of the RDMA READ according to the SACK / NAK packets; the programmable switch obtains the data packets from the RDMA storage server according to the mirroring parameters.
[0011] Preferably, the programmable switch obtaining the pre-cached data packets from the RDMA storage server according to the SACK / NAK packets further includes:
[0012] The programmable switch determines a first hash value and a second hash value according to the SACK / NAK packet; the programmable switch determines a virtual address VA of the data packet in the RDMA storage server according to the first hash value and the second hash value; the programmable switch obtains the data packet from the RDMA storage server according to the virtual address VA.
[0013] Preferably, the data plane of the programmable switch sends the EPSN carried in the SACK / NAK packet to the control plane, and the control plane performs logical control on timeout counting and retransmission of the EPSN.
[0014] Preferably, the control plane performs logical control on timeout counting and retransmission of the EPSN, and the steps are as follows:
[0015] S10: The data plane of the programmable switch obtains and forwards a pre-cached data packet from the RDMA storage server according to the SACK / NAK packet;
[0016] S20: The data plane constructs digest information according to the result of the mirroring parameter and sends it to the control plane for determining whether this flow needs timeout retransmission;
[0017] S30: The control plane obtains the flow information from the digest of the data plane, determines whether there is a timeout situation for the current flow. If yes, execute step S40; if no, execute step S50;
[0018] S40: Issue a flow table for the packets that need to be retransmitted for the flow with corresponding timeout;
[0019] S50: Keep checking whether the currently issued flow table has expired. If yes, execute step S60; if no, execute step S70;
[0020] S60: Set the corresponding expired entry to invalid, issue a flow table, and execute step S50;
[0021] S70: Use a loop packet to match the flow table issued by the control plane, and then construct a corresponding RDMA READ packet according to the matched entry to obtain the cached packet. Then forward the cached packet read back from the storage server to the receiver. Execute step S50;
[0022] Preferably, the determining the first hash value and the second hash value according to the SACK / NAK packet includes:
[0023] The data plane parses the SACK / NAK packet to obtain the source IP, destination IP, and queue pair, and determines the first hash value and the second hash value based on the source IP, destination IP, and queue pair.
[0024] Preferably, the digest information carries the current flow hash feature and the current EPSN.
[0025] Preferably, the control plane in S30 obtains the flow information from the data plane digest and determines whether there is a timeout situation for the current flow, including the following steps:
[0026] S3001: The control plane checks the flow information of the current digest and finds the position in the linked list corresponding to the hash value;
[0027] S3002: Check the current EPSN. If the EPSN is the same as the PSN of the digest, initialize the aging of the corresponding flow table and execute step S3004; if not, execute step S3003;
[0028] S3003: Create a new node in the current linked list and insert the current PSN into the linked list;
[0029] S3004: Initialize the timeout waiting time;
[0030] S3005: Check the timeout time of the current flow. If the current time exceeds the timeout threshold of the flow, the flow times out; otherwise, it does not time out.
[0031] Advantageous effects:
[0032] 1. This application proposes to perform packet retransmission processing at the programmable switch end. This patent specifically relates to the SACK / NAK-triggered packet retransmission function. Compared with the traditional GBN algorithm and the selective retransmission processing scheme based on the network card end, it optimizes the performance of lossy RDMA transmission in long-distance links, reduces the bandwidth overhead on the network link, increases the adaptability to burst error and high-frequency error network environments, and improves the performance and efficiency of RDMA data transmission in the data center;
[0033] 2. This application proposes a digest-based timeout retransmission processing scheme applicable to RDMA, which reduces the burden of retransmission at the host end and lowers the hardware requirements and costs at the host end. At the same time, performing packet retransmission processing on the switch can perform more efficient traffic management and improve the overall efficiency of the data center. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic flowchart of a preferred embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of the interaction process between the data plane and the control plane modules of a preferred embodiment of the present invention;
[0036] Figure 3It is a schematic diagram of the implementation process of the data plane function in a preferred embodiment of the present invention;
[0037] Figure 4 It is a schematic diagram of the implementation process of the control plane function in a preferred embodiment of the present invention. Detailed implementation manners
[0038] 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.
[0039] The present invention designs a method for triggering retransmission based on SACK / NAK of a programmable switch, as Figure 1 shown. The technical solution designed by the present invention includes:
[0040] The method is applied to a programmable switch. The programmable switch receives SACK / NAK messages; the programmable switch obtains pre-cached data packets from the RDMA storage server according to the SACK / NAK messages, where the data packets are the data packets cached during the normal forwarding process from the sender to the receiver; the programmable switch directly retransmits the data packets to the receiver.
[0041] Preferably, the programmable switch obtains pre-cached data packets from the RDMA storage server according to the SACK / NAK messages, including:
[0042] The programmable switch determines the mirror parameters of the RDMA READ according to the SACK / NAK messages; the programmable switch obtains the data packets from the RDMA storage server according to the mirror parameters.
[0043] Preferably, the programmable switch obtains pre-cached data packets from the RDMA storage server according to the SACK / NAK messages, and further includes:
[0044] The programmable switch determines the first hash value and the second hash value according to the SACK / NAK messages; the programmable switch determines the virtual address VA of the data packets in the RDMA storage server according to the first hash value and the second hash value; the programmable switch obtains the data packets from the RDMA storage server according to the virtual address VA.
[0045] Specifically, the programmable switch sets the parameters in the data packets obtained by mirroring according to mirror_type to obtain an RDMA READ packet, including the length of the message to be obtained, the mac field, the ip field, the rdma bth field, the VA obtained by hash collision, etc.
[0046] Preferably, the data plane of the programmable switch sends the EPSN carried in the SACK / NAK message to the control plane, and the control plane performs logical control on the timeout counting and retransmission of the EPSN.
[0047] Specifically, EPSN is Expect Packet Sequence Number.
[0048] Preferably, as Figures 2-3 shown, the logical control of the control plane for timeout counting and retransmission of EPSN is as follows:
[0049] S10: The data plane of the programmable switch obtains and forwards the pre-cached data packets from the RDMA storage server according to the SACK / NAK message;
[0050] S20: The data plane constructs digest information for the control plane according to the result of the mirroring parameter, which is used to determine whether this flow needs timeout retransmission;
[0051] S30: The control plane obtains the flow information from the digest of the data plane, determines whether there is a timeout situation for the current flow. If yes, execute step S40; if no, execute step S50;
[0052] S40: Issue the flow table of the packets that need to be retransmitted for the flow with the corresponding timeout;
[0053] S50: Keep checking whether the currently issued flow table has expired. If yes, execute step S60; if no, execute step S70;
[0054] S60: Set the corresponding expired entry to invalid, issue the flow table, and execute step S50;
[0055] S70: Use a loop message to match the flow table issued by the control plane, then construct the corresponding RDMA READ message according to the entries in the match to obtain the cached message, and then forward the cached message read back from the storage server to the receiver, and execute step S50;
[0056] Preferably, determining the first hash value and the second hash value according to the SACK / NAK message includes: the data plane parses the SACK / NAK message to obtain the source IP, destination IP, and queue pair, and determines the first hash value and the second hash value based on the source IP, destination IP, and queue pair.
[0057] Preferably, the digest information carries the current flow hash feature and the current EPSN.
[0058] Preferably, as Figure 4As shown, the control plane in S30 obtains the flow information from the data plane digest and determines whether there is a timeout situation for the current flow, including the following steps:
[0059] S3001: The control plane checks the flow information of the current digest and finds the position in the linked list corresponding to the hash value;
[0060] S3002: Check the current EPSN. If the EPSN is the same as the PSN of the digest, initialize the aging of the corresponding flow table and execute step S3004; if not, execute step S3003;
[0061] S3003: Create a new node in the current linked list and insert the current PSN into the linked list;
[0062] S3004: Initialize the timeout waiting time;
[0063] S3005: Check the timeout time of the current flow. If the current time exceeds the timeout threshold of the flow, the flow times out; otherwise, it does not time out.
[0064] Specifically, after S3005, it also includes checking the timeout waiting time, and the specific steps are as follows:
[0065] S301: Check whether there is remaining time for the timeout waiting time. If there is, go to S302; if not, go to S303;
[0066] S302: Subtract the current time from the timeout waiting time, go to S3005, and continue the loop;
[0067] S303: Set the parameters of the issued flow table corresponding to the linked list, issue the flow table to the data plane, go to S3005, and continue the loop.
[0068] 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 based on 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 of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the protection scope determined by the claims.
Claims
1. A method for SACK / NAK triggered retransmission based on a programmable switch, characterized in that: include: The method is applied to a programmable switch, and the programmable switch receives a SACK / NAK message; The programmable switch obtains a pre-cached data packet from the RDMA storage server according to the SACK / NAK message; the data packet is a data packet cached during normal forwarding from the sender to the receiver; the programmable switch directly retransmits the data packet to the receiver.
2. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 1, characterized in that: The programmable switch obtains a pre-cached data packet from the RDMA storage server according to the SACK / NAK message, including: The programmable switch determines a mirror parameter of the RDMA READ according to the SACK / NAK message; and the programmable switch obtains the data packet from the RDMA storage server according to the mirror parameter.
3. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 2, characterized in that: The programmable switch obtains a pre-cached data packet from the RDMA storage server according to the SACK / NAK message, and further includes: The programmable switch determines a first hash value and a second hash value according to the SACK / NAK message; the programmable switch determines a virtual address VA of the data packet in the RDMA storage server according to the first hash value and the second hash value; the programmable switch obtains the data packet from the RDMA storage server according to the virtual address VA.
4. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 3, characterized in that: The data plane of the programmable switch sends the EPSN carried in the SACK / NA K message to the control plane, and the control plane performs logical control of timeout counting and retransmission on the EPSN.
5. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 4, characterized in that: The control plane performs logical control of timeout count retransmission on the EPSN, and the steps are as follows: S10: The data plane of the programmable switch obtains and forwards the pre-cached data packet from the RDMA storage server according to the SACK / NAK message; S20: The data plane constructs digest information based on the mirroring parameter result and sends it to the control plane to determine whether this flow needs to be retransmitted after a timeout. S30: The control plane obtains the flow information from the digest of the data plane and determines whether the current flow has a timeout condition. If yes, execute step S40; otherwise, execute step S50; S40: Sending a flow table of packets that need to be retransmitted for the corresponding timed-out flows; S50: Check whether the currently issued flow table is expired. If yes, execute step S60; otherwise, execute step S70; S60: invalidate the corresponding expired entry, issue the flow table, and execute step S50; S70: Use a loop message to match the flow table sent by the control plane, and then construct a corresponding RDMA READ message according to the matching entry to obtain the cache message. Then forward the cache message read back from the storage server to the receiver. Execute step S50.
6. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 5, characterized in that: The determining the first hash value and the second hash value according to the SACK / NAK message includes: The data plane parses the SACK / NAK message to obtain the source IP, the target IP and the queue pair, and determines the first hash value and the second hash value based on the source IP, the target IP and the queue pair.
7. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 6, characterized in that: The digest information carries the current flow hash feature and the current EPSN.
8. The method for SACK / NAK triggered retransmission based on a programmable switch according to claim 7, characterized in that: The control plane in S30 obtains the flow information digested by the data plane and determines whether a timeout condition occurs in the current flow, including the following steps: S3001: The control plane checks the current digest flow information and finds the position in the linked list corresponding to the hash value; S3002: Check the current EPSN. If the EPSN is the same as the digest PSN, initialize the time of the corresponding flow table and execute step S3004. If they are not the same, execute step S3003. S3003: Create a new node in the current linked list and insert the current PSN into the linked list; S3004: Initialize timeout waiting time; S3005: Check the timeout of the current flow. If the current time exceeds the timeout threshold of the flow, the flow times out. Otherwise, the flow does not time out.