Multi-path transmission method, device, equipment, medium and program product
By generating multiple sub-queues for multi-path transmission of sQP, the reliability and bandwidth utilization issues of a single physical network path in RDMA technology are solved, achieving more efficient data transmission.
Patent Information
- Application Number
- CN202411038305.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-07-31
AI Technical Summary
In existing RDMA technology, data transmission along a single physical network path is prone to link failures and low bandwidth utilization, resulting in poor data transmission performance.
By generating multiple sub-queue pairs (sQP) corresponding to the main queue pair (QP), and performing multi-path transmission based on multiple sQPs, the first message transmitted by each sQP carries preset information, and data is transmitted using multiple physical paths.
It improves the reliability and bandwidth utilization of data transmission, and enhances the efficiency and effectiveness of data transmission.
Smart Images

Figure CN119052163A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a multi-path transmission method, device, equipment, medium and program product. Background Art
[0002] The rapid development of the digital industry in related technologies has led to an explosive increase in the amount of data. The uneven distribution of computing resources has led to an increasing demand for data transmission between data production and consumption. Cloud computing vendors have proposed their own solutions for long-distance transmission of large files. Remote Direct Memory Access (RDMA) uses technologies such as zero memory copy, kernel bypass, and central processing unit (CPU) offload to completely offload the Transmission Control Protocol (TCP) / Internet Protocol (IP) protocol stack to the network card processing, allowing user-mode applications to directly read and write remote host memory, avoiding data copying and context switching, and achieving high throughput, low latency, and low CPU computing power loss performance.
[0003] However, since the source and destination port numbers of the User Datagram Protocol (UDP) connected to the same queue pair (QP) in standard RDMA are the same, a connection can only choose one physical network path for transmission. This will cause reliability problems on the one hand, that is, a single physical network path is prone to link failures, such as random packet loss, congestion packet loss, link single-pass, line disconnection, etc. caused by physical failure or configuration errors. The reliability problem is more serious due to the multi-heterogeneous and complex wide area network. On the other hand, it will cause bandwidth utilization problems, that is, there are multiple equal-cost paths in the wide area network, and the hash algorithm is generally used for load balancing. A single flow can only be hashed to one physical path, and the effective link bandwidth cannot be fully utilized. If the user adopts multi-flow (multi-QP) mode for transmission, due to the limitations of the hash algorithm (such as Equal Cost Multi-Path (ECMP)), hash polarization is prone to occur, resulting in uneven distribution of traffic of multiple flows among multiple links, resulting in poor data transmission effect. Summary of the invention
[0004] The embodiments of the present application provide a multi-path transmission method, apparatus, device, medium and program product to solve the problem of poor data transmission effect in the related art.
[0005] To solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a multipath transmission method, which is applied to a source end and includes:
[0007] Generate multiple sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP;
[0008] The target data is transmitted through multiple paths based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
[0009] Optionally, the generating a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP includes:
[0010] A plurality of equivalent paths between a source end and a destination end of a main QP are determined as a plurality of sQPs corresponding to the main QP.
[0011] Optionally, the generating a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP includes:
[0012] Generate N sQPs based on the source and destination of the main QP, where N is an integer greater than 0;
[0013] Performing round-trip delay (RTT) measurement based on the N sQPs to obtain RTT measurement values corresponding to the N sQPs respectively, and returning to execute the step of generating N sQPs based on the source end and the destination end of the main QP until a preset condition is met;
[0014] The preset condition includes at least one of the following:
[0015] The number of sQPs is greater than or equal to a first preset threshold;
[0016] A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
[0017] Optionally, the method further comprises:
[0018] When the difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold, the first sQP and the second sQP are merged.
[0019] Optionally, the preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following:
[0020] Destination virtual address; register key; direct memory access DMA length.
[0021] Optionally, the method further comprises:
[0022] The UDP port number of the sQP is determined based on the packet sequence number of each message transmitted by the sQP.
[0023] In a second aspect, an embodiment of the present application provides a multipath transmission method, applied to a destination, including:
[0024] Receive the message transmitted by sQP;
[0025] Writing the message into the host memory;
[0026] The out-of-order record bitmap information is determined according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
[0027] In a third aspect, an embodiment of the present application provides a multi-path transmission device, applied to a source end, comprising:
[0028] A generating module, configured to generate a plurality of sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP;
[0029] A transmission module is used to perform multi-path transmission on the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
[0030] Optionally, the generating module includes:
[0031] The determining unit is configured to determine a plurality of equivalent paths between a source end and a destination end of a main QP as a plurality of sQPs corresponding to the main QP.
[0032] Optionally, the generating module includes:
[0033] A generating unit, configured to generate N sQPs based on a source end and a destination end of a main QP, where N is an integer greater than 0;
[0034] A measuring unit, configured to measure the round-trip time RTT based on the N sQPs, obtain RTT measurement values corresponding to the N sQPs respectively, and return to execute the step of generating the N sQPs based on the source end and the destination end of the main QP until a preset condition is met;
[0035] The preset condition includes at least one of the following:
[0036] The number of sQPs is greater than or equal to a first preset threshold;
[0037] A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
[0038] Optionally, the generating module further includes:
[0039] A merging unit is configured to merge the first sQP and the second sQP when a difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold.
[0040] Optionally, the preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following:
[0041] Destination virtual address; register key; direct memory access DMA length.
[0042] Optionally, the device further comprises:
[0043] The second determination module is used to determine the UDP port number of the sQP based on the data packet sequence number of the message transmitted by each sQP.
[0044] In a fourth aspect, an embodiment of the present application provides a multi-path transmission device, applied to a destination end, including:
[0045] A receiving module, used for receiving messages transmitted by sQP;
[0046] A writing module, used for writing the message into the host memory;
[0047] The first determination module is used to determine out-of-order record bitmap information according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
[0048] In a fifth aspect, an embodiment of the present application provides an electronic device, including a transceiver and a processor.
[0049] The processor is configured to generate a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP;
[0050] The transceiver is used to perform multi-path transmission of target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
[0051] Optionally, the processor is specifically configured to:
[0052] A plurality of equivalent paths between a source end and a destination end of a main QP are determined as a plurality of sQPs corresponding to the main QP.
[0053] Optionally, the processor is specifically configured to:
[0054] Generate N sQPs based on the source and destination of the main QP, where N is an integer greater than 0;
[0055] Performing round-trip delay (RTT) measurement based on the N sQPs to obtain RTT measurement values corresponding to the N sQPs respectively, and returning to execute the step of generating N sQPs based on the source end and the destination end of the main QP until a preset condition is met;
[0056] The preset condition includes at least one of the following:
[0057] The number of sQPs is greater than or equal to a first preset threshold;
[0058] A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
[0059] Optionally, the processor is further configured to:
[0060] When the difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold, the first sQP and the second sQP are merged.
[0061] Optionally, the preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following:
[0062] Destination virtual address; register key; direct memory access DMA length.
[0063] Optionally, the processor is further configured to:
[0064] The UDP port number of the sQP is determined based on the packet sequence number of each message transmitted by the sQP.
[0065] In a sixth aspect, an embodiment of the present application provides an electronic device, including a transceiver and a processor.
[0066] The transceiver is used to receive the message transmitted by sQP;
[0067] The processor is used to:
[0068] Writing the message into the host memory;
[0069] The out-of-order record bitmap information is determined according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
[0070] In the seventh aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the multipath transmission method described in the first aspect are implemented; or, when the program is executed by the processor, the steps of the multipath transmission method described in the second aspect are implemented.
[0071] In an eighth aspect, an embodiment of the present application 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 multipath transmission method described in the first aspect above are implemented; or, when the computer program is executed by a processor, the steps of the multipath transmission method described in the second aspect above are implemented.
[0072] In a ninth aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the multipath transmission method as described in the first aspect above; or, when executed by a processor, implement the steps of the multipath transmission method as described in the second aspect above.
[0073] In an embodiment of the present application, the above-mentioned multi-path transmission method can generate multiple sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP, and perform multi-path transmission on the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information, so that the target data can be multi-path transmitted using multiple physical paths, thereby improving the reliability of data transmission, and can make full use of the available bandwidth of multiple equivalent paths to improve the efficiency of data transmission, thereby improving the effect of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0075] Figure 1 This is one of the flow charts of a multi-path transmission method provided in an embodiment of the present application;
[0076] Figure 2 This is one of the schematic diagrams for generating sQP provided in an embodiment of the present application;
[0077] Figure 3 This is the second schematic diagram of generating sQP provided in an embodiment of the present application;
[0078] Figure 4 It is a schematic diagram of a RoCE message format provided in an embodiment of the present application;
[0079] Figure 5 is a schematic diagram of an IB header provided in an embodiment of the present application;
[0080] Figure 6 It is a schematic diagram of a RETH message format provided in an embodiment of the present application;
[0081] Figure 7 It is a schematic diagram of an RDMA read and write data packet provided in an embodiment of the present application;
[0082] Figure 8 is a schematic diagram of a data packet sequence number provided in an embodiment of the present application;
[0083] Fig. 9 This is the second flowchart of a multi-path transmission method provided in an embodiment of the present application;
[0084] Fig.10 It is one of the structural schematic diagrams of a multi-path transmission device provided in an embodiment of the present application;
[0085] Fig.11 This is a second structural diagram of a multi-path transmission device provided in an embodiment of the present application;
[0086] Fig.12 This is one of the structural schematic diagrams of an electronic device provided in an embodiment of the present application;
[0087] Fig.13 This is the second structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0088] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0089] For ease of understanding, some contents involved in the embodiments of the present application are described below:
[0090] The rapid development of the digital industry has led to an explosive increase in the amount of data, and the uneven distribution of computing resources has resulted in an increasing demand for data transmission between production and consumption. For example, services such as East-West Computing, the national integrated computing network, data express, and distributed intelligent computing wide area interconnection currently use offline manual hard disk express solutions for long-distance transmission of large files, which poses risks of data leakage and loss, and cannot meet market demand in terms of data security and transmission efficiency.
[0091] Each cloud computing vendor has proposed its own solution for long-distance transmission of large files. For example, Amazon's AWS Data Sync is used to quickly and securely transfer large amounts of data between local storage and AWS storage; Microsoft's Azure Data Box provides a safe and reliable way to transfer large amounts of data from local to Azure data centers; Huawei Cloud's CloudWAN 3.0 solution supports ultra-wide interconnection and efficient data transmission through the IPv6+ innovative technology system; Alibaba Cloud uses intelligent routing technology and transport layer acceleration technology to further improve the speed and stability of data transmission. Each cloud computing vendor has provided solutions for the efficient transmission of large-scale data in the wide area network through global data center layout and optimized transmission protocols. However, for data transmission of tens of TB, online transmission solutions cannot meet the timeliness requirements and still require offline transmission. For large-scale interactive services such as distributed intelligent computing wide-area interconnection, it is also necessary to further study the wide-area transmission technology of ultra-large-scale data.
[0092] RDMA uses technologies such as zero memory copy, kernel bypass, and CPU offload to offload the TCP / IP protocol stack to the network card for processing, allowing user-mode applications to directly read and write remote host memory, avoiding data copying and context switching, and achieving high throughput, low latency, and low CPU computing power consumption. RDMA has been widely deployed in data centers to support a variety of low-latency and high-throughput applications, such as key-value storage, distributed transactions, distributed memory, remote procedure call (RPC), storage systems, graph computing, and machine learning systems. RDMA's kernel bypass and direct memory access (DMA) features can greatly reduce the CPU overhead of the sender and receiver. By using RDMA's "one-sided" operation (registering the receive buffer to the receiving network card in advance), massive data transmission can be achieved with almost no perception of the receiving CPU.
[0093] However, since the UDP source and destination port numbers of a QP connection in standard RDMA are the same, a connection can only choose one physical network path for transmission, which will introduce reliability and bandwidth utilization issues, resulting in poor data transmission effects.
[0094] In the embodiments of the present application, a multi-path transmission method, apparatus, device, medium and program product are proposed to solve the problem of poor data transmission effect in the related art.
[0095] See also Figure 1 , Figure 1 is one of the flowcharts of a multi-path transmission method provided in an embodiment of the present application, which is applied to a source end, such as Figure 1 As shown, the method comprises the following steps:
[0096] Step 101: Generate multiple sub-queue pairs sQP corresponding to the main queue pair QP based on the main queue pair QP.
[0097] Specifically, the master QP can be a user-oriented virtual channel for transmitting target data in the RDMA network, and the source and destination ends of the master QP are the sender and receiver of the target data. The creation process of the master QP can be that the user calls the RDMA programming interface (such as Verbs API) on the control node to create the master QP and configures the corresponding initial attributes such as endpoint addresses.
[0098] The above-mentioned multiple sQPs are channels for actually transmitting target data. The source and destination addresses of the multiple sQPs and their corresponding main QPs are the same. Each sQP may correspond to a physical path or a group of physical paths. For example, the sQP corresponding to a group of physical paths may be a group of physical paths that are bundled into a logical high-bandwidth path through link aggregation.
[0099] It can be understood that the main QP serves as a control interface for processing control information and management tasks, and the sQP serves as a channel for actual data transmission and is responsible for actual data reading and writing operations.
[0100] Step 102: Perform multipath transmission on the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
[0101] Specifically, the target data may be data to be transmitted to the host memory, and the multi-path transmission of the target data based on the multiple sQPs may be understood as transmitting the target data simultaneously through multiple parallel data channels, i.e., sQPs. The first message transmitted by the sQP may be the message with the first transmission order among at least one message transmitted by each sQP. The preset information may be a destination address for indicating message transmission.
[0102] In an embodiment of the present application, the above-mentioned multi-path transmission method can generate multiple sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP, and perform multi-path transmission on the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information, so that the target data can be multi-path transmitted using multiple physical paths, thereby improving the reliability of data transmission, and can make full use of the available bandwidth of multiple equivalent paths to improve the efficiency of data transmission, thereby improving the effect of data transmission.
[0103] Optionally, the generating a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP includes:
[0104] A plurality of equivalent paths between a source end and a destination end of a main QP are determined as a plurality of sQPs corresponding to the main QP.
[0105] Specifically, in the case where the user is familiar with the scenario of the wide area network infrastructure, that is, the number of equivalent paths between the data source and the destination can be determined, and the number of equivalent paths does not change over time, the user can configure the number of sQPs at both ends before creating and initializing the main QP according to the physical facility situation, or configure it at one end, and complete it through TCP / IP protocol or Communication Management Protocol (Communication Management, CM) interaction.
[0106] For example, Figure 2 is one of the schematic diagrams of generating sQP provided in the embodiment of the present application, such as Figure 2 As shown, the user can call the Verbs API to create a main QP, and determine multiple equivalent paths between the source end and the destination end of the main QP as multiple sQPs corresponding to the main QP.
[0107] In this implementation, the multipath transmission method can determine multiple equivalent paths between the source and destination of the main QP as multiple sQPs corresponding to the main QP, that is, it can achieve static generation of multiple sQPs according to the physical equivalent path situation, so that when the equivalent path between the source and destination is determined, multiple sQPs can be directly configured, thereby improving the configuration efficiency of multiple sQPs.
[0108] Optionally, the generating a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP includes:
[0109] Generate N sQPs based on the source and destination of the main QP, where N is an integer greater than 0;
[0110] Performing round-trip delay (RTT) measurement based on the N sQPs to obtain RTT measurement values corresponding to the N sQPs respectively, and returning to execute the step of generating N sQPs based on the source end and the destination end of the main QP until a preset condition is met;
[0111] The preset condition includes at least one of the following:
[0112] The number of sQPs is greater than or equal to a first preset threshold;
[0113] A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
[0114] Specifically, the generation of N sQPs based on the source and destination of the main QP may be that the source generates N sQP connections by increasing the UDP source port number, N may be understood as an adjustable detection step, and the value of N may be determined based on historical experience or specific needs. The round-trip time (RTT) measurement may refer to the time taken for measuring the entire process of a data packet being sent from the source of the sQP, arriving at the destination of the sQP, and then returning to the source, and the RTT measurement value is the time taken.
[0115] Specifically, the first preset threshold may be the upper limit of the physical connection between the source and the destination. When the number of sQPs is greater than or equal to the first preset threshold, the sQP generation is terminated. The second preset threshold may be used to determine whether the first sQP and the second sQP are the same physical path. That is, when the difference between the RTT measurement values corresponding to the first sQP and the second sQP is less than the second preset threshold, the first sQP and the second sQP may be determined to be the same physical path. The second preset threshold may be determined based on historical experience or specific needs. For example, when it can be determined that the difference between each physical path is small based on the network topology, the second preset threshold may be set relatively small. When the difference between each physical path is large, the second preset threshold may be set relatively large.
[0116] It can be understood that, when the difference between the RTT measurement values corresponding to the first sQP and the second sQP is less than the second preset threshold, it indicates that the new physical path cannot be detected, and the generation of the sQP can be stopped.
[0117] In this implementation manner, the multipath transmission method can generate N sQPs based on the source and destination of the main QP, perform round-trip delay RTT measurement based on the N sQPs, obtain RTT measurement values corresponding to the N sQPs, and return to execute the step of generating N sQPs based on the source and destination of the main QP until the preset conditions are met, so that when the user is decoupled from physical information such as the network infrastructure topology, the sQP can be determined by step-by-step detection, and then the effective link bandwidth can be fully utilized, thereby further improving the efficiency of data transmission.
[0118] Optionally, the method further comprises:
[0119] When the difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold, the first sQP and the second sQP are merged.
[0120] Specifically, when the difference between the RTT measurement values corresponding to the first sQP and the second sQP is less than the second preset threshold, it can be determined that the first sQP and the second sQP are the same physical path.
[0121] For example, Figure 3 This is a second schematic diagram of generating sQP provided in an embodiment of the present application, such as Figure 3 As shown, the source end can generate N sQP connections by increasing the UDP source port number, and perform active RTT measurement based on the generated sQP connections, set the RTT difference threshold T (configurable), compare the difference value of the RTT measurement results of any two sQPs, and if two sQP connections with a difference value less than T appear, the two sQP connections are merged and the iteration is stopped; if the difference value of the RTT measurement results of any two sQPs is greater than T, N sQPs are added and a new round of iterative detection and comparison and merging is performed. The principle is the same as the previous round. If the physical connection upper limit is still not reached, the next round of iteration is continued until two sQP connections with a difference value less than T appear.
[0122] In this implementation, the above-mentioned multi-path transmission method can merge the first sQP and the second sQP when the difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold, so that the accuracy of determining multiple physical paths can be improved, and then the uniformity of traffic distribution among multiple physical paths can be improved, thereby further improving the effect of data transmission.
[0123] Optionally, the preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following:
[0124] Destination virtual address; register key; direct memory access DMA length.
[0125] Specifically, the RETH extended message header may be an RDMA Extended Transport Header, the virtual address of the destination may be a destination memory address, used to indicate a specific location in the memory of the receiving host, that is, a location where data should be written or read, the registration key may be used to verify whether the remote node has the right to perform RDMA operations, and the DMA length may be a specified length of data to be read or written.
[0126] For example, Figure 4 is a schematic diagram of a RoCE message format provided in an embodiment of the present application, such as Figure 4 As shown in the figure, the RoCEv2 (RDMA over Converged Ethernet version 2) message includes an Ethernet header (EthernetHeader), an IP header, a UDP header, and an InfiniBand (IB) header, etc. Figure 5 is a schematic diagram of an IB header provided in an embodiment of the present application, such as Figure 5 As shown, the Extended Transport Header (ETH) in the IB includes the RETH extended message header. Figure 6 is a schematic diagram of a RETH message format provided in an embodiment of the present application, such as Figure 6 As shown, the RETH extension header can carry a virtual address (Virtual Address), a registration key (Registration Key 、 R_Key), Direct Memory Access (DMA) length and other information. Figure 7 is a schematic diagram of an RDMA read and write data packet provided in an embodiment of the present application, such as Figure 7 As shown in the figure, the RDMA read request packet and the RDMA write request packet can carry the RETH extension header. Standard RDMA read (Read), write (Write) and other operations only carry the RETH extension header in the header of the first message. If an out-of-order message arrives first, the memory address will be unclear.
[0127] In this implementation, the above-mentioned multi-path transmission method can carry a RETH extended message header in the first message of each sQP, and the RETH extended message header carries at least one of the following items: the virtual address of the destination; the registration key; the direct memory access DMA length, so that messages that arrive out of order through different physical paths can also be directly and correctly written into the host memory, thereby improving the accuracy of data transmission.
[0128] Optionally, the method further comprises:
[0129] The UDP port number of the sQP is determined based on the packet sequence number of each message transmitted by the sQP.
[0130] Specifically, the above-mentioned UDP port number may include a source port number and a destination port number. The above-mentioned determination of the UDP port number of the sQP based on the data packet sequence number of the message transmitted by each sQP may be to select a value corresponding to a preset position of the data packet sequence number (Packet Sequence Number, PSN) as the UDP port number of the sQP. The above-mentioned preset position may be determined according to actual needs.
[0131] It is understandable that a larger number of digits of the PSN can be selected as the UDP port number of the sQP to achieve packet-by-packet loading, that is, each data packet corresponds to one sQP.
[0132] For example, Figure 8 is a schematic diagram of a data packet sequence number provided in an embodiment of the present application, such as Figure 8 As shown, for example, the middle three digits of the PSN can be selected as the UDP port number of the sQP. Since the middle three digits of the first three PSNs are the same, all 000, it means that the three data packets corresponding to the first three PSNs will be transmitted in sequence through the same sQP, that is, the sQP with a UDP port number of 000. The middle three digits of the fourth to seventh PSNs are the same, all 001, which means that the four data packets corresponding to the fourth to seventh PSNs will be transmitted in sequence through the same sQP, that is, the sQP with a UDP port number of 001. The middle three digits of the eighth to eleventh PSNs are the same, all 010, which means that the four data packets corresponding to the eighth to eleventh PSNs will be transmitted in sequence through the same sQP, that is, the sQP with a UDP port number of 010. In addition, the middle five digits of the PSN can also be selected as the UDP port number of the sQP to achieve packet-by-packet loading.
[0133] It should be noted that when multiple data packets are transmitted at the same sQP, they can be transmitted sequentially according to the PSN of the multiple data packets. Therefore, when the receiving end does not receive a specific data packet, the receiving end can more easily determine whether the data packet is lost or the arrival time difference of the data packet is caused by different transmission paths, for example. Figure 8 As shown, in Figure 8 When the data packet corresponding to the second PSN has arrived at the receiving end, but the data packet corresponding to the first PSN has not arrived at the receiving end, it can be determined that the data packet corresponding to the first PSN is lost, thereby reducing the processing pressure on the receiving end.
[0134] In this embodiment, the above-mentioned multi-path transmission method can determine the UDP port number of the sQP based on the data packet sequence number of the message transmitted by each sQP, and can divide the target data and disperse it to multiple sQPs for transmission to improve data transmission efficiency, and can control the degree of disorder introduced by multi-path transmission, thereby further improving the efficiency of data transmission.
[0135] See also Fig. 9 , Fig. 9 This is a second flowchart of a multi-path transmission method provided in an embodiment of the present application, which is applied to the destination end, such as Fig. 9 As shown, the method comprises the following steps:
[0136] Step 901: Receive a message transmitted by sQP.
[0137] Step 902: Write the message into the host memory.
[0138] Step 903: Determine out-of-order record bitmap information according to the data packet sequence number of the message, wherein the out-of-order record bitmap information is used to indicate whether the message is out-of-order.
[0139] Specifically, the destination can use the direct memory access feature of RDMA to write the received message directly into the host memory. The above-mentioned disordered recording bitmap information can use 1 bit to record whether the message is disordered. For example, if the message is disordered, it can be recorded as 1, otherwise it can be recorded as 0. Whether the above-mentioned message is disordered can be understood as whether the message whose data packet sequence number is sorted before the message has arrived at the destination.
[0140] It should be noted that, when the out-of-order record bitmap information indicates that all messages in the host memory are not out of order, it means that the messages in the host memory can be delivered to the upper-layer application in order.
[0141] In an embodiment of the present application, the above-mentioned multipath transmission method can receive a message transmitted by sQP, write the message into the host memory, and determine the out-of-order record bitmap information according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out-of-order, so that the out-of-order message can be directly stored in the host memory, and the out-of-order record bitmap information is used to achieve order-preserving delivery to the upper-layer application, thereby reducing the utilization of cache resources on the RDMA network card and improving the efficiency of data transmission.
[0142] See also Fig.10 , Fig.10 is one of the structural diagrams of a multi-path transmission device provided in an embodiment of the present application, which is applied to a source end, such as Fig.10 As shown, the multi-path transmission device 1000 includes:
[0143] A generating module 1001 is used to generate a plurality of sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP;
[0144] The transmission module 1002 is configured to perform multi-path transmission on the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
[0145] Optionally, the generating module 1001 includes:
[0146] The determining unit is configured to determine a plurality of equivalent paths between a source end and a destination end of a main QP as a plurality of sQPs corresponding to the main QP.
[0147] Optionally, the generating module 1001 includes:
[0148] A generating unit, configured to generate N sQPs based on a source end and a destination end of a main QP, where N is an integer greater than 0;
[0149] A measuring unit, configured to measure the round-trip time RTT based on the N sQPs, obtain RTT measurement values corresponding to the N sQPs respectively, and return to execute the step of generating the N sQPs based on the source end and the destination end of the main QP until a preset condition is met;
[0150] The preset condition includes at least one of the following:
[0151] The number of sQPs is greater than or equal to a first preset threshold;
[0152] A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
[0153] Optionally, the generating module 1001 further includes:
[0154] A merging unit is configured to merge the first sQP and the second sQP when a difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold.
[0155] Optionally, the preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following:
[0156] Destination virtual address; register key; direct memory access DMA length.
[0157] Optionally, the device further comprises:
[0158] The second determination module is used to determine the UDP port number of the sQP based on the data packet sequence number of the message transmitted by each sQP.
[0159] It should be noted that the multipath transmission device provided in the embodiment of the present application is a device capable of executing the multipath transmission method described above, and all implementations in the multipath transmission method embodiment described above are applicable to the device and can achieve the same or similar beneficial effects. To avoid repeated description, this embodiment will not be described in detail.
[0160] See also Fig.11 , Fig.11 This is a second structural diagram of a multi-path transmission device provided in an embodiment of the present application, which is applied to a destination end, such as Fig.11 As shown, the multi-path transmission device 1100 includes:
[0161] The receiving module 1101 is used to receive the message transmitted by sQP;
[0162] A writing module 1102, used for writing the message into a host memory;
[0163] The first determination module 1103 is used to determine out-of-order record bitmap information according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
[0164] It should be noted that the multipath transmission device provided in the embodiment of the present application is a device capable of executing the multipath transmission method described above, and all implementations in the multipath transmission method embodiment described above are applicable to the device and can achieve the same or similar beneficial effects. To avoid repeated description, this embodiment will not be described in detail.
[0165] For details, see Fig.12 As shown, an embodiment of the present application further provides an electronic device, including a bus 1201 , a transceiver 1202 , an antenna 1203 , a bus interface 1204 , a processor 1205 and a memory 1206 .
[0166] The processor 1205 is configured to generate, based on the main queue pair QP, a plurality of sub-queue pairs sQP corresponding to the main QP.
[0167] Furthermore, the transceiver 1202 is configured to perform multi-path transmission of the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
[0168] exist Fig.12 In the embodiment, the bus architecture (represented by bus 1201) may include any number of interconnected buses and bridges, and bus 1201 links various circuits including one or more processors represented by processor 1205 and memory represented by memory 1206. Bus 1201 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 1204 provides an interface between bus 1201 and transceiver 1202. Transceiver 1202 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 1205 is transmitted on a wireless medium via antenna 1203, and further, antenna 1203 also receives data and transmits the data to processor 1205.
[0169] The processor 1205 is responsible for managing the bus 1201 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 1206 can be used to store data used by the processor 1205 when performing operations.
[0170] Optionally, the processor 1205 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD).
[0171] Optionally, the processor 1205 is specifically configured to:
[0172] A plurality of equivalent paths between a source end and a destination end of a main QP are determined as a plurality of sQPs corresponding to the main QP.
[0173] Optionally, the processor 1205 is specifically configured to:
[0174] Generate N sQPs based on the source and destination of the main QP, where N is an integer greater than 0;
[0175] Performing round-trip delay (RTT) measurement based on the N sQPs to obtain RTT measurement values corresponding to the N sQPs respectively, and returning to execute the step of generating N sQPs based on the source end and the destination end of the main QP until a preset condition is met;
[0176] The preset condition includes at least one of the following:
[0177] The number of sQPs is greater than or equal to a first preset threshold;
[0178] A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
[0179] Optionally, the processor 1205 is further configured to:
[0180] When the difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold, the first sQP and the second sQP are merged.
[0181] Optionally, the preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following:
[0182] Destination virtual address; register key; direct memory access DMA length.
[0183] Optionally, the processor 1205 is further configured to:
[0184] The UDP port number of the sQP is determined based on the packet sequence number of each message transmitted by the sQP.
[0185] It should be noted that the electronic device provided in the embodiment of the present application is a device capable of executing the above-mentioned multi-path transmission method, and all implementation methods in the above-mentioned multi-path transmission method embodiment are applicable to the electronic device and can achieve the same or similar beneficial effects. To avoid repeated description, this embodiment will not be repeated.
[0186] For details, see Fig.13 As shown, an embodiment of the present application further provides an electronic device, including a bus 1301 , a transceiver 1302 , an antenna 1303 , a bus interface 1304 , a processor 1305 and a memory 1306 .
[0187] The transceiver 1302 is used to receive the message transmitted by the sQP.
[0188] Further, the processor 1305 is configured to:
[0189] Writing the message into the host memory;
[0190] The out-of-order record bitmap information is determined according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
[0191] exist Fig.13 In the embodiment, the bus architecture (represented by bus 1301) may include any number of interconnected buses and bridges, and bus 1301 links various circuits including one or more processors represented by processor 1305 and memory represented by memory 1306. Bus 1301 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 1304 provides an interface between bus 1301 and transceiver 1302. Transceiver 1302 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 1305 is transmitted on a wireless medium via antenna 1303, and further, antenna 1303 also receives data and transmits the data to processor 1305.
[0192] The processor 1305 is responsible for managing the bus 1301 and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 1306 can be used to store data used by the processor 1305 when performing operations.
[0193] Optionally, the processor 1305 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD).
[0194] It should be noted that the electronic device provided in the embodiment of the present application is a device capable of executing the above-mentioned multi-path transmission method, and all implementation methods in the above-mentioned multi-path transmission method embodiment are applicable to the electronic device and can achieve the same or similar beneficial effects. To avoid repeated description, this embodiment will not be repeated.
[0195] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, the program implements the above-mentioned multi-path transmission method or each process of the multi-path transmission method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0196] The embodiment of the present application 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 above-mentioned multi-path transmission method or each process of the multi-path transmission method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0197] An embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned multi-path transmission method or the multi-path transmission method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0198] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0199] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0200] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A multipath transmission method, characterized in that: Applied to the source, including: Generate multiple sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP; The target data is transmitted through multiple paths based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
2. The method according to claim 1, characterized in that The generating a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP includes: A plurality of equivalent paths between a source end and a destination end of a main QP are determined as a plurality of sQPs corresponding to the main QP.
3. The method according to claim 1, characterized in that The generating a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP includes: Generate N sQPs based on the source and destination of the main QP, where N is an integer greater than 0; Performing round-trip delay (RTT) measurement based on the N sQPs to obtain RTT measurement values corresponding to the N sQPs respectively, and returning to execute the step of generating N sQPs based on the source end and the destination end of the main QP until a preset condition is met; The preset condition includes at least one of the following: The number of sQPs is greater than or equal to a first preset threshold; A difference between RTT measurement values corresponding to the first sQP and the second sQP is less than a second preset threshold, and the first sQP and the second sQP are any two sQPs among the N sQPs.
4. The method according to claim 3, characterized in that The method further comprises: When the difference between the RTT detection values corresponding to the first sQP and the second sQP is less than the second preset threshold, the first sQP and the second sQP are merged.
5. The method according to claim 1, characterized in that The preset information is a RETH extended message header, and the RETH extended message header carries at least one of the following: Destination virtual address; register key; direct memory access DMA length.
6. The method according to claim 1, characterized in that The method further comprises: The UDP port number of the sQP is determined based on the packet sequence number of each message transmitted by the sQP.
7. A multipath transmission method, characterized in that: Applied to the destination, including: Receive the message transmitted by sQP; Writing the message into the host memory; The out-of-order record bitmap information is determined according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
8. A multi-path transmission device, characterized in that: Applied to the source, including: A generating module, configured to generate a plurality of sub-queue pairs sQP corresponding to the main QP based on the main queue pair QP; A transmission module is used to perform multi-path transmission on the target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
9. A multi-path transmission device, characterized in that: Applied to the destination, including: A receiving module, used for receiving messages transmitted by sQP; A writing module, used for writing the message into the host memory; The first determination module is used to determine out-of-order record bitmap information according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
10. An electronic device, characterized in that: Including transceiver and processor, The processor is configured to generate a plurality of sub-queue pairs sQPs corresponding to the main QP based on the main queue pair QP; The transceiver is used to perform multi-path transmission of target data based on the multiple sQPs, wherein the first message transmitted by each sQP carries preset information.
11. An electronic device, characterized in that: Including transceiver and processor, The transceiver is used to receive the message transmitted by sQP; The processor is used to: Writing the message into the host memory; The out-of-order record bitmap information is determined according to the data packet sequence number of the message, and the out-of-order record bitmap information is used to indicate whether the message is out of order.
12. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the program implements the steps of the multipath transmission method as described in any one of claims 1 to 6; or, when the program is executed by the processor, the program implements the steps of the multipath transmission method as described in any one of claims 7.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the computer program implements the steps of the multipath transmission method as described in any one of claims 1 to 6; or, when the computer program is executed by the processor, the computer program implements the steps of the multipath transmission method as described in any one of claims 7.
14. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the multipath transmission method according to any one of claims 1 to 6; or, the computer instructions, when executed by a processor, implement the steps of the multipath transmission method according to any one of claims 7.
Citation Information
Patent Citations
Message transmission method and device
CN109691039A
Multi-path data transmission method and device for lossy network based on RDMA
CN113904976A
Network delay measurement method, device, equipment and storage medium
CN115002008A
Data transmission method and device, computer equipment and readable medium
CN117424849A
