Chain descriptor management method and device for VirtIO equipment of DPU

Through the chain descriptor management method, the concurrent processing of multiple descriptor chains is supported, which solves the problem of low performance of traditional VirtIO devices, and realizes efficient data transmission and concurrent processing, which significantly improves overall performance and management simplicity.

CN119045947AActive Publication Date: 2024-11-29YUSUR TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411101916.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-29
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

The traditional VirtIO device's descriptor management method only processes one descriptor per transmission, resulting in frequent context switching and interrupt triggering, low performance and cannot adapt to application scenarios of large-scale data transmission, multi-channel transmission and concurrent processing.

Method used

Using chain descriptor management method, by configuring the descriptor chain in the descriptor ring queue buffer, sending notification signals using the base register, supporting concurrent processing of multiple descriptor chains, reducing the number of interrupts and context switching, and realizing batch data transmission and concurrent processing.

Benefits of technology

It significantly improves the overall performance of VirtIO devices, simplifies the management of multiple data buffers, reduces management complexity, and has good flexibility and scalability to adapt to scenarios of different sizes and needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045947A_ABST
    Figure CN119045947A_ABST
Patent Text Reader

Abstract

The invention provides a chained descriptor management method and device for VirtIO equipment of a DPU. A host machine receives a virtual input / output operation request sent by a virtual function; configuring a descriptor in a memory space pointed by a descriptor annular queue buffer area, wherein the descriptor comprises a previous in-chain descriptor address, a next in-chain descriptor address, a descriptor cut-off bit and other basic information; configuring a descriptor head address in a memory space pointed by the available data head annular queue buffer area; and sending a notification signal to the VirtIO equipment through the base address register, receiving a control block which is returned to the completed annular queue buffer area after the VirtIO equipment completes the corresponding virtual input / output operation, and recovering the released descriptors according to information contained in the control block. According to the method provided by the invention, a chain descriptor structure is introduced, batch data transmission and concurrent processing are realized, and the overall performance of VirtIO equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtualization technology, and in particular to a chain descriptor management method and device for a VirtIO device of a DPU. Background Art

[0002] With the rapid development of cloud computing and virtualization technologies, higher requirements are placed on high-performance data planes, packet receiving and sending rates, and overall data transmission performance.

[0003] As an efficient I / O virtualization solution, VirtIO (Virtual Input & Output) plays an important role in virtual machine performance optimization. However, the traditional virtio device descriptor management method mainly relies on single descriptor processing, which is often limited by performance bottlenecks and concurrent processing capabilities when dealing with large-scale data transmission and concurrent scenarios.

[0004] Existing VirtIO devices usually use a single descriptor management mechanism, that is, only one descriptor is processed for each transmission. This mechanism has frequent context switching and interrupt triggering when processing complex data transmission tasks, resulting in performance degradation. In addition, the single descriptor management method also has limited support for concurrent processing and multi-channel transmission. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a chain descriptor management method and apparatus for a VirtIO device of a DPU, so as to solve the problem that the descriptor management mechanism adopted by the existing VirtIO device only processes one descriptor per transmission, and there are frequent context switching and interrupt triggering when processing complex data transmission tasks, thereby resulting in low management efficiency and low performance, and is not suitable for application scenarios of large-scale data transmission, multi-channel transmission, and concurrent processing.

[0006] In one aspect, the present invention provides a chain descriptor management method for a VirtIO device of a DPU, the method comprising the following steps:

[0007] The host machine receives a virtual input / output operation request including virtual input / output operation information sent by the virtual function;

[0008] The descriptor is configured in the memory space pointed to by the descriptor ring queue buffer, and a descriptor chain is constructed according to the previous in-chain descriptor address and the next in-chain descriptor address contained in the descriptor; wherein each descriptor contains virtual input / output operation information issued by the corresponding virtual function;

[0009] Configure the descriptor header address in the memory space pointed to by the available data header ring queue buffer;

[0010] Send a notification signal to the VirtIO device through the base address register, wherein the notification signal includes the configured descriptor information and the descriptor header address information;

