Remote direct memory access transmission method and device based on DPU and program product
By adopting DPU-based shard transmission technology in the remote direct memory access method, the problems of high hardware performance requirements and poor compatibility in the prior art are solved, and more efficient and reliable remote data access and transmission are achieved.
Patent Information
- Application Number
- CN202411362350.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In the prior art, remote direct memory access methods limit the application range between different systems and devices due to high hardware performance requirements and poor compatibility.
Using the remote direct memory access transmission method based on DPU, by determining the packet length of the target packet, when the packet length is greater than the preset packet length, the target packet is split into several shards and each segment is divided. The slice sets the shard identifier, and realizes data transmission through the combination of the remote direct memory access component and the PCIe module.
Reliance on hardware performance is reduced, hardware performance requirements are reduced, and interoperability and compatibility between devices are improved, system reliability and performance are improved, and overall packet retransmission is avoided.
Smart Images

Figure CN119473988A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a DPU-based remote direct memory access transmission method, device and program product. Background Art
[0002] Remote Direct Memory Access (RDMA) is a high-performance, low-latency data transfer technology that allows computer systems to transfer data directly between memories without involving the host CPU. RDMA can significantly reduce data transfer latency and CPU usage, especially in high-performance computing and data center environments that require large amounts of data transfer. Therefore, remote direct memory access has been widely used and promoted in applications that require processing large amounts of data, low latency, and high throughput.
[0003] The traditional remote direct memory access method includes: splitting the data to be sent read from the memory through PCIe hardware and sending it to the target terminal, and the target terminal saves the data into the memory of the local terminal after receiving it.
[0004] However, the remote direct memory access method implemented in hardware has high requirements on hardware compatibility because a large number of low-level details need to be processed during data transmission, which limits the scope of application between different systems and devices, and has the problems of high hardware performance requirements and poor compatibility. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a DPU-based remote direct memory access transmission method, device and program product to eliminate or improve one or more defects in the prior art.
[0006] One aspect of the present invention provides a remote direct memory access transmission method based on a DPU, which is applied to a first terminal provided with a data processing unit, wherein the first terminal is also provided with a remote direct memory access component and a first PCIe module, and the method comprises the following steps:
[0007] determining a packet length of a target packet;
[0008] When the length of the data packet is greater than the preset data packet length, in 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 a plurality of 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 a remote direct memory access component; in the same shard, a first shard identifier corresponding to the last work request element is different from a second shard identifier corresponding to other work request elements;
[0010] Submit several slices to the sending queue, send 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 determine the method of generating the completion queue entry based on the slice identifier corresponding to each work request element.
[0011] In some embodiments of the present invention, the target data packet writes a request data packet, reads a request data packet, or sends a request data packet; when the target data packet is a send request data packet, submitting a plurality of slices to a send queue, and sending the target data packet to the second terminal through the first PCIe module includes:
[0012] The work request element in each slice is sequentially sent to the second terminal through the first PCIe module; after the second terminal receives the work request element through the second PCIe module, when the first slice identifier is read in the process of reading the work request element, a corresponding completion queue entry is created through a driver corresponding to the second PCIe module, and a first confirmation message is generated and returned; the first confirmation message includes the first slice identifier;
[0013] When the first confirmation information is received through the first PCIe module, a completion queue entry corresponding to the first confirmation information is created through a driver corresponding to the first PCIe module.
[0014] In some embodiments of the present invention, in the process of sending the work request elements in each slice to the second terminal in sequence, the second terminal, upon reading the second slice identifier, reuses the completion queue entry created by the driver corresponding to the second PCIe module and generates a second confirmation message to return.
[0015] In some embodiments of the present invention, when the target data packet is a read request data packet, submitting a plurality of fragments to a sending queue, and sending the target data packet to the second terminal through the first PCIe module includes:
[0016] The work request element in each slice is sequentially sent to the second terminal through the first PCIe module; after receiving the work request element through the second PCIe module, the second terminal obtains the request content corresponding to the currently read work request element when the first slice identifier is read in the process of reading the work request element, and generates a reply message for return; the reply message includes the first slice identifier;
[0017] When the reply information is received through the first PCIe module, a completion queue entry corresponding to the reply information is created through a driver corresponding to the first PCIe module.
[0018] In some embodiments of the present invention, when the length of the data packet is less than the preset data packet length, the method further includes:
[0019] In the process of submitting the target data packet to the sending queue, a first fragment identifier is set for each pre-encapsulated work request in the target data packet through the remote direct memory access component;
[0020] Submit the pre-packaged work request to the sending queue, send 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 generate a completion queue entry based on the fragment identifier corresponding to each pre-packaged work request element.
[0021] In some embodiments of the present invention, submitting the pre-packaged work request to a sending queue and sending the target data packet to the second terminal through the first PCIe module includes:
[0022] The pre-packaged work request is sequentially sent to the second terminal; after receiving the pre-packaged work request, the second terminal creates a corresponding completion queue entry when reading the first shard identifier in the process of reading the work request element, and generates a corresponding first confirmation message for return; the first confirmation message includes the first shard identifier;
[0023] When the first confirmation information is received, a completion queue entry corresponding to the first confirmation information is created through a driver corresponding to the first PCIe module.
[0024] In some embodiments of the present invention, in the process of submitting a target data packet to a sending queue, before splitting a pre-encapsulated work request element corresponding to the target data packet into a plurality of fragments, the method further includes: determining an actual depth of the sending queue based on a data packet length, a preset sending queue depth, and a preset data packet length.
[0025] Another aspect of the present invention provides a DPU-based remote direct memory access transmission device, including a DPU or a network card, and the DPU or the network card is used to implement the steps of the above-mentioned DPU-based remote direct memory access transmission method.
[0026] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the above-mentioned DPU-based remote direct memory access transmission method when executed by a processor.
[0027] Another aspect of the present invention provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned DPU-based remote direct memory access transmission method when executed by a processor.
[0028] The DPU-based remote direct memory access transmission method, device and program product of the present invention determine the data packet length of the target data packet; when the data packet length is greater than the preset data packet length, in the process of submitting the target data packet to the sending queue, split the pre-packaged work request element corresponding to the target data packet into a plurality of fragments; each fragment includes at least one work request element; in each fragment, a fragment identifier is set for each work request element; in 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; submit the plurality of fragments to the sending queue, send 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 based on the fragments corresponding to each work request element The identification determines the way to generate the completion queue entry; it can solve the problem of high hardware performance requirements and poor compatibility; through the combination of remote direct memory access components and PCIe module hardware and software, remote direct memory access data transmission between the first terminal and the second terminal is realized to reduce the dependence on hardware performance, thereby reducing the requirements for hardware performance. At the same time, through the combination of remote direct memory access components and PCIe module hardware and software, based on the unified communication protocol and standard of the remote direct memory access components 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 requirements. In the scenario where the target data packet does not need to be fragmented, the remote direct memory access component can still perform effective data transmission according to the requirements of the protocol, thereby ensuring the interoperability and compatibility between devices.
[0029] In addition, in the transmission scenario of long-distance remote direct memory access, by sending the target data packet in fragments and reassembling the data according to the fragment identifier at the receiving end, the reliability and performance of the system can be effectively improved, avoiding the need to retransmit the entire data packet, thereby more effectively completing efficient remote data access and transmission.
[0030] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0031] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0033] Figure 1 A schematic diagram of the structure of remote direct memory access between a first terminal and a second terminal provided by an embodiment of the present invention.
[0034] Figure 2 A flowchart of a DPU-based remote direct memory access transmission method provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0036] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0037] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, 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” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0039] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0040] The present invention provides a remote direct memory access transmission method based on DPU, which is applied to a first terminal provided with a data processing unit. The data processing unit (DPU) is a hardware accelerator for accelerating data processing. In the process of processing remote direct memory access (RDMA) transmission, the data processing unit accelerates the remote direct memory access operation through hardware to improve the speed and efficiency of data transmission; at the same time, the remote direct memory access operation is accelerated through parallel processing and optimization algorithms, which can reduce delay and increase throughput.
[0041] like Figure 1 As shown, a remote direct memory access component is also installed in the first terminal, and a first PCIe (Peripheral Component Interconnect Express) module is provided.
[0042] Among them, the remote direct memory access components include RDMA protocol stack, RDMA, adapter RDMA network and RDMA software; RDMA protocol stack is a software stack used to implement RDMA functions, including protocol layer, driver and library. RDMA adapter refers to hardware devices used to support RDMA communication and connect servers or computers to the network; RDMA network supports RDMA network architecture, such as InfiniBand or RoCE (RDMA over Converged Ethernet) network on Ethernet; RDMA software: 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, a storage controller, a network interface card, etc.) installed in the first terminal, and is used for communication and data transmission with a mainboard or other devices through a PCIe bus.
[0044] The first terminal refers to a terminal that performs remote direct memory access with other devices through a remote direct memory access component and a first PCIe module. It can be a computer (including desktops and laptops), a mobile phone or a tablet computer, etc., or it can be a server. This embodiment does not limit the device type of the first terminal.
[0045] Figure 2 FIG. 1 is a flow chart 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 transmission method based on remote direct memory access at least includes the following steps S201 to S204:
[0046] Step S201, determining the data packet length of the target data packet. The target data packet is a write request data packet, a read request data packet, or a send 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 through a PCIe bus. In a remote direct memory access (RDMA) operation of a first PCIe module, a request data packet refers to a data transmission request sent by a first terminal to a second terminal provided with a data processing unit. These requests may be write requests (writing data into the memory of the second terminal), read requests (reading data from the memory of the second terminal), or other types of data transmission requests.
[0048] The second terminal refers to a terminal that directly accesses remote memory with the first terminal. A second PCIe module is also provided in the second terminal. The second PCIe module refers to an expansion card or integrated circuit (such as a graphics card, a storage controller, a network interface card, etc.) installed in the second terminal, which is used to communicate and transmit data with the first terminal through the PCIe bus. The second terminal can be a computer (including a desktop and a laptop), a mobile phone or a tablet computer, etc., or a server. This embodiment does not limit the device type of the second terminal.
[0049] A write request packet is used to instruct the first terminal to write data to the memory of the second terminal. The write request packet contains the data to be written and some metadata, such as the memory address to be written, the length of the written data, etc. A read request packet is used to instruct the first terminal to read data from the memory of the second terminal. The read request packet contains detailed information of the read operation, such as the memory address to be read and the length of the read data, etc. A send request packet refers to a message or data sent by the first terminal to the second terminal, such as a data packet sent in a network communication, a message sent in a messaging system, or data transmission between programs.
[0050] Step S202, when the data packet length is greater than the preset data packet length, in the process of submitting the target data packet to the send queue (SendQueue, SQ), the pre-encapsulated work request element (Work Queue 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 a pre-set data packet length, which is used to indicate the maximum data packet length supported in the current environment. The pre-packaged work 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, etc.
[0052] When the packet length of the target packet exceeds the maximum packet length supported by the current environment, the pre-encapsulated work request element corresponding to the target packet needs to be split into several fragments through the remote direct memory access component, and the number of fragments is determined according to the ratio of the packet length of the target packet to the preset packet length. At the same time, for the sending queue, the starting address (addr) in each scatter-gather list (Scatter-Gather List, sg_list) is split according to the number of fragments, and the length (length) is also reduced according to the number of fragments.
[0053] When the length of the data packet is less than the preset data packet length, the first PCIe module of the first terminal sets a first fragmentation identifier for each pre-packaged work request element corresponding to the target data packet. The first fragmentation identifier can be a number, a letter, or a combination of numbers and letters, such as 0, a, or a0, etc. This embodiment does not limit the implementation method of the first fragmentation identifier. In some embodiments of the present invention, the fragmentation identifier is represented by the character "ignor_split", which occupies 1 Byte of the reserved field in the target data packet. For example, setting ignore_spilt=0 means setting the fragmentation identifier to 0.
[0054] Afterwards, the first terminal submits the pre-packaged work request element to the sending queue, and sends the target data to the second terminal through the first PCIe module. Figure 1 The second terminal receives the sending queue through the second PCIe module in the second terminal, obtains the receiving queue (Receive Queue, RQ), takes ignore_split from each pre-packaged work request element, and when ignore_split is 0, marks it through the second PCIe module to generate the corresponding completed queue entry (Completed Queue Entry, CQE).
[0055] Specifically, when the data packet length is less than the preset data packet length, it also includes: in 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 the 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 generating a completion queue entry based on the fragment identifier corresponding to each pre-packaged work request element.
[0056] In the process of sending the target data to the second terminal, the first terminal sequentially sends the pre-packaged work request to the second terminal. The second terminal sequentially receives and reads the pre-packaged work request through the second PCIe module, generates a completion queue entry and a first confirmation message after reading the first sharding identifier, and returns the first confirmation message to the first terminal. The first confirmation message carries the first sharding identifier. When the first terminal receives the first confirmation message and reads the first sharding identifier, the first terminal generates a corresponding completion queue entry through the first PCIe module.
[0057] Specifically, submitting a pre-packaged work request to a sending queue and sending a target data packet to a second terminal through a first PCIe module include: sending the pre-packaged work request to the second terminal in sequence; so that after receiving the pre-packaged work request, the second terminal, in the process of reading the work request element, creates a corresponding completion queue entry when a first fragment identifier is read, and generates a corresponding first confirmation message to return; the first confirmation message includes a first fragment identifier; when the first confirmation message is received, creates a completion queue entry corresponding to the first confirmation message through a driver corresponding to the first PCIe module.
[0058] Step S203, in each slice, a slice identifier is set for each work request element respectively through the remote direct memory access component; in the same slice, the first slice identifier corresponding to the last work request element is different from the second slice identifiers corresponding to other work request elements.
[0059] In some embodiments of the present invention, each shard includes at least one work request element. In the case where each shard includes one work request element, in each shard, the shard identifier of each work request element is set to the first shard identifier by the remote direct memory access component.
[0060] In the case of at least two work request elements in each shard, refer to Figure 1 In each slice, the slice identifier of the last work request element is set as the first slice identifier, and the slice identifiers of other work request elements are set as the second slice identifier.
[0061] For example, each shard includes 4 work request elements, the first shard identifier is "ignor_split=0", and the second shard identifier is "ignor_split=1". 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, submitting several slices 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 determining the method of generating the completion queue entry based on the slice 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 in sequence through the second PCIe module, generates a completion queue entry and a first confirmation message after reading the first fragment identifier, and returns the first confirmation message to the first terminal. The first confirmation message carries the first fragment identifier. When the first terminal receives the first confirmation message and reads the first fragment identifier, it generates a corresponding completion queue entry through the first PCIe module.
[0065] Specifically, in the case where 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, including: through the first PCIe module, the work request element in each fragment is sent to the second terminal in sequence; so that after the second terminal receives the work request element through the second PCIe module, in the process of reading the work request element, when 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; when the first confirmation message is received through the first PCIe module, the completion queue entry corresponding to the first confirmation message is created through the driver corresponding to the first PCIe module.
[0066] In addition, when sending the work request element in each slice to the second terminal in sequence, the second terminal reuses the completion queue entry created by the driver corresponding to the second PCIe module when reading the second slice identifier, and generates a second confirmation message to return.
[0067] When the target data packet is a read request data packet, the second terminal receives and reads the work request elements in sequence through the second PCIe module. After reading the first fragment identifier, if the currently read work request element contains request content or request data, the second terminal obtains the request content or request data corresponding to the currently read work request element, and generates a reply message to return, and the reply message includes the first fragment identifier; when the first terminal receives the reply message through the first PCIe module, the first terminal creates a completion queue entry corresponding to the reply message through the driver corresponding to the first PCIe module.
[0068] Specifically, in the case where the target data packet is a read request data packet, several slices are submitted to a sending queue, and the target data packet is sent to the second terminal through the first PCIe module, including: through the first PCIe module, the work request element in each slice is sent to the second terminal in sequence; so that after the second terminal receives the work request element through the second PCIe module, in the process of reading the work request element, when the first slice identifier is read, the request content corresponding to the currently read work request element is obtained, and a reply message is generated and returned; the reply information includes the first slice identifier; when the reply information is received through the first PCIe module, a completion queue entry corresponding to the reply information is created through the driver corresponding to the first PCIe module.
[0069] When the second fragment identifier is read, and when 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 reply message is generated and returned. At this time, when the first terminal receives the reply message through the first PCIe module, it reuses the completion queue entry that has been created.
[0070] In some embodiments of the present invention, during the process of creating a sending queue, when the length of a data packet is greater than a preset data packet length, it is also necessary to increase the queue depth of the sending queue proportionally.
[0071] Specifically, in the process of submitting a target data packet to a sending queue, before splitting a pre-encapsulated work request element corresponding to the target data packet into a plurality of fragments, the method further includes: determining an actual depth of the sending queue based on a data packet length, a preset sending queue depth and a 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 by the preset sending queue depth.
[0073] For example, taking the maximum length supported by the current environment, that is, the preset data packet length is 8M, and the actual data packet length of the target data packet to be sent is 64M, when the preset sending queue depth is 128, the actual depth of the sending queue is 128*(64 / 8)=1024.
[0074] In summary, the DPU-based remote direct memory access transmission method provided by the present invention determines the data packet length of the target data packet; when the data packet length is greater than the preset data packet length, in the process of submitting the target data packet to the sending queue, the pre-packaged work request element corresponding to the target data packet is split into a plurality of fragments; each fragment includes at least one work request element; in each fragment, a fragment identifier is set for each work request element; in 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; submits a plurality of fragments to the sending queue, and sends 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 based on the fragment corresponding to each work request element The identification determines the way to generate the completion queue entry; it can solve the problem of high hardware performance requirements and poor compatibility; through the combination of remote direct memory access components and PCIe module hardware and software, remote direct memory access data transmission between the first terminal and the second terminal is realized to reduce the dependence on hardware performance, thereby reducing the requirements for hardware performance. At the same time, through the combination of remote direct memory access components and PCIe module hardware and software, based on the unified communication protocol and standard of the remote direct memory access components 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 requirements. In the scenario where the target data packet does not need to be fragmented, the remote direct memory access component can still perform effective data transmission according to the requirements of the protocol, thereby ensuring the interoperability and compatibility between devices.
[0075] In addition, in the transmission scenario of long-distance remote direct memory access, by sending the target data packet in fragments and reassembling the data according to the fragment identifier at the receiving end, the reliability and performance of the system can be effectively improved, avoiding the need to retransmit 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 DPU-based remote direct memory access transmission device, including a DPU or a network card, and the DPU or the network card is used to implement the steps of the aforementioned DPU-based remote direct memory access transmission method.
[0077] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned remote direct memory access transmission method based on DPU are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0078] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned DPU-based remote direct memory access transmission method when executed by a processor.
[0079] It should be understood by those skilled in the art 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 the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0080] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is 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, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0081] In the present 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 features of other embodiments or replace features of other embodiments.
[0082] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A remote direct memory access transmission method based on DPU, characterized in that: The method is applied to a first terminal provided with a data processing unit, wherein the first terminal is also provided with a remote direct memory access component and a first PCIe module; the method comprises the following steps: determining a packet length of a target packet; In the case where the length of the data packet is greater than the preset data packet length, in 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 a plurality of fragments by the remote direct memory access component; each fragment includes at least one work request element; In each of the slices, a slice identifier is set for each work request element respectively by the remote direct memory access component; in the same slice, a first slice identifier corresponding to the last work request element is different from a second slice identifier corresponding to other work request elements; Submit the plurality of slices to the sending queue, send 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 determine the method of generating a completion queue entry based on the slice identifier corresponding to each work request element.
2. The method according to claim 1, characterized in that The target data packet is a write request data packet, a read request data packet, or a send request data packet; when the target data packet is the send request data packet, submitting the plurality of slices to the send queue, and sending the target data packet to the second terminal through the first PCIe module, comprises: The work request element in each slice is sequentially sent to the second terminal through the first PCIe module; after receiving the work request element through the second PCIe module, the second terminal creates a corresponding completion queue entry through a driver corresponding to the second PCIe module when the first slice identifier is read during reading the work request element, and generates a first confirmation message for return; the first confirmation message includes the first slice identifier; When the first confirmation information is received through the first PCIe module, a completion queue entry corresponding to the first confirmation information is created through a driver corresponding to the first PCIe module.
3. The method according to claim 2, characterized in that In the process of sending the work request elements in each slice to the second terminal in sequence, the second terminal, upon reading the second slice identifier, reuses the completion queue entry created by the driver corresponding to the second PCIe module and generates a second confirmation message to return.
4. The method according to claim 2, characterized in that In a case where the target data packet is the read request data packet, submitting the plurality of slices to the sending queue, and sending the target data packet to the second terminal through the first PCIe module, comprises: The work request element in each slice is sequentially sent to the second terminal through the first PCIe module; after receiving the work request element through the second PCIe module, the second terminal obtains the request content corresponding to the currently read work request element when the first slice identifier is read during the process of reading the work request element, and generates a reply message for return; the reply message includes the first slice identifier; When the reply information is received through the first PCIe module, a completion queue entry corresponding to the reply information is created through a driver corresponding to the first PCIe module.
5. The method according to claim 1, characterized in that In a case where the data packet length is less than the preset data packet length, the method further includes: In the process of submitting the target data packet to the sending queue, setting the first fragment identifier for each pre-encapsulated work request in the target data packet through the remote direct memory access component; Submit the pre-packaged work request to the sending queue, send 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 generate a completion queue entry based on the fragment identifier corresponding to each pre-packaged work request element.
6. The method according to claim 5, characterized in that Submitting the pre-packaged work request to the sending queue, and sending the target data packet to the second terminal through the first PCIe module, comprises: sending the prepackaged work requests to the second terminal in sequence; so that after receiving the pre-packaged work request, the second terminal creates a corresponding completion queue entry and generates corresponding first confirmation information to return when the first fragment identifier is read during the process of reading the work request element; The first confirmation information includes the first fragment identifier; When the first confirmation information is received, a completion queue entry corresponding to the first confirmation information is created through a driver corresponding to the first PCIe module.
7. The method according to claim 1, characterized in that In the process of submitting the target data packet to the sending queue, before splitting the pre-encapsulated work request element corresponding to the target data packet into a plurality of fragments, 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 DPU, comprising a DPU or a network card, characterized in that: The DPU or network card is used to implement the steps of the method as claimed in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data processing method for remote direct memory access and computer equipment
CN117573603A
Remote data copying method and device for process group
CN117707851A
Reliable communication method for RDMA UD transmission, electronic equipment and readable medium
CN118200253A