Data packet transmission method and device, computer equipment, readable storage medium and program product

By using custom extension headers and serial numbers in the RDMA network to calculate the storage location of out-of-order data packets, the problem of inefficient transmission caused by out-of-order data packets is solved and efficient packet transmission is achieved.

CN120263864APending Publication Date: 2025-07-04PURPLE MOUNTAIN LAB
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510612149.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In RDMA networks, data packets arrive at the receiver in an out-of-order due to network congestion or routing changes. The prior art requires waiting for the sender to resend the packet, resulting in inefficient transmission.

Method used

When the configuration information supports custom extension headers, the receiver obtains the serial number and custom extension headers of the first packet through the transmission channel. According to the serial number of the out-of-order data packet, the serial number of the first packet, the step size and the length of the custom extension headers, the storage location of the out-of-order data packet is calculated, and the confirmation signal is returned to avoid resending the packet.

Benefits of technology

It improves packet transmission efficiency in out-of-order and packet loss environments, reduces waiting time, and improves the overall efficiency of packet transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263864A_ABST
    Figure CN120263864A_ABST
Patent Text Reader

Abstract

The invention relates to a data packet transmission method and device, computer equipment, a computer readable storage medium and a computer program product. The method is applied to a receiver and comprises the steps that under the condition that configuration information of the receiver supports a custom extension header, a first data packet in a sending window is acquired through a transmission channel, and the first data packet carries a serial number and the custom extension header; the user-defined extension head comprises a step length; and under the condition that an out-of-order data packet is received, writing the out-of-order data packet into the corresponding first storage position according to the serial number of the out-of-order data packet, the serial number of the first data packet, the step length and the length of the custom extension head, and returning a confirmation signal of the out-of-order data packet through the transmission channel. By adopting the method, the transmission efficiency of the out-of-order data packet can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a data packet transmission method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art

[0002] With the development of Remote Direct Memory Access (RDMA) technology, the process of data packet transmission is as follows: the sender sends the data packets within the window in the sending order; the receiver receives the data packets in the sending order and sends an acknowledgment signal (ACK) for the in-order arrived data packets. If the receiver correctly receives a data packet, it sends an ACK to the sender.

[0003] In traditional technologies, in an RDMA network, due to reasons such as network congestion and routing changes, data packets may arrive at the receiver out of order. The receiver receives the data packets in the receiving order, which is different from the sending order. When the receiver receives an out-of-order data packet, it sends a NACK to the sender, indicating that it has not received the expected data packet, that is, the next data packet in the sending order. After receiving a NACK for a data packet, the sender resends the expected data packet and the subsequent data packets, and the receiver continues to wait for the expected data packet.

[0004] However, in the current out-of-order data packet transmission method, since the receiver needs to wait for the sender to resend the expected data packet, there is a problem of low data packet transmission efficiency. Summary of the Invention

[0005] Based on this, it is necessary to provide a data packet transmission method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the transmission efficiency for the above technical problems.

[0006] In a first aspect, this application provides a data packet transmission method, which is applied to a receiver, and the method includes:

[0007] When the configuration information of the receiver supports custom extended headers, obtain the first data packet within the sending window through a transmission channel, where the first data packet carries a sequence number and a custom extended header; the custom extended header includes a step size; the step size indicates the length of the data content in the data packet; the sequence number indicates the sequence number of the data packet within the sending window;

[0008] When receiving an out-of-order data packet, according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, write the out-of-order data packet into the corresponding first storage location, and return an acknowledgment signal for the out-of-order data packet through the transmission channel.

[0009] In one embodiment, the first data packet includes header information and data content; the method for determining the step length includes:

[0010] Obtain the length of the header information;

[0011] Based on the length of the first data packet and the length of the header information, determine the step length.

[0012] In one embodiment, the header information includes transmission protocol information and infinite bandwidth information; the determining the step length based on the length of the first data packet and the length of the header information includes:

[0013] Based on the length of the first data packet, the length of the transmission protocol information, and the length of the infinite bandwidth information, determine the step length.

[0014] In one embodiment, the method for determining the length of the data packet includes:

[0015] Obtain the number of bytes of the largest data packet during a single transmission of the transmission channel;

[0016] Determine the lengths of the data packets within the sending window according to the number of bytes of the largest data packet.

[0017] In one embodiment, the custom extension header further includes a virtual starting address; after obtaining the first data packet within the sending window through the transmission channel, it further includes:

[0018] According to the virtual starting address, write the first data packet to the corresponding second storage location, and return an acknowledgment signal of the first data packet through the transmission channel.

[0019] In one embodiment, the writing the out-of-order data packet to the corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step length, and the length of the custom extension header, and returning an acknowledgment signal of the out-of-order data packet through the transmission channel includes:

[0020] Determine the sequence number difference of the data packets according to the sequence number of the out-of-order data packet and the sequence number of the first data packet;

[0021] Based on the sequence number difference and the step length, determine the initial storage location corresponding to the out-of-order data packet;

[0022] Adjust the initial storage location according to the length of the custom extension header to determine the first storage location, and write the out-of-order data packet to the first storage location.

[0023] In a second aspect, the present application further provides a data packet transmission method, which is applied to a sender. The method includes:

[0024] When the configuration information of the sender supports custom extended headers, send the data packets within the sending window to the receiver through a transmission channel; the data packets include the first data packet and out-of-order data packets; the first data packet carries a sequence number and a custom extended header; the custom extended header includes a step size; the step size indicates the length of the data content in the data packet; the sequence number indicates the sequential number of the data packets within the sending window; the receiver is configured to, when receiving an out-of-order data packet, write the out-of-order data packet to a corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, and return an acknowledgment signal of the out-of-order data packet through the transmission channel;

[0025] Receive the acknowledgment signal of the out-of-order data packet returned through the transmission channel.

[0026] In a third aspect, the present application further provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.

[0028] In a fifth aspect, the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the above method are implemented.

[0029] The above data packet transmission method, device, computer device, computer-readable storage medium, and computer program product, when the configuration information of the receiving party supports custom extension headers, obtain the first data packet, where the first data packet carries a sequence number and a custom extension header; the custom extension header includes a step size; when the receiving party receives an out-of-order data packet, calculate the first storage location corresponding to the out-of-order data packet through the sequence number of the out-of-order data packet, the sequence number of the first data packet, the length of the custom extension header, and the step size in the custom extension header, without considering whether the receiving order is the same as the sending order. Compared with traditional technologies, even if the receiving order of the data packets received by the receiving party is different from the sending order of the sending party, there is no need to return a NACK (the sequence number of the next data packet in the sending order, such as the data packet P1 after P0) signal, saving the time for the sending party to re-send the data packet corresponding to the sequence number of the next data packet in the sending order and all subsequent data packets after receiving the NACK, greatly reducing the waiting time, thereby improving the data packet transmission efficiency in an out-of-order and packet-loss environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0031] Figure 1 It is an application environment diagram of the data packet transmission method in an embodiment;

[0032] Figure 2 It is a flowchart of the out-of-order data packet transmission method in an embodiment;

[0033] Figure 3 It is a flowchart of the data packet transmission method in an embodiment;

[0034] Figure 4 It is a schematic diagram of the information of the data packet;

[0035] Figure 5 It is a schematic diagram of the information of the infinite bandwidth information IB;

[0036] Figure 6 It is a schematic diagram of the information of the custom extension header;

[0037] Figure 7 It is a flowchart of the out-of-order data packet transmission method in another embodiment;

[0038] Figure 8Schematic diagram of determining and writing the first storage location of out-of-order data packets in the sending window in an embodiment;

[0039] Figure 9 Structural block diagram of a data packet transmission device in an embodiment;

[0040] Figure 10 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0041] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0042] The data packet transmission method provided in the embodiments of the present application can be applied to an application environment as shown in Figure 1 In the application environment shown. The server 1 in the data center 1 needs to send data packets to the server 4 in the data center 2 through a network with a high packet loss rate (such as the Internet). The server 1 is the sender, and the server 4 is the receiver. When the configuration information of the receiver supports custom extended headers, the receiver obtains the current data packet in the sending window through the transmission channel. The current data packet carries a sequence number; the sequence number indicates the sequential number of the data packets in the sending window; when the sequence number of the current data packet is not the first sequential number in the sending window, obtain the custom extended header carried by the data packet corresponding to the first sequential number and the length of the custom extended header; the custom extended header includes a step size; the step size indicates the length of the data content in the data packet; according to the sequence number of the current data packet, the sequence number of the data packet corresponding to the first sequential number, the step size, and the length of the custom extended header, write the current data packet to the corresponding first storage location, and return an acknowledgment signal of the current data packet through the transmission channel. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0043] The traditional data packet transmission process includes: in the RDMA network, due to reasons such as network congestion and routing changes, data packets may arrive at the receiver out of order. As shown in Figure 2As shown, the sender sends data packets P0, P1, P2, and P3 in sequence. However, the receiver first receives data packet P0, then receives data packets P2 and P3, and finally receives data packet P1. The receiver receives data packets in the order of reception. When receiving out-of-order data packets, it will send a NACK indicating that the expected data packet, i.e., the next data packet in the sending order (such as data packet P1 which is the next data packet after data packet P0), has not been received. Therefore, after data packet P0, when P2 or P3 is received, a NACK1 is sent to the sender, indicating that the receiver has not received data packet P1 and continues to wait for P1. When the sender receives NACK1, it re-sends data packet P1 and the subsequent data packets P2 and P3.