[0011] A control block of a completed ring queue buffer is received, and descriptors are recovered according to information contained in the control block; wherein the control block is a data structure returned to the completed ring queue buffer after the VirtIO device reads corresponding descriptors from the descriptor chain and completes corresponding virtual input / output operations according to the read descriptors.

[0012] In some embodiments of the invention, the method comprises:

[0013] The virtual input / output operation request is forwarded to the host machine through the virtualization layer.

[0014] In some embodiments of the present invention, configuring a descriptor in a memory space pointed to by a descriptor ring queue buffer includes:

[0015] The host machine allocates a ring buffer as the descriptor ring queue buffer for storing the descriptors;

[0016] Filling the contents of the descriptors one by one in the descriptor ring queue buffer;

[0017] After the filling is completed, the status field of the descriptor is updated.

[0018] In some embodiments of the present invention, in a multi-queue environment, the method further comprises:

[0019] Linking a plurality of descriptors to form a continuous descriptor chain according to the notification signal, the previous in-chain descriptor address and the next in-chain descriptor address;

[0020] Traversing the descriptor chain, accessing each descriptor in the descriptor chain one by one according to the next in-chain descriptor address contained in each descriptor;

[0021] Obtain the information in the required descriptor and perform corresponding data processing;

[0022] After each descriptor is processed, the descriptor chain structure is updated.

[0023] On the other hand, the present invention also provides a chain descriptor management method for a VirtIO device of a DPU, the method comprising the following steps:

[0024] The VirtIO device receives a notification signal sent by the host machine, where the notification signal includes new available descriptor information;

[0025] Read the next available descriptor header address from the available data header ring queue buffer;

[0026] According to the descriptor header address, read a corresponding descriptor from a descriptor ring queue buffer, wherein the descriptor includes virtual input / output operation information issued by a virtual function, and the descriptor is pre-constructed into a descriptor chain according to a previous in-chain descriptor address and a next in-chain descriptor address contained in the descriptor;

[0027] After executing the corresponding virtual input / output operation according to the read descriptor, the corresponding control block is sent to the completion ring queue buffer.

[0028] In some embodiments of the present invention, reading a corresponding descriptor from a descriptor ring queue buffer according to the descriptor header address includes:

[0029] First, read the first part of the corresponding descriptor from the descriptor ring queue buffer;

[0030] If there are descriptors that have not been read subsequently, a preset number of descriptors are read continuously to achieve parallel processing.

[0031] In some embodiments of the present invention, receiving a notification signal sent by a host machine includes:

[0032] receiving an interrupt signal sent by the host machine to learn that a new descriptor is available, and executing a predetermined interrupt processing program to process the new descriptor;

[0033] Or use polling to periodically check descriptor status changes to find out whether there are new available descriptors.

[0034] On the other hand, the present invention also provides a chain descriptor management device for a VirtIO device of a DPU, comprising a processor, a memory, and a computer program / instruction stored in the memory, wherein the processor is used to execute the computer program / instruction, and when the computer program / instruction is executed, the device implements the steps of any one of the methods mentioned above.

[0035] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods mentioned above.

[0036] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of any one of the methods mentioned above when executed by a processor.

[0037] The beneficial effects of the present invention are at least:

[0038] The present invention provides a chain descriptor management method and device for a VirtIO device for a DPU, wherein a host receives a virtual input / output operation request issued by a virtual function; a descriptor is configured in a memory space pointed to by a descriptor ring queue buffer, the descriptor including the previous chain descriptor address, the next chain descriptor address, the descriptor cutoff bit and other basic information; a descriptor head address is configured in a memory space pointed to by an available data head ring queue buffer; a notification signal is sent to a VirtIO device through a base address register, and after receiving the VirtIO device to complete the corresponding virtual input / output operation, the control block returns to the completion ring queue buffer, and the released descriptor is recovered according to the information contained in the control block. The method provided by the present invention introduces a chain descriptor structure, supports concurrent processing of multiple descriptor chains, and realizes batch data transmission and concurrent processing. Furthermore, by reducing the number of interrupts and context switching, transmission delay is reduced, and the overall performance of the VirtIO device is significantly improved. Furthermore, the chain descriptor structure makes it simpler and more intuitive to manage multiple data buffers, reducing management complexity. Furthermore, the design of the present invention has good flexibility and scalability, and the length and number of descriptor chains can be adjusted according to actual needs to adapt to VirtIO device scenarios of different scales and needs.

