Data transmission method, DPU, device, electronic equipment, medium and program product
By obtaining the first identifier in the DPU and using the coordinated work of SPDK and FPGA, the complex resource consumption and configuration problems in data transmission errors in public cloud scenarios are solved, and rapid recovery and accurate retransmission are achieved, improving the efficiency and accuracy of data transmission.
Patent Information
- Application Number
- CN202510072780.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-02
AI Technical Summary
In public cloud scenarios, the DPU in the data center needs to deal with the situation of storage packet loss or errors when the storage data is transmitted abnormally. The existing technology relies on a complex TCP/IP protocol stack, consumes a large amount of system resources and is complex in configuration.
By introducing a mechanism for obtaining the first identity in the DPU, the starting point of the stored message sequence is determined, and through the coordinated work of SPDK and FPGA, the rapid retransmission and deduplication of data transmission is achieved, reducing the resource usage of CPU and memory.
It realizes rapid recovery and accurate retransmission when data transmission errors are reported, reduces the consumption of system resources, avoids complex protocol stack configuration, and improves the efficiency and accuracy of data transmission.
Smart Images

Figure CN119921901A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of data transmission, and in particular, relates to a data transmission method, a data processing unit (DPU), a device, an electronic device, a medium and a program product. Background Art
[0002] In the public cloud scenario, the DPU of the data center usually carries the tenants' system disks and data disks and other storage services. In order to deal with the loss or error of storage messages during abnormal transmission of storage data, public clouds often use Transmission Control Protocol / Internet Protocol (TCP / IP) to retransmit storage messages to ensure normal data transmission. TCP / IP connections consume more system resources, such as memory and central processing unit (CPU) processing power, and the TCP / IP protocol stack configuration is relatively complex, requiring configuration of congestion window size, retransmission time interval, etc. Summary of the invention
[0003] Embodiments of the present application provide a data transmission method, DPU, device, electronic device, medium, and program product.
[0004] The embodiment of the present application provides a data transmission method, which is applied to a DPU, wherein the DPU is used to carry data transmission between a server and a storage device; the method includes:
[0005] In the case of a data transmission error, a first identifier is obtained; the first identifier is an identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device;
[0006] Notify the server to use the stored message corresponding to the first identifier as the first stored message in a stored message sequence, so that the server starts from the stored message corresponding to the first identifier and sends each stored message in the stored message sequence in a preset order;
[0007] The stored message sequence is received, and data transmission operations are performed sequentially based on the stored message sequence.
[0008] In some embodiments, the first identifier is a used descriptor index Used idx (index), and before notifying the server to use the storage message corresponding to the first identifier as the first storage message in a storage message sequence, the method also includes: updating the first identifier to a second identifier, and the second identifier is the descriptor index Avail idx to be sent; the notifying the server to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence includes: notifying the server to use the storage message corresponding to the second identifier as the first storage message in the storage message sequence.
[0009] It can be seen that by updating the Used idx to the Available idx, it is helpful to quickly determine the first stored message in the stored message sequence, so as to achieve fast data retransmission.
[0010] In some embodiments, the data transmission operations are performed in sequence based on the storage message sequence, including: sending the storage message sequence to the storage device; receiving a first data set returned by the storage device based on the storage message sequence; determining whether there is duplicate data between the first data set and the historical data set; if there is duplicate data, deduplicating the data in the historical data set to obtain a second data set; the historical data set is a data set received by the DPU before receiving the first data set; and returning the second data set to the server.
[0011] It can be seen that the deduplication method provided in this embodiment is conducive to enabling the server to obtain accurate data transmission results and improve the correctness of data transmission.
[0012] In some embodiments, before sending the storage message sequence to the storage device, the method further includes: initiating a second data transmission operation to the storage device based on a second storage message in the DPU; the second storage message indicates that before the data transmission error, the DPU received but did not send the storage device storage message; receiving the historical data set returned by the storage device based on the second storage message.
[0013] It can be seen that the method provided in this embodiment is conducive to the orderly processing of messages stored in the DPU; further, the deduplication method provided in this embodiment can obtain accurate data transmission results when data retransmission is restored, thereby improving the correctness of data transmission.
[0014] In some embodiments, before obtaining the first identifier, the method further includes: stopping receiving stored messages from the server; after obtaining the first identifier, the method further includes: resuming receiving stored messages from the server.
[0015] It can be seen that stopping receiving the storage message of the server before obtaining the first identifier is conducive to quickly restoring the DPU's processing capability for the storage message, and is conducive to quickly restoring the current data transmission in the event of a data transmission error.
[0016] The embodiment of the present application also provides a DPU, which is used to carry data transmission between a server and a storage device; the DPU includes a storage high-performance development kit SPDK and a field programmable gate array FPGA, wherein:
[0017] The SPDK is used to restart in case of a data transmission error, and obtain a first identifier after restarting; send the first identifier to the FPGA; the first identifier is the identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device;
[0018] The FPGA is used to receive the first identifier, notify the server to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence, so that the server starts from the storage message corresponding to the first identifier and sends each storage message in the storage message sequence in a preset order; receive the storage message sequence, and perform data transmission operations in sequence based on the storage message sequence.
[0019] The embodiment of the present application further provides a data transmission device, which is applied to a DPU, and the DPU is used to carry data transmission between a server and a storage device; the device includes:
[0020] an acquisition module, configured to acquire a first identifier in case of a data transmission error; the first identifier is an identifier of a newly completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device;
[0021] a notification module, used for notifying the server to use the stored message corresponding to the first identifier as the first stored message in the stored message sequence, so that the server starts from the stored message corresponding to the first identifier and sends each stored message in the stored message sequence in a preset order;
[0022] The processing module is used to receive the stored message sequence and perform data transmission operations in sequence based on the stored message sequence.
[0023] An embodiment of the present application provides an electronic device, the electronic device comprising a processor and a memory for storing a computer program that can be run on the processor; wherein:
[0024] The processor is configured to run the computer program to execute any one of the above data transmission methods.
[0025] An embodiment of the present application provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned data transmission methods is implemented.
[0026] An embodiment of the present application provides a computer program product, including a computer program, which implements any of the above-mentioned data transmission methods when executed by a processor.
[0027] The embodiments of the present application provide a data transmission method, DPU, device, electronic device, medium and program product. In the case of data transmission errors, the DPU is used to process and recover data transmission, which is beneficial to reduce the resource occupancy rate of the CPU and memory during data transmission. Through the method provided in the embodiments of the present application, in the case of data transmission errors, the stored message that needs to be sent by the server can be quickly located through the first identifier, without the need to configure the congestion window size, retransmission time interval, etc., avoiding complex protocol stack configuration, improving the processing efficiency of data transmission errors, and further improving the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of a timeout retransmission mechanism provided in an embodiment of the present application;
[0029] Figure 2 A schematic diagram of a fast retransmission mechanism provided in an embodiment of the present application;
[0030] Figure 3 A flow chart of a data transmission method provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of a DPU structure provided in an embodiment of the present application;
[0032] Figure 5 A flow chart of lossless data retransmission based on DPU provided in an embodiment of the present application;
[0033] Figure 6 A data deduplication flow chart provided for an embodiment of the present application;
[0034] Figure 7 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;
[0035] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In public cloud scenarios, the DPU of a data center usually carries storage services such as tenants' system disks and data disks. In order to deal with the loss or error of storage messages during abnormal transmission of storage data, public clouds often use TCP / IP to retransmit storage messages to ensure normal transmission of storage data. TCP / IP's retransmission mechanisms mainly include timeout retransmission and fast retransmission.
[0037] Figure 1 A schematic diagram of a timeout retransmission mechanism is shown. In the timeout retransmission mechanism, when the sender sends data, if it does not receive a response from the receiver within a specified time, the sender will retransmit the data. For the timeout retransmission mechanism, if the timeout retransmission timeout is set too large, the message retransmission will be slow, resulting in poor overall data transmission performance; if the timeout is too small, it will cause frequent retransmissions, which is likely to cause network congestion and poor performance.
[0038] Figure 2 A schematic diagram of a fast retransmission mechanism is shown. In the fast retransmission mechanism, when three identical acknowledgment characters (ACK) are received consecutively, the retransmission mechanism is triggered. For the fast retransmission mechanism, when the stored message is not lost and the ACK is congested in the link, the message will also be retransmitted.
[0039] Therefore, when data is transmitted based on TCP / IP, the TCP / IP connection often consumes more system resources, such as memory and CPU processing power, and the TCP / IP protocol stack configuration is relatively complex, requiring configuration of the congestion window size, retransmission time interval, etc.
[0040] In order to overcome the problems existing in the related art, the embodiments of the present application provide a data transmission method, DPU, device, electronic device, medium and program product. The data transmission method design provided in the embodiments of the present application monitors data transmission through DPU. When a data transmission error is reported, the storage message for data transmission is relocated according to the currently transmitted data, without consuming system resources such as CPU and memory, and a single node can complete lossless retransmission of data.
[0041] The following is a further detailed description of the embodiments of the present application in conjunction with the accompanying drawings and examples. It should be understood that the embodiments provided herein are only used to explain the embodiments of the present application and are not intended to limit the embodiments of the present application. In addition, the embodiments provided below are partial embodiments for implementing the present application, rather than providing all embodiments for implementing the present application. In the absence of conflict, the technical solutions recorded in the embodiments of the present application can be implemented in any combination.
[0042] It should be noted that, in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or device including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or device. In the absence of further restrictions, an element defined by the sentence "includes..." does not exclude the presence of other related elements (such as steps in the method or units in the device, such as a unit in the device may be a part of a circuit, a part of a processor, a part of a program or software, etc.) in the method or device including the element.
[0043] The data transmission method provided in the embodiment of the present application includes a series of steps, but the data transmission method provided in the embodiment of the present application is not limited to the recorded steps. Similarly, the data transmission device provided in the embodiment of the present application includes a series of modules, but the device provided in the embodiment of the present application is not limited to including the modules explicitly recorded, and may also include modules required to obtain relevant information or perform processing based on information.
[0044] The embodiment of the present application provides a data transmission method, which is applied to a DPU, and the DPU is used to carry data transmission between a server and a storage device. The DPU is a new computing architecture designed for computing-intensive tasks in data centers. It combines the general computing power of the CPU and the parallel computing power of the graphics processing unit (GPU), and further optimizes data throughput and latency performance. Figure 3 A flow chart of a data transmission method is shown. Figure 3 The data transfer methods shown include:
[0045] Step 301: in case of a data transmission error, obtain a first identifier; the first identifier is the identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device.
[0046] In the case of a data transmission error, obtain the identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU. During the data transmission process, there may be a variety of situations that lead to errors, such as hardware failure, software problems, communication protocol mismatch, etc. Specifically, when the data transmission line is disconnected, the contact is poor, or the network is congested, data packets may be lost and then an error may be triggered. The DPU involved in this embodiment is designed to report an error in a timely manner and restart when a data transmission error is detected.
[0047] Specifically, the DPU provided in this embodiment can implement the error reporting mechanism of data transmission through the open source Storage Performance Development Kit (SPDK). SPDK is a high-performance, scalable, open source storage software development kit. The data transmission error reporting mechanism of SPDK includes error codes and log records. If SPDK encounters an error during data transmission, it will generate a corresponding error code and record it through the log system. These error codes and logs are important bases for troubleshooting. In actual applications, when SPDK encounters an error during data transmission, a mechanism can be set to try to restore data transmission by restarting related components or processes. The restart mechanism can improve the stability and reliability of the system and reduce the system downtime caused by data transmission errors.
[0048] In the case of a data transmission error, the first identifier can be determined through the log recorded in the DPU. Specifically, the first identifier can be obtained through the log in the SPDK. When a data transmission error occurs, that is, when packet loss occurs during data transmission, it is considered that the server has failed to receive the response data from the storage device for the latest data transmission. The response data includes the data to be transmitted and / or related control information, such as one or more of the source address, destination address, data length, and check code. The response data can specifically be a response message. In this case, the DPU obtains the first identifier of the most recently completed first data transmission operation received from the storage device, and determines the first storage message sent by the server when re-transmitting data through the first identifier.
[0049] Step 302: Notify the server to use the stored message corresponding to the first identifier as the first stored message in the stored message sequence, so that the server starts from the stored message corresponding to the first identifier and sends each stored message in the stored message sequence in a preset order.
[0050] In this embodiment, the identifier of the data transmission operation corresponds to the storage message one by one, or the identifier of the data transmission operation can be stored in the message header as the unique identifier of the storage message. The identifier of the data transmission operation can include a completed identifier for responding to a completed data transmission operation, or a pending identifier for indicating a pending data transmission operation. The first identifier obtained in the above step is a completed identifier.
[0051] After the DPU determines the first identifier, since the first identifier is the identifier of the latest completed data transmission operation in the DPU, before the data transmission error is reported, the server may have the first identifier, or the server may not have received the first identifier. Therefore, after the data transmission error is reported, the server may be notified to re-acquire the stored message corresponding to the first identifier based on the first identifier.
[0052] Here, the first identifier can be updated from a completed identifier to a pending identifier, and the first identifier updated to a pending identifier is sent to the server, and the server determines the corresponding storage message according to the first identifier, and determines the storage message corresponding to the first identifier as the first storage message to be sent by the server, and sends each message in the storage message sequence according to a preset order. The preset order here can be determined according to the design rules of the identifier to be sent. For example, when the identifier to be sent is designed to increase one by one, that is, each time the server sends a storage message, the corresponding pending identifier in the message is increased by one. Based on this preset rule, when the first identifier is determined to be "10", the storage message corresponding to "10" is used as the first storage message, and the server sends the storage messages corresponding to the pending identifiers "10", "11", and "12" to the DPU in sequence.
[0053] The storage message involved in this embodiment is used to implement data transmission from the server to the storage device, and the data transmission includes but is not limited to data reading and writing operations.
[0054] Step 303: Receive a stored message sequence, and perform data transmission operations in sequence based on the stored message sequence.
[0055] After receiving the notification sent by the DPU, the server re-sends the storage message sequence to the DPU according to the first identifier, and the DPU sends each storage message in the storage message sequence to the storage device in sequence according to the received storage message sequence. The storage device returns response data to the DPU in sequence according to each received storage message, and the DPU returns the response data returned by the storage device to the server, where the response data may specifically include the first identifier.
[0056] This embodiment provides a data transmission method, which uses the DPU to carry data transmission between a server and a storage device. When a data transmission error occurs, the DPU promptly reports the data transmission error, and the DPU determines the data that needs to be retransmitted, thereby bypassing the TCP / IP retransmission mechanism, reducing the resource occupancy rate of the CPU and memory, and improving the efficiency of data retransmission in the event of a data transmission error.
[0057] In practical applications, steps 301 to 303 can be implemented based on a processor, and the processor can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor.
[0058] In some embodiments, the first identifier is the used descriptor index Used idx, and before the above notification server uses the storage message corresponding to the first identifier as the first storage message in the storage message sequence, the above method also includes: updating the first identifier to the second identifier, and the second identifier is the descriptor index Avail idx to be sent; the above notification server uses the storage message corresponding to the first identifier as the first storage message in the storage message sequence, including: notifying the server to use the storage message corresponding to the second identifier as the first storage message in the storage message sequence.
[0059] In a virtualized transmission environment, for example, when accessing cloud / virtual machine (guest) data through a host (HOST), an efficient input / output (I / O) solution can be implemented through a paravirtualized Virtio data transmission mechanism. Here, the cloud / virtual machine is the storage device in the above embodiment, and the host (HOST) is the server in the above embodiment. In the Virtio data transmission mechanism, Avail idx and Used idx are two key index values, which are used to track the descriptor status in the available ring (Available Ring) and the used ring (Used Ring), respectively.
[0060] Avail idx is an index value used to record the location where the next available descriptor should be stored. When there is data to be transmitted, it fills the descriptor into the available ring table and updates Avail idx to indicate the location of the next free descriptor. In this way, the host can obtain descriptors from the available ring table according to Avail idx and use them to receive data. Used idx is an index value used to record the used descriptors. When the host obtains descriptors from the available ring table and uses them to store data, it updates the used ring table and increases Used idx to indicate the location of the next used descriptor.
[0061] In a virtualized transmission environment, through the method given in this embodiment, in the case of a data transmission error, the latest first Used idx in the DPU can be obtained, and the latest first Used idx can be updated to the first Avail idx, that is, the first identifier is changed from a completed identifier to a second identifier indicating a pending identifier, the second identifier is the first Availidx, the second identifier is reported to the host, the host obtains the corresponding storage message containing the second identifier according to the second identifier, and according to the method given in the above step 302, each storage message is sequentially sent to the DPU based on the second identifier. Here, the message header of each storage message includes Avail idx.
[0062] On the basis of the data transmission method provided in the above embodiment, this embodiment further provides a method for retransmitting data in a virtualized transmission environment by combining the used descriptor index and the descriptor index to be sent.
[0063] In some embodiments, the above-mentioned data transmission operations are performed in sequence based on the storage message sequence, including: sending a storage message sequence to a storage device; receiving a first data set returned by the storage device based on the storage message sequence; determining whether there is duplicate data in the first data set and the historical data set; if there is duplicate data, deduplicating the data in the historical data set to obtain a second data set; the historical data set is a data set received by the DPU before receiving the first data set; and returning the second data set to the server.
[0064] Before the data transmission error is reported, the DPU may still have a historical data set that has completed data transmission, or before the data transmission error is reported, the DPU may still have storage messages that have not been sent to the storage device. In this case, when the data transmission error is reported, the DPU will continue to execute the unsent storage messages after re-transmitting the data, and will also receive the historical data set returned from the storage device. Here, the historical data set and the first data set include the response data of the storage device to different storage messages.
[0065] After a data transmission error is reported, the DPU receives the storage message sequence sent from the server again, and sends the storage message sequence to the storage device in sequence. The storage device sends a first data set containing response data to the DPU based on the received storage message.
[0066] When the DPU receives the first data set, it compares the response data in the first data set with the response data in the historical data set, and removes duplicate data in the historical data set. For example, the completed identifier in the response message in the first data set can be compared with the completed identifier in the response message in the historical data set to see if they are the same. If they are the same, the same completed identifier and the corresponding response message in the historical data set are removed.
[0067] In a virtualized transmission environment, the Used idx in the first data set can be compared with the Used idx in the historical data set to see if there is the same Used idx. If there is the same Used idx, the repeated Used idx in the historical data set and the corresponding response data are deleted.
[0068] In some embodiments, before the storage message sequence is sent to the storage device, the method further includes: initiating a second data transmission operation to the storage device based on a second storage message in the DPU; the second storage message indicates that the DPU received but did not send the storage device before the data transmission error; and receiving a set of historical data returned by the storage device based on the second storage message.
[0069] When a data transmission error occurs, for example, before the SPDK is restarted, the DPU may receive a second storage message from the server, but when the SPDK is restarted, the second storage message is not sent to the storage device. In this case, when the SPDK completes the restart or the DPU resumes data transmission, the DPU will send the second storage message to the storage device in order, and then send the storage message sequence to the storage device. Here, the second storage message may be multiple storage messages.
[0070] For example, the server will continue to send storage messages to the DPU, and the identifiers corresponding to the sent storage messages are "10", "11", and "12" in sequence. When a data transmission error occurs, it is assumed that the processed identifier "10" is received by the DPU at this time and returned by the storage device, and the storage messages corresponding to the identifiers "11" and "12" in the DPU have not yet been sent to the storage device. When the DPU initiates data retransmission and notifies the server of the first identifier "10" as a pending identifier, the DPU also includes storage messages corresponding to the identifiers "11" and "12". In this case, based on the method given in the above embodiment, the server resends the storage message sequence to the DPU, and the identifiers corresponding to each storage message are "10", "11", "12", and "13". At this time, the identifiers of the storage messages executed inside the DPU are "11", "12", "10", "11", "12", and "13" in sequence. It can be seen that there are storage files that are repeatedly executed in the DPU, and the corresponding storage device returns repeated response data to the DPU, that is, the historical data set includes response data corresponding to the identifiers "11" and "12", and the first data set includes response data corresponding to "10", "11", "12" and "13".
[0071] In order to avoid the above situation and enable the server to finally obtain the correct response data, the DPU will receive the data in the historical data set, compare it with the data in the first data set to remove duplications, delete the duplicate data in the historical data set, and ensure the consistency of the response data received by the server and the corresponding completed identification.
[0072] In some embodiments, before obtaining the first identifier, the method further includes: stopping receiving stored messages from the server; after obtaining the first identifier, the method further includes: resuming receiving stored messages from the server.
[0073] It can be seen that when a data transmission error is reported, before obtaining the first identifier, stopping receiving storage messages from the server first helps reduce the number of storage messages to be processed in the DPU, prevents the loss of storage messages to be processed, and restores data transmission as soon as possible. Specifically, in a virtualized transmission environment, relevant statements can be written to block the receiving path of the DPU to stop receiving storage messages sent by the server.
[0074] After the first identifier is obtained, the receiving path of the DPU can be restored through relevant statements to continue receiving storage messages sent by the server and continue to carry data transmission between the server and the storage device.
[0075] Based on the data processing method given in the above embodiment, Figure 4 A schematic diagram of a DPU structure is shown, such as Figure 4As shown, the DPU 40 in the embodiment of the present application carries data transmission between the server 50 and the storage device 60 , and the DPU 40 includes an SPDK 401 and an FPGA 402 .
[0076] Among them, SPDK 401 is used to restart in the event of a data transmission error, and obtain a first identifier after restarting; the first identifier is sent to FPGA402; the first identifier is the identifier of the latest completed first data transmission operation fed back by the storage device 60 to the DPU 40; the first data transmission operation represents a data transmission operation initiated by the server 50 to the storage device 60.
[0077] FPGA402 is used to receive the first identifier, notify the server 50 to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence, so that the server 50 starts from the storage message corresponding to the first identifier and sends each storage message in the storage message sequence in a preset order; receives the storage message sequence, and performs data transmission operations in sequence based on the storage message sequence.
[0078] The specific data transmission method involved in this embodiment is the same as that in the above embodiment, wherein SPDK 401 can be specifically deployed in a system on chip (System on Chip, SOC). In a virtualized transmission environment, Avail idx is a descriptor index maintained by the server 50 driver, and the Avail idx value increases by one each time the server 50 sends a storage message; Used idx is a descriptor index maintained by FPGA402, and the Usedidx value increases by one each time FPGA402 transmits a storage message read and write reply to the server 50.
[0079] like Figure 4 As shown, FPGA 402 also includes a virtualized memory direct access technology module (HOST Virtual I / O Device Direct Memory Access, HOST Virtio DMA) 4021 on the server 50 side, and a virtualized memory direct access technology module (System on Chip Virtual I / O Device Direct Memory Access, SOC Virtio DMA) 4022 on the SOC side.
[0080] Based on the method given in the above embodiment, and Figure 4In the structural diagram of DPU 40 shown in the figure, when the SPDK 401 process hangs or a storage message error occurs on the transmission path of FPGA 402, SPDK 401 reads the value of Used idx on the local end after restarting and writes it into the register Hw avail idx of HOST Virtio DMA of FPGA 402. HOSTVirtio DMA 4021 in FPGA402 reads the data again from the memory pointed to by Avail idx of block device driver Virtio blk in server 50 and sends it to storage device 60.
[0081] exist Figure 4 Based on the schematic diagram of the structure of the DPU 40, Figure 5 A flow chart of lossless data retransmission based on DPU is further shown, including:
[0082] Step 501: SPDK sends a notification to FPGA to start blocking the data link.
[0083] After SPDK 401 restarts, it sends a notification to FPGA 402, writes 1 to the storage link blocking register Blkpause en in FPGA 402, and blocks the data flow of FPGA 402. Figure 4 According to the arrow corresponding to the number 1 in FIG. 1 , the SPDK 401 sends a notification to the Host Virtio DMA 4021 , and writes 1 to the link blocking register Blkpause en in the Host Virtio DMA 4021 .
[0084] Step 502: SPDK writes Used idx as Available idx in FPGA.
[0085] correspond Figure 4 The arrow corresponding to the number 1 in , after SPDK 401 indicates blocking the data link, further indicates writing back the first Used idx of the last normally transmitted storage packet in SPDK 401 to the first Available idx of HOST Virtio DMA 4021 .
[0086] Step 503: SPDK sends a notification to FPGA to restore the data link.
[0087] correspond Figure 4 Referring to the arrow corresponding to the number 1 in FIG. 1 , further, after writing the first Avail idx to the HOST Virtio DMA 4021 , the SPDK 401 further writes 0 to the storage link blocking register Blk pause en to restore the storage data path.
[0088] At this time, HOST Virtio DMA 4021 notifies the server 50 of the first Avail idx written, so that the server 50 sends the storage message sequence in order based on the method given in the above embodiment, that is, corresponding to Figure 4 The arrow corresponding to number 2.
[0089] Step 504: FPGA notifies SPDK to read and write data again according to Avail idx.
[0090] After the HOST Virtio DMA 4021 receives the storage message sequence, it Figure 4 Number 3 corresponds to the process indicated by the arrow, sending the storage message sequence and the corresponding Avail idx to the SOC Virtio DMA 4022, and the SOC Virtio DMA 4022 sends the storage message sequence and the corresponding Avail idx to the SPDK 401.
[0091] Step 505: SPDK sends a request to the storage device.
[0092] correspond Figure 4 As shown in the arrow corresponding to the number 5 in FIG. 4 , the SPDK 401 sends the received storage message sequence and the corresponding Avail idx to the storage device 60 for data reading and writing, that is, sends a request.
[0093] Step 506: The storage device responds to the request to the SPDK.
[0094] The storage device 60 responds to the request to the SPDK 401 and returns the historical data set and the first data set. Figure 4 The arrow corresponding to number 6 in the figure.
[0095] Step 507: SPDK responds to the request to FPGA.
[0096] correspond Figure 4 The arrow corresponding to number 7 in FIG. 4 shows that SPDK 401 responds to the request to SOC Virtio DMA 4022 in FPGA 402 and returns the historical data set and the first data set. Figure 4 The arrow corresponding to the number 8 in FIG. 8 shows that SOCVirtio DMA 4022 returns a response request to HOST Virtio DMA 4021, returning the historical data set and the first data set. Finally, corresponding to Figure 4 The arrow corresponding to the number 9 in FIG. 1 returns a response request from the HOST Virtio DMA 4021 to the server 50 , returning the historical data set and the first data set, and the data transmission is completed.
[0097] Figure 6A data deduplication flow chart is shown, such as Figure 6 As shown, due to the abnormal data transmission, there are still residual storage messages m to storage messages m+z in HOSTVirtio DMA4021. In this case, it is necessary to process the residual storage messages in HOST VirtioDMA 4021, and then fall back to storage message y according to the first Avail idx, and re-forward the storage message. Among them, storage messages y to storage messages y+n include storage messages m to storage messages m+z. On this basis, the storage device 60 receives two identical storage messages, namely storage messages m to storage messages m+z, so the storage device 60 will return the same response data to storage messages m to storage messages m+z twice. At this time, the HOST Virtio DMA4021 receiving end deduplicates the response data of the storage device 60, namely the historical data set and the first data set returned by the storage device 60, based on the method given in the above embodiment, and obtains the response data fed back to the server 50 after deduplication.
[0098] The embodiment of the present application provides a data transmission method and DPU, and performs data retransmission in abnormal situations through SPDK, and provides a new DPU storage lossless retransmission mechanism. By introducing a storage lossless mechanism in the DPU and cooperating with the SPDK for retransmission, a storage data retransmission scheme in abnormal storage paths is implemented in a software and hardware collaborative manner. Compared with the scheme of lossless retransmission through TCP / IP in the related art, the storage lossless retransmission mechanism implemented in the embodiment of the present application does not consume system resources such as CPU and memory, and a single node can complete the lossless retransmission of stored data. The lossless retransmission speed provided in the embodiment of the present application is fast, and the user is not aware of it. By using SPDK to write back the Avail idx of the FPGA, the FPGA re-takes the incorrectly transmitted data from the server and sends it to the storage device, so as to achieve lossless retransmission of data. The embodiment of the present application proposes a DPU storage lossless design method and device, which uses the DPU to write back the stored data, makes up for the shortcomings of the related technology, and can be used to achieve low-cost, feasible and easy-to-promote cloud computing and big data platform use, with high practicality.
[0099] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0100] Based on the data transmission method proposed in the above embodiment, the embodiment of the present application also provides a data transmission device, which is applied to the DPU. The DPU is used to carry data transmission between the server and the storage device; Figure 7 As shown, the data transmission device includes:
[0101] The acquisition module 701 is used to obtain the first identifier in the case of a data transmission error; the first identifier is the identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device.
[0102] The notification module 702 is used to notify the server to use the stored message corresponding to the first identifier as the first stored message in the stored message sequence, so that the server starts from the stored message corresponding to the first identifier and sends each stored message in the stored message sequence in a preset order.
[0103] The processing module 703 is used to receive a stored message sequence and perform data transmission operations in sequence based on the stored message sequence.
[0104] In practical applications, the acquisition module 701, the notification module 702, and the processing module 703 can be implemented based on a processor and a communication device.
[0105] In some embodiments, the first identifier is Used idx. Before notifying the server to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence, the notification module 702 is also used to update the first identifier to a second identifier, and the second identifier is Avail idx; the notification module 702 is specifically used to notify the server to use the storage message corresponding to the second identifier as the first storage message in the storage message sequence.
[0106] In some embodiments, the processing module 703 is specifically used to send a storage message sequence to a storage device; receive a first data set returned by the storage device based on the storage message sequence; determine whether there is duplicate data in the first data set and the historical data set; if there is duplicate data, deduplicate the data in the historical data set to obtain a second data set; the historical data set is a data set received by the DPU before receiving the first data set; and return the second data set to the server.
[0107] In some embodiments, before sending a storage message sequence to the storage device, the processing module 703 is also used to initiate a second data transmission operation to the storage device based on a second storage message in the DPU; the second storage message represents a storage message received by the DPU but not sent to the storage device before the data transmission error; and the receiving storage device returns a set of historical data based on the second storage message.
[0108] In some embodiments, before obtaining the first identifier, the processing module 703 is further used to stop receiving the stored message from the server; after obtaining the first identifier, the processing module 703 is further used to resume receiving the stored message from the server.
[0109] It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the same method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0110] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially 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, including a number of instructions to enable a computer device (which can be a terminal, a server, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0111] An embodiment of the present application also provides an electronic device. Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the electronic device 80 may include:
[0112] The memory 801 is used to store executable instructions.
[0113] The processor 802 is configured to implement any one of the above data transmission methods when executing the executable instructions stored in the memory 801.
[0114] The processor 802 may be at least one of an ASIC, a DSP, a DSPD, a PLD, a FPGA, a CPU, a controller, a microcontroller, and a microprocessor.
[0115] The above-mentioned computer-readable storage medium or memory 801 can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0116] An embodiment of the present application further provides a computer storage medium, on which computer executable instructions are stored, and the computer executable instructions are used to implement any one of the data transmission methods provided in the above embodiments.
[0117] Correspondingly, an embodiment of the present application further provides a computer program product, which includes computer executable instructions, and the computer executable instructions are used to implement any one of the data transmission methods provided in the above embodiments.
[0118] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0119] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0120] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0121] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0122] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0123] 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.
[0124] 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 data transmission method, characterized in that: Applied to a data processing unit DPU, the DPU is used to carry data transmission between a server and a storage device; the method comprises: In the case of a data transmission error, a first identifier is obtained; the first identifier is an identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device; Notify the server to use the stored message corresponding to the first identifier as the first stored message in a stored message sequence, so that the server starts from the stored message corresponding to the first identifier and sends each stored message in the stored message sequence in a preset order; The stored message sequence is received, and data transmission operations are performed sequentially based on the stored message sequence.
2. The method according to claim 1, characterized in that The first identifier is a used descriptor index Usedidx, and before notifying the server to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence, the method further includes: Update the first identifier to a second identifier, where the second identifier is the descriptor index Avail idx to be sent; The notifying the server to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence includes: The server is notified to use the storage message corresponding to the second identifier as the first storage message in a storage message sequence.
3. The method according to claim 1, characterized in that The sequentially performing data transmission operations based on the stored message sequence includes: Sending the storage message sequence to the storage device; Receiving a first data set returned by the storage device based on the storage message sequence; Determine whether there is duplicate data in the first data set and the historical data set; if there is duplicate data, deduplicate the data in the historical data set to obtain a second data set; the historical data set is a data set received by the DPU before receiving the first data set; The second data set is returned to the server.
4. The method according to claim 3, characterized in that Before sending the storage message sequence to the storage device, the method further includes: Initiate a second data transmission operation to the storage device according to a second storage message in the DPU; the second storage message indicates a storage message received by the DPU but not sent to the storage device before a data transmission error is reported; Receive a historical data set returned by the storage device based on the second storage message.
5. The method according to claim 1, characterized in that Before obtaining the first identifier, the method further includes: Stop receiving storage messages from the server; After obtaining the first identifier, the method further includes: Resume receiving the stored message from the server.
6. A data processing unit DPU, characterized in that: The DPU is used to carry data transmission between the server and the storage device; the DPU includes a storage high-performance development kit SPDK and a field programmable gate array FPGA, wherein: The SPDK is used to restart in case of a data transmission error, and obtain a first identifier after restarting; send the first identifier to the FPGA; the first identifier is the identifier of the most recently completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device; The FPGA is used to receive the first identifier, notify the server to use the storage message corresponding to the first identifier as the first storage message in the storage message sequence, so that the server starts from the storage message corresponding to the first identifier and sends each storage message in the storage message sequence in a preset order; receive the storage message sequence, and perform data transmission operations in sequence based on the storage message sequence.
7. A data transmission device, characterized in that: Applied to a data processing unit DPU, the DPU is used to carry data transmission between a server and a storage device; the device includes: an acquisition module, configured to acquire a first identifier in case of a data transmission error; the first identifier is an identifier of a newly completed first data transmission operation fed back by the storage device to the DPU; the first data transmission operation represents a data transmission operation initiated by the server to the storage device; a notification module, used for notifying the server to use the stored message corresponding to the first identifier as the first stored message in the stored message sequence, so that the server starts from the stored message corresponding to the first identifier and sends each stored message in the stored message sequence in a preset order; The processing module is used to receive the stored message sequence and perform data transmission operations in sequence based on the stored message sequence.
8. An electronic device, characterized in that: The electronic device comprises a processor and a memory for storing a computer program that can be run on the processor; wherein, The processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1 to 5 when executed by a processor.
Citation Information
Patent Citations
Data processing method, data interaction method and product in DPU network equipment
CN114553635A
Transmission optimization method based on Virtio-net
CN116346737A
Data processing method and device, equipment and storage medium
CN116781526A
Method and device for sending anomaly detection and method and device for receiving anomaly detection
CN117014339A
Method for acquiring multiple Virtqueries descriptors based on DPU (Data Processing Unit) chip Virtio
CN118484408A