[0044] In an exemplary embodiment, as Figure 3 shown, a data packet transmission method is provided. Taking the receiver in Figure 1 or Figure 2 as an example for illustration, it includes the following steps S302 to S304. Among them:

[0045] Step S302, when the configuration information of the receiver supports custom extended headers, obtain the first data packet within the sending window through the transmission channel. The first data packet carries a sequence number and a custom extended header; the custom extended header includes a step size.

[0046] Among them, the sequence number, that is, the Packet Sequence Number (PSN), indicates the sequential number of the data packets within the sending window. The sequence number can be the same as the sequential number or different from it. For example, the sequence number corresponding to the first sequential number is 0, the sequence number corresponding to the second sequential number is 1, and so on. It can also be that the sequence number corresponding to the first sequential number is 1, the sequence number corresponding to the second sequential number is 2, and so on.

[0047] Among them, the step size indicates the length of the data content in the data packet, in bytes. As Figure 4 shown, the step size characterizes the length of the data content data.

[0048] Optionally, before obtaining the first data packet within the send window through the transmission channel, when the RDMA control information is exchanged through methods such as the Transmission Control Protocol (TCP) or the RDMA Connection Manager (RDMA_CM), in addition to exchanging information such as the Global Identifier (GID) and the Queue Pair (QP), it is also necessary to exchange whether the Unordered Extended Transport Header (UETH) is supported. If the configuration information of the receiver and the configuration information of the sender both support UETH, the sender pre-defines a send window with a size of N, where N is a positive integer. The sender can continuously send the data packets within the window without waiting for the acknowledgment signal for each data packet returned by the receiver. Among them, the RDMA network architecture uses the GID (Global Identifier) for network layer forwarding. The QP is the core communication unit for RDMA data transmission and consists of a pair of queues. All RDMA operations (READ / WRITE / SEND, etc.) are submitted through the QP.

[0049] Optionally, when the configuration information of the receiver supports the custom extended header, obtain the first data packet within the send window through the queue pair corresponding to the transmission channel, and obtain the sequence number and the custom extended header carried by the first data packet; the custom extended header includes a step size.

[0050] Step S304, in the case of receiving an out-of-order data packet, according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, write the out-of-order data packet to the corresponding first storage location, and return an acknowledgment signal for the out-of-order data packet through the transmission channel.

[0051] Optionally, in the case of receiving an out-of-order data packet, before writing the out-of-order data packet to the corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, when the sender initiates an RDMA Write operation on the QP, it first initiates an RDMA Write First, which carries the custom extended header UETH instead of the traditional RETH.

[0052] Optionally, as Figure 5As shown, the custom extension header UETH is recorded in the infinite bandwidth information IB. In addition to the custom extension header UETH, the infinite bandwidth information IB also includes a Base Transport Header (BTH) and a Cyclic Redundancy Check (CRC). The custom extension header UETH includes a step size, such as Figure 6 As shown, in addition to the step size, the custom extension header also includes a Virtual Address, a Remote Key, and a DMA Length.

[0053] Optionally, if the receiving order of the receiver is data packets P0, P2, P3, and P1, the data packets P2, P3, and P1 received by the receiver are all out-of-order data packets. The receiver calculates the first storage location corresponding to the out-of-order data packet P2 according to any out-of-order data packet, such as the out-of-order data packet with the sequence number P2, the sequence number P0 of the first sequentially numbered data packet, the step size, and the length of the custom extension header, writes the out-of-order data packet P2 into the first storage location, and returns an acknowledgment signal ACK2 for the out-of-order data packet P2 through the queue corresponding to the transmission channel. The sender receives the acknowledgment signal ACK2 for the returned out-of-order data packet P2.

