Dpu-based remote direct memory access transmission method, device and program product
By using a DPU-based remote direct memory access transmission method, data packets are split into fragments and fragment identifiers are set, which solves the hardware compatibility problem, reduces hardware performance requirements and improves device interoperability, thereby improving system reliability and performance.
Patent Information
- Application Number
- CN202411362350.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Traditional remote direct memory access methods have high hardware compatibility requirements, which limits their application across different systems and devices. They suffer from high hardware performance requirements and poor compatibility.
A remote direct memory access (RDU)-based transmission method is adopted. The data packet is split into several fragments through the remote direct memory access component, and a fragment identifier is set for each fragment. The data transmission is carried out using the PCIe module, realizing a hardware and software combined communication protocol to adapt to different data packet sizes and transmission requirements.
It reduces reliance on hardware performance, improves interoperability and compatibility between devices, enhances system reliability and performance, avoids overall data packet retransmission, and enables efficient remote data access and transmission.
Smart Images

Figure CN119473988B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, and in particular to a remote direct memory access transmission method, device, and program product based on a DPU. Background Technology
[0002] Remote Direct Memory Access (RDMA) is a high-performance, low-latency data transfer technology that allows computer systems to transfer data directly between memory locations without involving the host CPU. RDMA can significantly reduce data transfer latency and CPU utilization, especially in high-performance computing and data center environments that require large data transfers. Therefore, RDMA has been widely adopted and promoted in applications that require processing large amounts of data with low latency and high throughput.
[0003] Traditional remote direct memory access methods include: splitting the data to be sent from memory through PCIe hardware and sending it to the target terminal, where the target terminal receives the data and saves it into its own memory.
[0004] However, implementing remote direct memory access in hardware requires handling a large number of low-level details during data transmission, which limits its application across different systems and devices. This results in issues such as high hardware performance requirements and poor compatibility. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a remote direct memory access transmission method, device and program product based on DPU, to eliminate or improve one or more defects existing in the prior art.
[0006] One aspect of the present invention provides a remote direct memory access transfer method based on a DPU, applied in a first terminal equipped with a data processing unit, the first terminal further comprising a remote direct memory access component and a first PCIe module, the method comprising the following steps:
[0007] Determine the length of the target data packet;
[0008] When the data packet length is greater than the preset data packet length, during the process of submitting the target data packet to the sending queue, the pre-encapsulated work request element corresponding to the target data packet is split into several fragments through the remote direct memory access component; each fragment includes at least one work request element.
[0009] In each shard, a shard identifier is set for each work request element through the remote direct memory access component; within the same shard, the first shard identifier corresponding to the last work request element is different from the second shard identifier corresponding to other work request elements.
[0010] Several fragments are submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module, so that the second terminal receives the target data packet through the second PCIe module and determines the method of generating a completion queue entry based on the fragment identifier corresponding to each work request element.
[0011] In some embodiments of the present invention, the target data packet is written into a request data packet, read from a request data packet, or sent as a request data packet; when the target data packet is a send request data packet, several fragments are submitted to a send queue, and the target data packet is sent to the second terminal through the first PCIe module, including:
[0012] The first PCIe module sequentially sends the work request elements in each fragment to the second terminal; so that after the second terminal receives the work request elements through the second PCIe module, when reading the work request elements and finding the first fragment identifier, it creates the corresponding completion queue entry through the driver corresponding to the second PCIe module and generates and returns the first confirmation information; the first confirmation information includes the first fragment identifier.
[0013] Upon receiving the first confirmation information through the first PCIe module, a completion queue entry corresponding to the first confirmation information is created through the driver corresponding to the first PCIe module.
[0014] In some embodiments of the present invention, during the process of sequentially sending the work request elements in each shard to the second terminal, the second terminal, upon reading the second shard identifier, reuses the completion queue entry created by the driver corresponding to the second PCIe module and generates and returns second confirmation information.
[0015] In some embodiments of the present invention, when the target data packet is a read request data packet, several fragments are submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module, including:
[0016] The first PCIe module sequentially sends the work request elements in each fragment to the second terminal; so that after the second terminal receives the work request element through the second PCIe module, when reading the work request element and finding the first fragment identifier, it obtains the request content corresponding to the currently read work request element and generates and returns a reply message; the reply message includes the first fragment identifier.
[0017] Upon receiving a response message through the first PCIe module, a completion queue entry corresponding to the response message is created through the driver corresponding to the first PCIe module.
[0018] In some embodiments of the present invention, when the data packet length is less than a preset data packet length, the method further includes:
[0019] During the process of submitting the target data packet to the sending queue, the first fragmentation identifier is set for each pre-packaged work request in the target data packet through the remote direct memory access component;
[0020] The pre-packaged work request is submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module, so that the second terminal receives the target data packet through the second PCIe module and generates a completion queue entry based on the fragmentation identifier corresponding to each pre-packaged work request element.
[0021] In some embodiments of the present invention, submitting a pre-encapsulation work request to a sending queue and sending the target data packet to a second terminal via a first PCIe module includes:
[0022] The pre-packaged work requests are sent sequentially to the second terminal; so that when the second terminal receives the pre-packaged work request and reads the first fragment identifier during the process of reading the work request element, it creates a corresponding completion queue entry and generates and returns the corresponding first confirmation information; the first confirmation information includes the first fragment identifier;
[0023] Upon receiving the first confirmation message, a completion queue entry corresponding to the first confirmation message is created through the driver corresponding to the first PCIe module.
[0024] In some embodiments of the present invention, before splitting the pre-encapsulated work request element corresponding to the target data packet into several fragments during the process of submitting the target data packet to the sending queue, the method further includes: determining the actual depth of the sending queue based on the data packet length, the preset sending queue depth, and the preset data packet length.
[0025] Another aspect of the present invention provides a remote direct memory access transmission device based on a DPU, including a DPU or a network interface card (NIC), wherein the DPU or NIC is used to implement the steps of the above-described remote direct memory access transmission method based on a DPU.
[0026] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the above-described DPU-based remote direct memory access transfer method.
[0027] Another aspect of the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the DPU-based remote direct memory access transfer method described above.
[0028] The present invention relates to a DPU-based remote direct memory access transmission method, device, and program product, which determines the data packet length of a target data packet; when the data packet length is greater than a preset data packet length, during the process of submitting the target data packet to the sending queue, the pre-encapsulated work request element corresponding to the target data packet is split into several fragments; each fragment includes at least one work request element; in each fragment, a fragment identifier is set for each work request element; within the same fragment, the first fragment identifier corresponding to the last work request element is different from the second fragment identifier corresponding to other work request elements; the several fragments are submitted to the sending queue, and the target data packet is sent to a second terminal through a first PCIe module, so that the second terminal receives the target data packet through a second PCIe module and, based on the fragments corresponding to each work request element... The system identifies the method for generating completed queue entries; it addresses issues of high hardware performance requirements and poor compatibility; and it enables data transmission via remote direct memory access between the first and second terminals by combining the remote direct memory access component with the PCIe module's hardware and software, reducing reliance on hardware performance and thus lowering hardware performance requirements. Furthermore, based on the unified communication protocol and standards of the remote direct memory access component and the PCIe module, and the flexibility of the remote direct memory access component protocol, it can adapt to different data packet sizes and transmission needs. Even in scenarios where target data packets do not require fragmentation, the remote direct memory access component can still perform effective data transmission according to protocol requirements, ensuring interoperability and compatibility between devices.
[0029] In addition, in long-distance direct memory access transmission scenarios, by sending target data packets in fragments and reassembling the data at the receiving end according to the fragment identifier, the reliability and performance of the system can be effectively improved, avoiding the need for retransmission of the entire data packet, thereby more effectively completing efficient remote data access and transmission.
[0030] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.
[0031] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0032] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings:
[0033] Figure 1 This is a schematic diagram of a structure for remote direct memory access between a first terminal and a second terminal, provided in an embodiment of the present invention.
[0034] Figure 2 A flowchart of a remote direct memory access transfer method based on a DPU provided for another embodiment of the present invention. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0036] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0037] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0038] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0039] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0040] This invention provides a remote direct memory access (RDMA) transmission method based on a Data Processing Unit (DPU), applied in a first terminal equipped with a data processing unit. The DPU is a hardware accelerator used to accelerate data processing. During RDMA transmission, the DPU accelerates RDMA operations through hardware, improving data transmission speed and efficiency. Simultaneously, by using parallel processing and optimization algorithms to accelerate RDMA operations, latency can be reduced and throughput increased.
[0041] like Figure 1 As shown, the first terminal also has a remote direct memory access component installed, and a first PCIe (Peripheral Component Interconnect Express) module configured.
[0042] The Remote Direct Memory Access (RDMA) components include the RDMA protocol stack, RDMA, adapters, RDMA networks, and RDMA software. The RDMA protocol stack is the software stack used to implement RDMA functionality, including the protocol layer, drivers, and libraries. The RDMA adapter is a hardware device used to support RDMA communication, connecting servers or computers to a network. The RDMA network supports RDMA network architectures such as InfiniBand or RoCE (RDMA over Converged Ethernet) networks. RDMA software includes software tools and libraries for managing and configuring RDMA devices and supporting RDMA communication.
[0043] The first PCIe module refers to an expansion card or integrated circuit (such as a graphics card, memory controller, network interface card, etc.) installed in the first terminal, used to communicate and transmit data with the motherboard or other devices through the PCIe bus.
[0044] The first terminal refers to a terminal that performs remote direct memory access with other devices through the remote direct memory access component and the first PCIe module. It can be a computer (including desktop and laptop computers), a mobile phone or tablet computer, or a server. This embodiment does not limit the device type of the first terminal.
[0045] Figure 2 This is a schematic flowchart of a data transmission method based on remote direct memory access according to an embodiment of the present invention. Figure 2 As shown, the data transfer method based on remote direct memory access includes at least the following steps S201 to S204:
[0046] Step S201: Determine the data packet length of the target data packet. This involves writing the target data packet to a request data packet, reading a request data packet, or sending a request data packet. The data packet length refers to the number of bytes of data carried in the target data packet.
[0047] In some embodiments of the present invention, the target data packet refers to a request data packet in a Remote Direct Memory Access (RDMA) operation performed via the PCIe bus. In the Remote Direct Memory Access (RDMA) operation of the first PCIe module, the request data packet refers to a data transfer request sent from the first terminal to a second terminal equipped with a data processing unit. These requests may be write requests (writing data to the memory of the second terminal), read requests (reading data from the memory of the second terminal), or other types of data transfer requests.
[0048] In this embodiment, the second terminal refers to a terminal that directly accesses the memory of the first terminal remotely. The second terminal also includes a second PCIe module. The second PCIe module is an expansion card or integrated circuit (such as a graphics card, memory controller, network interface card, etc.) installed in the second terminal, used for communication and data transmission with the first terminal via the PCIe bus. The second terminal can be a computer (including desktop and laptop computers), a mobile phone, a tablet computer, or a server; this embodiment does not limit the device type of the second terminal.
[0049] A write request packet instructs the first terminal to write data to the memory of the second terminal. This packet contains the data to be written, along with metadata such as the memory address to be written and the length of the data to be written. A read request packet instructs the first terminal to read data from the memory of the second terminal. This packet contains detailed information about the read operation, such as the memory address to be read and the length of the data to be read. A send request packet refers to a message or data sent from the first terminal to the second terminal, such as data packets sent in network communication, messages sent in a messaging system, or data transfer between programs.
[0050] In step S202, if the data packet length is greater than the preset data packet length, during the process of submitting the target data packet to the SendQueue (SQ), the pre-encapsulated work request element (WQE) corresponding to the target data packet is split into several fragments through the remote direct memory access component; each fragment includes at least one work request element.
[0051] The preset data packet length refers to the pre-set data packet length, used to indicate the maximum data packet length supported in the current environment. The pre-encapsulated job request element refers to the necessary information and parameters in the target data packet, including but not limited to the target address, protocol type, data format and encoding, data content, or transmission parameters.
[0052] If the target data packet's length exceeds the maximum data packet length supported by the current environment, the pre-packaged job request element corresponding to the target data packet needs to be split into several fragments using a remote direct memory access component. The number of fragments is determined by the ratio of the target data packet's length to the preset data packet length. Simultaneously, for the sending queue, the starting address (addr) in each Scatter-Gather List (sg_list) is split according to the number of fragments, and the length is also adjusted and reduced accordingly.
[0053] When the data packet length is less than the preset data packet length, the first PCIe module of the first terminal sets a first fragment identifier for each pre-encapsulated work request element corresponding to the target data packet. The first fragment identifier can be a number, a letter, or a combination of numbers and letters, such as 0, a, or a0. This embodiment does not limit the implementation method of the first fragment identifier. In some embodiments of the present invention, the fragment identifier is represented by the character "ignor_split," occupying 1 byte of the reserved field in the target data packet. For example, setting ignore_split = 0 sets the fragment identifier to 0.
[0054] Subsequently, the first terminal submits a pre-encapsulated work request element to the sending queue, and sends the target data to the second terminal through the first PCIe module. (Reference) Figure 1 The second terminal receives the send queue through the second PCIe module in the second terminal, obtains the receive queue (RQ), retrieves the ignore_split from each pre-encapsulated work request element, and marks the ignore_split when it is 0 through the second PCIe module to generate the corresponding completed queue entry (CQE).
[0055] Specifically, when the data packet length is less than the preset data packet length, the method further includes: during the process of submitting the target data packet to the sending queue, setting a first fragment identifier for each pre-packaged work request in the target data packet through a remote direct memory access component; submitting the pre-packaged work request to the sending queue; sending the target data packet to the second terminal through the first PCIe module; so that the second terminal receives the target data packet through the second PCIe module and generates a completion queue entry based on the fragment identifier corresponding to each pre-packaged work request element.
[0056] In this process, the first terminal sends pre-packaging work requests sequentially to the second terminal while transmitting target data. The second terminal, through its second PCIe module, sequentially receives and reads the pre-packaging work requests. After reading the first fragment identifier, it generates a completion queue entry and a first confirmation message, and returns the first confirmation message to the first terminal. The first confirmation message carries the first fragment identifier. Upon receiving the first confirmation message and reading the first fragment identifier, the first terminal generates a corresponding completion queue entry through its first PCIe module.
[0057] Specifically, submitting a pre-packaging work request to a sending queue and sending the target data packet to the second terminal via the first PCIe module includes: sequentially sending the pre-packaging work request to the second terminal; so that after receiving the pre-packaging work request, the second terminal, during the process of reading the work request elements, if it reads the first fragment identifier, creates a corresponding completion queue entry and generates and returns corresponding first confirmation information; the first confirmation information includes the first fragment identifier; upon receiving the first confirmation information, the driver corresponding to the first PCIe module creates the completion queue entry corresponding to the first confirmation information.
[0058] In step S203, in each shard, a shard identifier is set for each work request element through the remote direct memory access component; within the same shard, the first shard identifier corresponding to the last work request element is different from the second shard identifier corresponding to other work request elements.
[0059] In some embodiments of the invention, each shard includes at least one work request element. Where each shard includes one work request element, in each shard, the shard identifier of each work request element is set to a first shard identifier via a remote direct memory access component.
[0060] When each shard includes at least two work request elements, refer to Figure 1 In each shard, the shard identifier of the last work request element is set as the first shard identifier, and the shard identifiers of the other work request elements are set as the second shard identifier.
[0061] For example, if each shard contains 4 work request elements, with the first shard identified as "ignor_split=0" and the second shard identified as "ignor_split=1", then in each shard, the shard identifiers corresponding to the first 3 work request elements are set to "ignor_split=1", and the shard identifier corresponding to the 4th work request element is set to "ignor_split=0".
[0062] Step S204: Submit several fragments to the sending queue, and send the target data packet to the second terminal through the first PCIe module, so that the second terminal can receive the target data packet through the second PCIe module and determine the method of generating a completion queue entry based on the fragment identifier corresponding to each work request element.
[0063] In some embodiments of the present invention, the target data packet includes a read request data packet, a write request data packet, or a send request data packet.
[0064] When the target data packet is a send request data packet, the second terminal receives and reads the work request elements sequentially through the second PCIe module. After reading the first fragment identifier, it generates a completion queue entry and a first confirmation message, and returns the first confirmation message to the first terminal. The first confirmation message carries the first fragment identifier. Upon receiving the first confirmation message and reading the first fragment identifier, the first terminal generates the corresponding completion queue entry through the first PCIe module.
[0065] Specifically, when the target data packet is a send request data packet, several fragments are submitted to the send queue, and the target data packet is sent to the second terminal through the first PCIe module. This includes: sending the work request element in each fragment sequentially to the second terminal through the first PCIe module; so that after the second terminal receives the work request element through the second PCIe module, during the process of reading the work request element, if the first fragment identifier is read, the corresponding completion queue entry is created through the driver corresponding to the second PCIe module, and a first confirmation message is generated and returned; the first confirmation message includes the first fragment identifier; upon receiving the first confirmation message through the first PCIe module, the corresponding completion queue entry is created through the driver corresponding to the first PCIe module.
[0066] In addition, during the process of sending the work request elements in each fragment to the second terminal in sequence, the second terminal, upon reading the second fragment identifier, reuses the completion queue entry created by the driver corresponding to the second PCIe module and generates and returns the second confirmation information.
[0067] When the target data packet is a read request data packet, the second terminal receives and reads the work request elements sequentially through the second PCIe module. After reading the first fragment identifier, if the currently read work request element contains request content or request data, it obtains the request content or request data corresponding to the currently read work request element and generates and returns reply information, which includes the first fragment identifier. When the first terminal receives the reply information through the first PCIe module, it creates a completion queue entry corresponding to the reply information through the driver corresponding to the first PCIe module.
[0068] Specifically, when the target data packet is a read request data packet, several fragments are submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module. This includes: sending the work request element in each fragment sequentially to the second terminal through the first PCIe module; so that after the second terminal receives the work request element through the second PCIe module, during the process of reading the work request element, if the first fragment identifier is read, it obtains the request content corresponding to the currently read work request element and generates and returns reply information; the reply information includes the first fragment identifier; and upon receiving the reply information through the first PCIe module, the driver corresponding to the reply information creates a completion queue entry.
[0069] If the second fragment identifier is read, and if the currently read work request element contains request content or request data, the request content or request data corresponding to the currently read work request element is obtained, and a response message is generated and returned. At this time, if the first terminal receives the response message through the first PCIe module, it reuses the already created completion queue entry.
[0070] In some embodiments of the present invention, during the creation of the sending queue, if the data packet length is greater than the preset data packet length, the queue depth of the sending queue needs to be increased proportionally.
[0071] Specifically, before splitting the pre-encapsulated work request element corresponding to the target data packet into several fragments during the process of submitting the target data packet to the sending queue, the method also includes: determining the actual depth of the sending queue based on the data packet length, the preset sending queue depth, and the preset data packet length.
[0072] The actual depth of the sending queue is obtained by multiplying the ratio of the data packet length to the preset data packet length and the preset sending queue depth.
[0073] For example, taking the maximum length supported by the current environment, i.e., the preset data packet length is 8M, and the actual target data packet length to be sent is 64M, with the preset sending queue depth of 128, the actual depth of the sending queue is 128*(64 / 8)=1024.
[0074] In summary, the remote direct memory access transmission method based on DPU provided by this invention determines the length of the target data packet; when the data packet length is greater than a preset data packet length, during the process of submitting the target data packet to the sending queue, the pre-encapsulated work request element corresponding to the target data packet is split into several fragments; each fragment includes at least one work request element; in each fragment, a fragment identifier is set for each work request element; within the same fragment, the first fragment identifier corresponding to the last work request element is different from the second fragment identifier corresponding to other work request elements; several fragments are submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module, so that the second terminal receives the target data packet through the second PCIe module and, based on the fragments corresponding to each work request element... The system identifies the method for generating completed queue entries; it addresses issues of high hardware performance requirements and poor compatibility; and it enables data transmission via remote direct memory access between the first and second terminals by combining the remote direct memory access component with the PCIe module's hardware and software, reducing reliance on hardware performance and thus lowering hardware performance requirements. Furthermore, based on the unified communication protocol and standards of the remote direct memory access component and the PCIe module, and the flexibility of the remote direct memory access component protocol, it can adapt to different data packet sizes and transmission needs. Even in scenarios where target data packets do not require fragmentation, the remote direct memory access component can still perform effective data transmission according to protocol requirements, ensuring interoperability and compatibility between devices.
[0075] In addition, in long-distance direct memory access transmission scenarios, by sending target data packets in fragments and reassembling the data at the receiving end according to the fragment identifier, the reliability and performance of the system can be effectively improved, avoiding the need for retransmission of the entire data packet, thereby more effectively completing efficient remote data access and transmission.
[0076] Corresponding to the above method, the present invention also provides a remote direct memory access transmission device based on a DPU, including a DPU or a network interface card (NIC), wherein the DPU or NIC is used to implement the steps of the aforementioned remote direct memory access transmission method based on a DPU.
[0077] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned DPU-based remote direct memory access transfer method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.
[0078] This invention also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the steps of the DPU-based remote direct memory access transfer method described above.
[0079] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0080] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0081] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0082] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A remote direct memory access transfer method based on DPU, characterized in that, The method is applied to a first terminal equipped with a data processing unit, the first terminal also having a remote direct memory access component and a first PCIe module installed; the method includes the following steps: Determine the length of the target data packet; When the data packet length is greater than the preset data packet length, during the process of submitting the target data packet to the sending queue, the remote direct memory access component splits the pre-encapsulated work request element corresponding to the target data packet into several fragments; each fragment includes at least one work request element. In each of the shards, a shard identifier is set for each work request element through the remote direct memory access component; within the same shard, the first shard identifier corresponding to the last work request element is different from the second shard identifier corresponding to other work request elements; The plurality of fragments are submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module, so that the second terminal receives the target data packet through the second PCIe module and determines the method of generating a completion queue entry based on the fragment identifier corresponding to each work request element.
2. The method according to claim 1, characterized in that, The target data packet is written to a request data packet, read from a request data packet, or sent as a request data packet; when the target data packet is the send request data packet, the step of submitting the plurality of fragments to the send queue and sending the target data packet to the second terminal through the first PCIe module includes: The first PCIe module sequentially sends the work request elements in each shard to the second terminal; so that after the second terminal receives the work request element through the second PCIe module, when reading the work request element and finding the first shard identifier, it creates a corresponding completion queue entry through the driver corresponding to the second PCIe module and generates and returns first confirmation information; the first confirmation information includes the first shard identifier; Upon receiving the first confirmation information through the first PCIe module, a completion queue entry corresponding to the first confirmation information is created through the driver corresponding to the first PCIe module.
3. The method according to claim 2, characterized in that, During the process of sequentially sending the work request elements in each shard to the second terminal, the second terminal, upon reading the second shard identifier, reuses the completion queue entry created by the driver corresponding to the second PCIe module and generates and returns second confirmation information.
4. The method according to claim 2, characterized in that, When the target data packet is the read request data packet, the step of submitting the plurality of fragments to the sending queue and sending the target data packet to the second terminal through the first PCIe module includes: The first PCIe module sequentially sends the work request elements in each shard to the second terminal; so that after the second terminal receives the work request element through the second PCIe module, when reading the work request element and if the first shard identifier is read, it obtains the request content corresponding to the currently read work request element and generates and returns reply information; the reply information includes the first shard identifier; Upon receiving the response information through the first PCIe module, a completion queue entry corresponding to the response information is created through the driver corresponding to the first PCIe module.
5. The method according to claim 1, characterized in that, When the data packet length is less than the preset data packet length, the method further includes: During the process of submitting the target data packet to the sending queue, the first fragment identifier is set for each pre-packaged work request in the target data packet through the remote direct memory access component; The pre-packaged work request is submitted to the sending queue, and the target data packet is sent to the second terminal through the first PCIe module, so that the second terminal receives the target data packet through the second PCIe module and generates a completion queue entry based on the fragmentation identifier corresponding to each pre-packaged work request element.
6. The method according to claim 5, characterized in that, The step of submitting the pre-encapsulation work request to the sending queue and sending the target data packet to the second terminal through the first PCIe module includes: The pre-packaging work request is sent sequentially to the second terminal; So that when the second terminal receives the pre-packaged work request, during the process of reading the work request element, if it reads the first fragment identifier, it creates a corresponding completion queue entry and generates corresponding first confirmation information to return; The first confirmation information includes the first fragment identifier; Upon receiving the first confirmation information, a completion queue entry corresponding to the first confirmation information is created through the driver corresponding to the first PCIe module.
7. The method according to claim 1, characterized in that, Before splitting the pre-encapsulated work request element corresponding to the target data packet into several fragments during the process of submitting the target data packet to the sending queue, the method further includes: determining the actual depth of the sending queue based on the data packet length, the preset sending queue depth, and the preset data packet length.
8. A remote direct memory access transmission device based on a DPU, comprising a DPU or a network interface card (NIC), characterized in that, The DPU or network interface card is used to implement the steps of the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method for remote direct memory access and computer equipment
CN117573603A
Reliable communication method for RDMA UD transmission, electronic equipment and readable medium
CN118200253A