[0039] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0040] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:

[0042] Figure 1 The figure is a schematic diagram of the steps of a chain descriptor management method for a VirtIO device according to an embodiment of the present invention.

[0043] Figure 2 The overall framework flow chart of the chain descriptor management method of VirtIO device in one embodiment of the present invention.

[0044] Figure 3The framework flow chart of the descriptor management method of the descriptor ring queue buffer module in one embodiment of the present invention.

[0045] Figure 4 Schematic diagram of the internal structure of a descriptor in one embodiment of the present invention.

[0046] Figure 5 Schematic diagram of a descriptor chain structure in one embodiment of the present invention.

[0047] Figure 6 The figure is a schematic diagram of the steps of a chain descriptor management method for a VirtIO device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0049] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0050] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0051] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0052] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0053] It should be emphasized here that the step marks mentioned below are not intended to limit the order of the steps, but it should be understood that the steps can be executed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be executed simultaneously.

[0054] In order to solve the problem that the descriptor management mechanism adopted by the existing VirtIO device only processes one descriptor per transmission, there are frequent context switching and interrupt triggering problems when processing complex data transmission tasks, resulting in low management efficiency and low performance, and is not suitable for application scenarios of large-scale data transmission, multi-channel transmission, and concurrent processing, the present invention proposes a chain descriptor management method for VirtIO devices for DPU, wherein DPU represents a data processing unit (Data Processing Unit), such as Figure 1 As shown, the method is executed on the host side, and the method includes the following steps S101 to S105:

[0055] Step S101: receiving a virtual input / output operation request including virtual input / output operation information sent by a virtual function.

[0056] Step S102: configure a descriptor in the memory space pointed to by the descriptor ring queue buffer, and construct a descriptor chain according to the previous chain descriptor address and the next chain descriptor address contained in the descriptor, wherein each descriptor contains virtual input / output operation information issued by the corresponding virtual function.

[0057] Step S103: configuring the descriptor header address in the memory space pointed to by the available data header circular queue buffer.

[0058] Step S104: Send a notification signal to the VirtIO device through the base address register, wherein the notification signal includes the configured descriptor information and the descriptor header address information.

[0059] Step S105: receiving a control block of the ring queue buffer and reclaiming descriptors according to the information contained in the control block, wherein the control block is a data structure of the ring queue buffer after the VirtIO device reads the corresponding descriptor from the descriptor chain and completes the corresponding virtual input / output operation according to the read descriptor.

[0060] like Figure 2 The figure shows the overall framework flow chart of the chain descriptor management method of the VirtIO device. The method uses the host as the execution end, sends a notification signal through the base address register to notify the VirtIO device to perform virtual input / output operations, implements the front-end configuration of the VirtIO device by configuring the data in the three VirtIO ring queue buffers in the memory space, and then obtains the control block from the completion ring queue buffer, further releases the VirtIO ring queue buffer resources, and realizes the recovery of virtual queues and descriptors. Specifically:

[0061] In step S101, a host (HOST) receives a virtual input / output (I / O) operation request issued by a virtual function (VF), wherein the information of the virtual input / output operation includes information such as a data buffer and an operation type.

[0062] In some embodiments, the virtual input / output operation request is forwarded to the host machine through the virtualization layer, where the virtualization layer is located above the physical host operating system and is responsible for managing and allocating physical resources to virtual machines, including processing resource requests such as the virtual machine's CPU, memory, storage, and I / O devices. The virtualization layer can be KVM, Xen, etc.

[0063] In step S102, if Figure 3 As shown, the host machine configures descriptors in the memory space pointed to by the descriptor ring queue buffer (desc_ring), wherein these descriptors contain relevant information of the virtual input / output operation in step S101, such as data buffer, operation type, etc.

[0064] The descriptor ring queue buffer desc_ring is used to store descriptors that need to be moved. The descriptors usually contain data stream movement information such as queue number, direct memory access (DMA) address and data length, and are used for data DMA operations to implement virtual input / output read and write operations.