[0054] Optionally, if the order of the receiver is data packets P0, P2, P3, and P1, the receiver calculates the first storage location corresponding to the out-of-order data packet P3 according to any out-of-order data packet, such as the out-of-order data packet with the sequence number P3, the sequence number P0 of the first sequentially numbered data packet, the step size, and the length of the custom extension header, writes the out-of-order data packet P3 into the first storage location, and returns an acknowledgment signal ACK3 for the out-of-order data packet P3 through the queue corresponding to the transmission channel. The sender receives the acknowledgment signal ACK3 for the returned out-of-order data packet P3.

[0055] In the above data packet transmission method, when the configuration information of the receiving party supports custom extension headers, the first data packet is obtained. The first data packet carries a sequence number and a custom extension header; the custom extension header includes a step size. When the receiving party receives an out-of-order data packet, based on the sequence number of the out-of-order data packet, the sequence number of the first data packet, the length of the custom extension header, and the step size in the custom extension header, the first storage location corresponding to the out-of-order data packet is calculated, without considering whether the receiving order is the same as the sending order. Compared with traditional technologies, even if the receiving order of the data packets received by the receiving party is different from the sending order of the sending party, there is no need to return a NACK (the sequence number of the next data packet in the sending order, such as the data packet P1 after P0) signal, saving the time for the sending party to re-transmit the data packet corresponding to the sequence number of the next data packet in the sending order and all subsequent data packets after receiving the NACK, greatly reducing the waiting time, thereby improving the data packet transmission efficiency in an out-of-order and packet-loss environment.

[0056] In an exemplary embodiment, the first data packet includes header information and data content; the method for determining the step size includes: obtaining the length of the header information; based on the length of the first data packet and the length of the header information, determining the step size.

[0057] Among them, the length of the data packet can be referred to as the operation length of the data packet, denoted as (DMA Length).

[0058] Optionally, since the maximum transmission unit (MTU) of the transmission channel is constant, and the maximum transmission unit indicates the maximum number of bytes allowed for a single data transmission, the length of each data packet is the same. As Figure 4 shown, the first data packet includes header information and data content; if the sequence number of the first data packet is P0, then the data packet P0 includes header information and data content, and the header information indicates information other than the data content. Therefore, the receiving party obtains the length of the header information; based on the length DMA Length of the first data packet and the length of the header information, determines the step size. By subtracting the length of the header information from the length DMA Length of the first data packet, the length of the data content is obtained. The step size indicates the length of the data content in the data packet. Since the length of each data packet within the sending window is the same, the step size step length within the sending window can be determined.

[0059] Optionally, it can also be that the sending party obtains the length of the header information; based on the length of the first data packet and the length of the header information, determines the step size, or it can also be that a third-party server other than the receiving party or the sending party determines the step size.

[0060] It should be understood that the step length is less than or equal to the length of the data packet, i.e., the DMA Length.

[0061] In this embodiment, the step length is determined based on the length of the first data packet and the length of the header information. Since the lengths of the data packets, i.e., the DMA Lengths, are the same, this step length can be used as the step length for all data packets within the sending window, enabling the receiving party to directly calculate and determine the first storage location according to this step length, greatly reducing the waiting time for retransmitting data packets and thus improving efficiency.

[0062] Continuing with the above embodiment, the header information includes transmission protocol information and Infiniband information; the step length determined based on the length of the first data packet and the length of the header information includes: determining the step length based on the length of the first data packet, the length of the transmission protocol information, and the length of the Infiniband information.

[0063] Optionally, as Figure 4 shown, the header information includes transmission protocol information (User Datagram Protocol, UDP) and Infiniband information (Infiniband, IB); the receiving party determines the data content data in the data packet, i.e., the length of the data itself, by subtracting the length of UDP and the length of IB from the length of the first data packet, i.e., the DMA Length, and thus determines the step length.

[0064] In this embodiment, the step length within the sending window is further determined based on the length of the data packet, the length of the transmission protocol information, and the length of the Infiniband information, enabling the receiving party to directly calculate and determine the first storage location according to this step length, greatly reducing the waiting time for retransmitting data packets and thus improving efficiency.

[0065] In an exemplary embodiment, the method for determining the length of the data packet includes: obtaining the number of bytes of the largest data packet during a single transmission of the transmission channel; determining the lengths of the data packets within the sending window according to the number of bytes of the largest data packet.

[0066] Optionally, since the Maximum Transmission Unit (MTU) of the transmission channel is constant, and the maximum transmission unit indicates the maximum number of bytes allowed during a single data transmission, the receiving party obtains the number of bytes of the largest data packet during a single transmission of the transmission channel and determines the lengths of the data packets within the sending window according to the number of bytes of the largest data packet, i.e., the DMA Length of the data packet is less than or equal to the maximum number of bytes allowed during a single data transmission.

[0067] In this embodiment, the lengths of the data packets within the sending window are determined according to the number of bytes of the largest data packet, providing a basis for subsequent accurate calculation of the step length.

[0068] In an exemplary embodiment, the custom extension header further includes a virtual start address; after obtaining the first data packet within the send window through the transmission channel, it further includes: according to the virtual start address, writing the first data packet to the corresponding second storage location, and returning an acknowledgment signal for the first data packet through the transmission channel.

[0069] Optionally, the receiver receives the first data packet within the send window through the transmission channel. The first data packet carries a sequence number and a custom extension header UETH; the custom extension header UETH, such as Figure 6 shown, the custom extension header UETH includes a step length, a virtual start address, a remote key, and a DMA length.

[0070] Optionally, as Figure 7 shown, after the receiver receives the first data packet within the send window through the transmission channel, if the sequence number of the first data packet received by the receiver is P0. The custom extension header UETH carried by the first data packet P0 includes a virtual start address Virtual Address = 0x70000; a remote key Remote Key = 0x107718; a DMA length DMA Length = 0x2000; a step length Step Length = 0x400. The receiver determines the corresponding second storage location of the first data packet P0 according to the virtual start address Virtual Address = 0x70000, writes the first data packet P0 to the second storage location, and returns an acknowledgment signal ACK0 for the first data packet P0 through the transmission channel. The sender receives the acknowledgment signal ACK0 for the first data packet returned through the transmission channel.

[0071] In this embodiment, after the receiver receives the first data packet within the send window through the transmission channel, the second storage location of the first data packet is determined according to the virtual start address in the custom extension header UETH, so as to subsequently determine the first storage location for storing the subsequent out-of-order data packets according to the sequence number of the out-of-order data packets stored in the second storage location and the step length.

[0072] In an exemplary embodiment, as Figure 8 shown, according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step length, and the length of the custom extension header, writing the out-of-order data packet to the corresponding first storage location, and returning an acknowledgment signal for the out-of-order data packet through the transmission channel, includes steps S802 to S806. Among them:

[0073] Step S802: Determine the sequence number difference of the data packets based on the sequence number of the out-of-order data packet and the sequence number of the first data packet.

[0074] Optionally, if the sequence number of the out-of-order data packet is P3, the receiver determines the sequence number difference based on the sequence number P3 of the out-of-order data packet and the sequence number P0 of the first data packet. By subtracting the sequence number of the first data packet from the sequence number of the out-of-order data packet, the sequence number difference can be obtained. For example, P3 - P0 = 3.

[0075] Optionally, if the sequence number of the out-of-order data packet is P2, the receiver determines the sequence number difference based on the sequence number P2 of the out-of-order data packet and the sequence number P0 of the first data packet. By subtracting the sequence number of the first data packet from the sequence number of the out-of-order data packet, the sequence number difference can be obtained. For example, P2 - P0 = 2.

[0076] Step S804: Determine the initial storage location corresponding to the out-of-order data packet based on the sequence number difference and the step size.

[0077] Optionally, when the sequence number of the out-of-order data packet is P3 and the step size is m bytes (where m is a positive natural number), the receiver determines the initial storage location corresponding to the out-of-order data packet by adding the sequence number difference and the step size, that is, 3 * (m bytes).

[0078] Optionally, when the sequence number of the out-of-order data packet is P2, the receiver determines the initial storage location corresponding to the out-of-order data packet by adding the sequence number difference and the step size, that is, 2 * (m bytes).

[0079] Step S806: Adjust the initial storage location according to the length of the custom extension header to determine the first storage location, and write the out-of-order data packet into the first storage location.

[0080] Optionally, when the sequence number of the out-of-order data packet is P3, according to the obtained length of the custom extension header (for example, n bytes), the receiver adjusts 3 * (m bytes) according to n bytes to determine the first storage location, such as 3 * (m bytes) - n bytes. Here, n is a natural number, for example, n can be 20. The receiver writes the out-of-order data packet P3 into the first storage location, such as 3 * (m bytes) - n bytes.