[0065] In some embodiments, configuring the descriptor in the memory space pointed to by the descriptor ring queue buffer specifically includes the following steps:

[0066] Allocate descriptor space: The host allocates a block of memory, usually a ring buffer, as a descriptor ring queue buffer to store descriptors. These descriptors are structured blocks of data that convey the necessary information about input / output operations.

[0067] Fill descriptor content: The host fills the descriptor content one by one in the allocated descriptor ring queue buffer. Each descriptor contains the information required to perform an input / output operation, such as the address of the data buffer or the data descriptor itself, the operation type, read or write, data length and offset, etc.

[0068] Mark descriptor status: After filling the descriptor, the host may update the status field of the descriptor to indicate that the descriptor has been prepared by the host and is waiting for the virtual device to process.

[0069] In the present invention, a chain descriptor structure is introduced to realize batch data transmission and concurrent processing. Figure 4As shown, the descriptor of the present invention not only includes the data, address, queue number, length and data valid bit in the common descriptor structure, but also includes the previous in-chain descriptor address, the next in-chain descriptor address and the descriptor end bit.

[0070] In some embodiments, Figure 5 As shown in the figure, multiple descriptor chains of multiple queues are arranged in desc_ring. According to the notification signal, the address of the descriptor in the previous chain and the address of the descriptor in the next chain, multiple descriptors are linked to form a continuous descriptor chain. According to the notification signal and the number of chain descriptors, they are arranged crosswise one after another, but they are organically connected through the chain pointer, which is easy to manage.

[0071] In some embodiments, after constructing the descriptor chain, the method further includes:

[0072] Traverse the descriptor chain and access each descriptor in the descriptor chain one by one according to the address of the next descriptor in the chain contained in each descriptor. Get the information in the required descriptor and perform corresponding data processing. After processing each descriptor, update the descriptor chain structure.

[0073] In step S103, the host machine configures the descriptor header address in the memory space pointed to by the available data header ring queue buffer (avail_ring). The descriptor header usually contains metadata of the descriptor, such as the number of descriptors, the address of the next descriptor and other information.

[0074] The available data header ring queue buffer avail_ring is used to store the data headers that need to be moved. The data headers contain the queue number and the descriptor address. The descriptor address can be used to obtain the corresponding descriptor from desc_ring.

[0075] In step S104, the host sends a notification signal notify to the VirtIO device through the base address register (BAR). The base address register is a part of the VirtIO device and is used for communication and notification between the host and the VirtIO device. The notification signal includes the configured descriptor information. Through the notification signal, the host informs the device which descriptors are ready and can be used.

[0076] In step S105, the host machine receives the control block returned to the completion ring queue buffer (used_ring) after the VirtIO device completes the corresponding virtual input / output operation, and recycles the released descriptor according to the information contained in the control block.

[0077] The completion ring queue buffer used_ring is used to store the completion information that needs to be returned, including the completion queue number, the completion data header and the completion descriptor, as well as the descriptor header read pointer in the available data header ring queue buffer corresponding to this operation and the completion pointer in the completion ring queue buffer.

[0078] The present invention also provides a chain descriptor management method for a VirtIO device of a DPU, such as Figure 6 As shown, the method is executed on the VirtIO device side, and the method includes the following steps S201 to S204:

[0079] Step S201: receiving a notification signal sent by a host machine, wherein the notification signal includes new available descriptor information.

[0080] Step S202: Read the next available descriptor header address from the available data header circular queue buffer.

[0081] Step S203: Read the corresponding descriptor from the descriptor ring queue buffer according to the descriptor header address, wherein the descriptor includes virtual input / output operation information issued by the virtual function, and the descriptor is pre-constructed into a descriptor chain according to the previous in-chain descriptor address and the next in-chain descriptor address contained therein.

[0082] Step S204: after executing the corresponding virtual input / output operation according to the read descriptor, the corresponding control block is sent to the completion ring queue buffer.

[0083] Also refer to Figure 2 and Figure 3 ,This method uses the VirtIO device as the execution end. After receiving the notification signal, the VirtIO device reads the descriptor header address from the available data header ring queue buffer, and then reads the descriptor from the descriptor ring queue buffer according to the descriptor header address. After completing the corresponding virtual input / output operation, the control block carrying the descriptor header address is sent to the completion ring queue buffer, indicating that the corresponding descriptor is no longer in use and the host can release the related memory resources. Specifically:

[0084] In step S201, the VirtIO device receives a notification signal notify sent by the host HOST, wherein the notification signal includes new available descriptor information, and the VirtIO device knows that a new descriptor is available through the notification signal.

[0085] In some embodiments, step S101 is implemented through a communication protocol or an interrupt mechanism. For example, the VirtIO device receives an interrupt signal sent by the host to learn that there are new available descriptors, and executes a predetermined interrupt handler to process the new descriptors, or uses a polling method to periodically check the descriptor status changes to learn whether there are new available descriptors.

[0086] In step S202, the VirtIO device reads the next available descriptor header address from the available data header ring queue buffer (avail_ring). The configuration and use of the available data header ring queue buffer are consistent with the above.

[0087] In step S203, the VirtIO device reads the corresponding descriptor from the descriptor ring queue buffer (desc_ring) according to the descriptor header address obtained by reading. The configuration and use of the descriptor ring queue buffer are consistent with the above.

[0088] In some embodiments, the VirtIO device first reads the first part of the corresponding descriptor from the descriptor ring queue buffer; if there are subsequent descriptors that have not been read, a preset number of descriptors are read continuously to achieve parallel processing. Exemplarily, the preset number is 3.

[0089] In the present invention, a chain descriptor structure is introduced to realize batch data transmission and concurrent processing. Figure 4 As shown, the descriptor of the present invention not only includes the data, address, queue number, length and data valid bit in the common descriptor structure, but also includes the previous in-chain descriptor address, the next in-chain descriptor address and the descriptor end bit.

[0090] In step S204, after the VirtIO device performs the corresponding virtual input / output operation according to the virtual input / output operation information contained in the descriptor, it sends the corresponding control block (Control Packet Logic, CPL) to the completion ring queue buffer (used_ring). The control block contains the descriptor header address, and the host can identify which descriptors have been used by extracting the descriptor header address in the corresponding control block from the completion ring queue buffer.

[0091] The present invention also provides a chain descriptor management device for a VirtIO device of a DPU, which can be used as Figure 2 As shown, it includes a host machine HOST, a base address register BAR, a memory space (an available data header circular queue buffer, a descriptor circular queue buffer, a completion circular queue buffer) and a VirtIO device, which are used to execute the steps of a chain descriptor management method for a VirtIO device of a DPU.

[0092] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the chain descriptor management method for a VirtIO device of a DPU are implemented.

[0093] Corresponding to the above method, the present invention also provides a device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the method described above.

[0094] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0095] In summary, the present invention provides a chain descriptor management method and device for a VirtIO device for a DPU, wherein a host receives a virtual input / output operation request issued by a virtual function; a descriptor is configured in a memory space pointed to by a descriptor ring queue buffer, and the descriptor includes the previous chain descriptor address, the next chain descriptor address, the descriptor cutoff bit and other basic information; a descriptor head address is configured in a memory space pointed to by an available data head ring queue buffer; a notification signal is sent to a VirtIO device through a base address register, and after receiving the VirtIO device, the control block that returns to the completion ring queue buffer after completing the corresponding virtual input / output operation is returned, and the released descriptor is recovered according to the information contained in the control block. The method provided by the present invention introduces a chain descriptor structure, supports concurrent processing of multiple descriptor chains, and realizes batch data transmission and concurrent processing. Furthermore, by reducing the number of interrupts and context switching, transmission delay is reduced, and the overall performance of the VirtIO device is significantly improved. Furthermore, the chain descriptor structure makes it easier and more intuitive to manage multiple data buffers, reducing management complexity. Furthermore, the design of the present invention has good flexibility and scalability, and the length and number of descriptor chains can be adjusted according to actual needs to adapt to VirtIO device scenarios of different scales and needs.