[0081] Optionally, when the sequence number of the out-of-order data packet is P2, according to the obtained length of the custom extension header (for example, n bytes), the receiver adjusts 2 * (m bytes) according to n bytes to determine the first storage location, such as 2 * (m bytes) - n bytes. The receiver writes the out-of-order data packet P2 into the first storage location, such as 2 * (m bytes) - n bytes.

[0082] Optionally, if Figure 7As shown, the order of data packets sent by the sender is P0, P1, P2, and the order received by the receiver is P0, P2, P1. The sequence number PSN of the first received data packet is P0, and P2 and P1 are both out-of-order data packets. When the sequence number of the out-of-order data packet is P2, the receiver can directly calculate the first storage location corresponding to the out-of-order data packet P2 through the following formula (1), and write the out-of-order data packet P2 into the first storage location. After writing into the first storage location, an ACK2 confirmation signal is returned to the sender, and there is no need to wait for the data packet P1 to be written before the data packet P2 can be written. The sender receives the ACK2 confirmation signal. If the sequence number of the out-of-order data packet is P1, the receiver continues to calculate the out-of-order data packet P1 to be written into the first storage location through formula (1). After writing into the first storage location, an ACK1 confirmation signal is returned to the sender, and the sender receives the ACK1 confirmation signal. This realizes reducing the waiting time even in the case of out-of-order or packet loss, thereby improving the efficiency of data packet transmission.

[0083] (Sequence number PSN of the current data packet - Sequence number PSN of the first sequential numbered data packet) * Step size - (UETH length) Formula (1)

[0084] In this embodiment, the first storage location where the out-of-order data packet is stored is determined through the sequence number difference, step size, and UETH length, realizing reducing the waiting time even in the case of out-of-order or packet loss, thereby improving the efficiency of data packet transmission.

[0085] In an exemplary embodiment, applied to the sender, the data packet transmission method includes: when the configuration information of the sender supports custom extended headers, sending the data packets within the sending window to the receiver through the transmission channel; the data packets include the first data packet and out-of-order data packets; the first data packet carries a sequence number and a custom extended header; the custom extended header includes a step size; the step size indicates the length of the data content in the data packet; the sequence number indicates the sequential number of the data packets within the sending window; the receiver is used to, when receiving an out-of-order data packet, write the out-of-order data packet into the corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, and return a confirmation signal of the out-of-order data packet through the transmission channel; receive the confirmation signal of the out-of-order data packet returned through the transmission channel.

[0086] Optionally, before sending the data packets within the sending window through the transmission channel to the receiver, when the RDMA control information is exchanged through means such as the Transmission Control Protocol (TCP) or the RDMA Connection Manager (RDMA_CM), in addition to exchanging information such as the Global Identifier (GID) and the Queue Pair (QP), it is also necessary to exchange whether the Unordered Extended Transport Header (UETH) is supported. If the configuration information of the receiver and the configuration information of the sender both support UETH, the sender pre-defines a sending window with a size of N, where N is a positive integer. The sender can continuously send the data packets in the order of the sequence numbers of the data packets within the sending window, such as P0, P1, P2, and P3; or in other orders, such as excluding the data packet P1 according to a pre-set rule, and the sending order is P0, P2, and P3. When the receiving order of the receiver is inconsistent with the sending order of the sender, such as in the case of packet loss or delay, the receiving order of the receiver is P0, P2, P3, and P1. It should be noted that the first data packet will not be received out of order, that is, the first data packet received by the receiver needs to be the same as the first data packet sent by the sender. When the receiver receives the first data packet P0, according to the virtual starting address, the receiver writes the first data packet into the corresponding second storage location and returns the acknowledgment signal ACK0 of the first data packet through the transmission channel, and the sender receives the acknowledgment signal ACK0 of the first data packet returned through the transmission channel.

[0087] In the case of receiving out-of-order data packets, such as the out-of-order data packet being P2, the receiver writes the out-of-order data packet P2 into the corresponding first storage location according to the sequence number P2 of the out-of-order data packet, the sequence number P0 of the first data packet, the step length, and the length of the custom extended header, and returns the acknowledgment signal ACK2 of the out-of-order data packet through the transmission channel, and the sender receives the acknowledgment signal ACK2 of the first data packet returned through the transmission channel.