[0096] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0097] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0098] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0099] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A chain descriptor management method for VirtIO devices of DPU, It is characterized in that The method comprises the following steps: The host machine receives a virtual input / output operation request including virtual input / output operation information sent by the virtual function; The descriptor is configured in the memory space pointed to by the descriptor ring queue buffer, and a descriptor chain is constructed according to the previous in-chain descriptor address and the next in-chain descriptor address contained in the descriptor; wherein each descriptor contains virtual input / output operation information issued by the corresponding virtual function; Configure the descriptor header address in the memory space pointed to by the available data header ring queue buffer; Send a notification signal to the VirtIO device through the base address register, wherein the notification signal includes the configured descriptor information and the descriptor header address information; A control block of a completed ring queue buffer is received, and descriptors are recovered according to information contained in the control block; wherein the control block is a data structure returned to the completed ring queue buffer after the VirtIO device reads corresponding descriptors from the descriptor chain and completes corresponding virtual input / output operations according to the read descriptors.

2. The method for managing chained descriptors of a VirtIO device for a DPU according to claim 1, It is characterized in that The method comprises: The virtual input / output operation request is forwarded to the host machine through the virtualization layer.

3. The method for managing chained descriptors of a VirtIO device for a DPU according to claim 1, It is characterized in that Configure the descriptor in the memory space pointed to by the descriptor ring queue buffer, including: The host machine allocates a ring buffer as the descriptor ring queue buffer for storing the descriptors; Filling the contents of the descriptors one by one in the descriptor ring queue buffer; After the filling is completed, the status field of the descriptor is updated.

4. The method for managing chained descriptors of a VirtIO device for a DPU according to claim 1, It is characterized in that In a multi-queue environment, the method further comprises: Linking a plurality of descriptors to form a continuous descriptor chain according to the notification signal, the previous in-chain descriptor address and the next in-chain descriptor address; Traversing the descriptor chain, accessing each descriptor in the descriptor chain one by one according to the next in-chain descriptor address contained in each descriptor; Obtain the information in the required descriptor and perform corresponding data processing; After each descriptor is processed, the descriptor chain structure is updated.

5. A chain descriptor management method for VirtIO devices of DPU, It is characterized in that The method comprises the following steps: The VirtIO device receives a notification signal sent by the host machine, where the notification signal includes new available descriptor information; Read the next available descriptor header address from the available data header ring queue buffer; According to the descriptor header address, read a corresponding descriptor from a descriptor ring queue buffer, wherein the descriptor includes virtual input / output operation information issued by a virtual function, and the descriptor is pre-constructed into a descriptor chain according to a previous in-chain descriptor address and a next in-chain descriptor address contained in the descriptor; After executing the corresponding virtual input / output operation according to the read descriptor, the corresponding control block is sent to the completion ring queue buffer.

6. The method for managing chained descriptors of a VirtIO device for a DPU according to claim 5, It is characterized in that According to the descriptor header address, a corresponding descriptor is read from the descriptor ring queue buffer, including: First, read the first part of the corresponding descriptor from the descriptor ring queue buffer; If there are descriptors that have not been read subsequently, a preset number of descriptors are read continuously to achieve parallel processing.

7. The method for managing chained descriptors of a VirtIO device for a DPU according to claim 5, It is characterized in that Receive notification signals sent by the host, including: receiving an interrupt signal sent by the host machine to learn that a new descriptor is available, and executing a predetermined interrupt processing program to process the new descriptor; Or use polling to periodically check descriptor status changes to find out whether there are new available descriptors.

8. A chain descriptor management device for a VirtIO device of a DPU, comprising a processor, a memory, and a computer program / instruction stored in the memory, It is characterized in that The processor is used to execute the computer program / instructions. When the computer program / instructions are executed, the device implements the steps of the method according to any one of claims 1 to 7.

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

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

Citation Information

Patent Citations

  • Data access method and device

    CN109923528A

  • Method, device and equipment for acquiring descriptor by back-end equipment and readable medium

    CN113609055A

  • Request response type real-time Ethernet load data transmission control system and method

    CN113766017A

  • Descriptor reading device and apparatus, method and integrated circuit

    CN115113977A

  • Descriptor management method

    CN116185891A