[0088] In an exemplary embodiment, Figure 7Illustrated by an example. Server 1 is the sender and server 4 is the receiver. The transmission channel realizes data transmission between the sender and the receiver through the Transmission Control Protocol. When the RDMA control information is exchanged through the Transmission Control Protocol (TCP) or the RDMA Connection Manager (RDMA_CM), etc., in addition to exchanging information such as the Global Identifier (GID) and the Queue Pair (QP), it is also necessary to exchange whether the Unordered Extended Transport Header (UETH) is supported. If the configuration information of the receiver and the configuration information of the sender both support UETH, the sender pre-defines a sending window with a size of 3. The sender can continuously send data packets within the sending window, such as P0, P1, and P2. When the sender initiates an RDMA Write operation on the QP corresponding to the transmission channel, it first initiates an RDMA Write First, which carries the custom extended header UETH. The custom extended header UETH includes the virtual start address Virtual Address = 0x70000; the access credential RemoteKey = 0x107718; the operation length DMA Length = 0x2000; and the step length Step Length = 0x400. If the current data packet is P0 and the receiver receives the current data packet P0, the receiver determines the second storage location corresponding to the current data packet P0 according to the virtual start address Virtual Address = 0x70000, writes the current data packet P0 into the second storage location, and returns the ACK0 confirmation signal of the current data packet P0 through the transmission channel. Then the receiver receives the data packet P2. The receiver can also directly calculate the first storage location corresponding to the current data packet P2 through the following formula (1) and write the current data packet P2 into the first storage location, such as 2 * (m bytes) - n bytes. After writing into the first storage location, it returns the ACK2 confirmation signal to the sender without waiting for P1 to be written before P2 can be written. If after the receiver receives the data packet P2, it receives the data packet P1 again, then the current data packet is P1. The receiver continues to calculate the first storage location where the current data packet P1 is written through formula (1), such as 1 * (m bytes) - n bytes. After writing into the first storage location, it returns the ACK1 confirmation signal to the sender, achieving a reduction in waiting time even in the case of out-of-order or lost packets, thereby improving the efficiency of data packet transmission.

[0089] (Packet Sequence Number of the current data packet PSN - Packet Sequence Number of the first sequentially numbered data packet PSN) * Step Length - (UETH Length) Formula (1)

[0090] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0091] Based on the same inventive concept, an embodiment of the present application further provides a data packet transmission device for implementing the above-mentioned data packet transmission method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the data packet transmission device provided below can refer to the limitations on the data packet transmission method in the above text, and will not be repeated here.

[0092] In an exemplary embodiment, as Figure 9 shown, a data packet transmission device is provided, which is applied to the receiving party and includes: an acquisition module 901 and a first writing module 902, where:

[0093] The acquisition module 901 is configured to, when the configuration information of the receiving party supports custom extension headers, obtain the first data packet within the sending window through the transmission channel. The first data packet carries a sequence number and a custom extension header; the custom extension header includes a step size; the step size indicates the length of the data content in the data packet; the sequence number indicates the sequential number of the data packets within the sending window.

[0094] The first writing module 902 is configured to, when receiving an out-of-order data packet, write the out-of-order data packet to the corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extension header, and return an acknowledgment signal of the out-of-order data packet through the transmission channel.

[0095] In an exemplary embodiment, the first data packet includes header information and data content; the data packet transmission device further includes a step size determination module, configured to obtain the length of the header information; and determine the step size based on the length of the first data packet and the length of the header information.

[0096] In an exemplary embodiment, the header information includes transmission protocol information and infinite bandwidth information; based on the length of the first data packet and the length of the header information, the data packet transmission device further includes a step determination module, configured to determine a step based on the length of the first data packet, the length of the transmission protocol information, and the length of the infinite bandwidth information.

[0097] In an exemplary embodiment, the data packet transmission device further includes: a data packet length determination module, configured to obtain the number of bytes of the largest data packet during a single transmission of the transmission channel; and determine the lengths of the data packets within the send window according to the number of bytes of the largest data packet.

[0098] In an exemplary embodiment, the custom extended header of the data packet transmission device further includes a virtual start address; and further includes: a second writing module, configured to write the first data packet to a corresponding second storage location according to the virtual start address, and return an acknowledgment signal of the first data packet through the transmission channel.

[0099] In an exemplary embodiment, the first writing module 902 is further configured to determine the sequence number difference of the data packets according to the sequence number of the out-of-order data packet and the sequence number of the first data packet; determine the initial storage location corresponding to the out-of-order data packet based on the sequence number difference and the step; adjust the initial storage location according to the length of the custom extended header to determine a first storage location, and write the out-of-order data packet to the first storage location.

[0100] In an exemplary embodiment, there is provided a data packet transmission device, which is applied to a sender and includes: a sending module and a receiving module, where: the sending module is configured to send the data packets within the send window to the receiver through the transmission channel when the configuration information of the sender supports a custom extended header; the data packets include a first data packet and out-of-order data packets; the first data packet carries a sequence number and a custom extended header; the custom extended header includes a step; the step indicates the length of the data content in the data packet; the sequence number indicates the sequence number of the data packets within the send window; the receiver is configured to write the out-of-order data packet to a corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step, and the length of the custom extended header when receiving the out-of-order data packet, and return an acknowledgment signal of the out-of-order data packet through the transmission channel.

[0101] The receiving module is configured to receive the acknowledgment signal of the out-of-order data packet returned through the transmission channel.

[0102] Each module in the above data packet transmission device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of it, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above respective modules.

[0103] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in Figure 10 . The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data packets. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a data packet transmission method.

[0104] Those skilled in the art can understand that Figure 10 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0105] In an embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0106] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0107] In an embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0108] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, a database, or other media used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0109] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in the present application.

[0110] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A data packet transmission method, characterized in that, Applied to a receiver, the method includes: When the configuration information of the receiver supports custom extended headers, obtain the first data packet within the sending window through a transmission channel, where the first data packet carries a sequence number and a custom extended header; the custom extended header includes a step size; the step size indicates the length of the data content in the data packet; the sequence number indicates the sequential number of the data packets within the sending window; When a disordered data packet is received, based on the sequence number of the disordered data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, write the disordered data packet to a corresponding first storage location, and return an acknowledgment signal for the disordered data packet through the transmission channel.

2. The method according to claim 1, wherein The first data packet includes header information and data content; the method for determining the step size includes: Obtain the length of the header information; Based on the length of the first data packet and the length of the header information, determine the step size.

3. The method according to claim 2, wherein The header information includes transmission protocol information and infinite bandwidth information; the determining the step size based on the length of the first data packet and the length of the header information includes: Based on the length of the first data packet, the length of the transmission protocol information, and the length of the infinite bandwidth information, determine the step size.

4. The method according to claim 2, wherein The method for determining the length of the data packet includes: Obtain the maximum number of bytes of a data packet during a single transmission of the transmission channel; Based on the maximum number of bytes of the data packet, determine the lengths of the data packets within the sending window.

5. The method according to claim 1, characterized in that, The custom extended header further includes a virtual start address; after obtaining the first data packet within the sending window through the transmission channel, it further includes: Based on the virtual start address, write the first data packet to a corresponding second storage location, and return an acknowledgment signal for the first data packet through the transmission channel.

6. The method according to claim 1, characterized in that, The writing the disordered data packet to a corresponding first storage location and returning an acknowledgment signal for the disordered data packet through the transmission channel based on the sequence number of the disordered data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header includes: Based on the sequence number of the disordered data packet and the sequence number of the first data packet, determine the sequence number difference of the data packets; Based on the sequence number difference and the step size, determine the initial storage location corresponding to the disordered data packet; Adjust the initial storage location according to the length of the custom extended header to determine the first storage location, and write the disordered data packet to the first storage location.

7. A data packet transmission method, characterized in that, Applied to a sender, the method includes: When the configuration information of the sender supports custom extended headers, send the data packets within the sending window to the receiver through the transmission channel; the data packets include the first data packet and out-of-order data packets; the first data packet carries a sequence number and a custom extended header; the custom extended header includes a step size; the step size indicates the length of the data content in the data packet; the sequence number indicates the sequential number of the data packets within the sending window; the receiver is used to, when receiving an out-of-order data packet, write the out-of-order data packet into the corresponding first storage location according to the sequence number of the out-of-order data packet, the sequence number of the first data packet, the step size, and the length of the custom extended header, and return an acknowledgment signal of the out-of-order data packet through the transmission channel; Receive the acknowledgment signal of the out-of-order data packet returned through the transmission channel.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Data transmission method based on remote direct memory access, computer equipment and medium

    CN120670364A

  • Data transmission method based on remote direct memory access, computer device and medium

    CN120670364B

  • A data processing method, system, device, medium and product

    CN122554418A

  • A data processing method, system, device, medium and product

    CN122554418B