Remote direct memory access method and device in virtual scene

The method converts RDMA requests to Ethernet packets using virtualized RDMA devices and network cards, addressing performance instability and hot migration limitations in virtualized environments, enabling RDMA in cloud computing.

CN119621650APending Publication Date: 2025-03-14BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411699144.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In cloud computing and virtualized environments, the lack of RDMA device virtualization support prevents the utilization of RDMA technology, leading to performance instability due to queue pair resource competition and limited hot migration capabilities.

Method used

A method and device for virtualized environments that convert RDMA requests into Ethernet packets using virtualized RDMA devices and virtual network cards, enabling RDMA operations without relying on physical RDMA-capable network cards and avoiding queue pair resource limitations, thus supporting hot migration.

Benefits of technology

Enables RDMA functionality in virtualized environments by software implementation, stabilizing performance and supporting hot migration of virtual machines without resource competition issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621650A_ABST
    Figure CN119621650A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a remote direct memory access method and equipment in a virtualization scene. The method comprises the following steps: acquiring a remote direct memory access RDMA request of a first virtual machine to a second virtual machine memory; calling a first virtualization RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset drive in the first virtual machine, and converting the RDMA request into an Ethernet message; and transmitting the Ethernet message to a second virtual network card associated with a second virtualization RDMA device in an emulator of a host machine to which a second virtual machine belongs through a first virtual network card associated with the first virtualization RDMA device, so that the second virtualization RDMA device converts the Ethernet message into an RDMA request and transmits the RDMA request to a second virtual machine memory. According to the embodiment of the invention, the RDMA technology is realized in a virtual scene in a software mode, the method does not depend on whether a physical network card of a host machine has the RDMA capability or not, is not limited by resources by queues, and can support the live migration of the virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and in particular to a remote direct memory access method and device in a virtualization scenario. Background Art

[0002] In the data center field, Remote Direct Memory Access (RDMA) is a technology that bypasses the kernel of the remote host operating system to access data in its memory. Since it does not go through the operating system, it not only saves a lot of CPU resources, but also improves system throughput and reduces the system's network communication latency. It is particularly suitable for wide application in large-scale parallel computer clusters. RDMA over Converged Ethernet (RoCE) is a network protocol that allows the use of remote direct memory access (RDMA) on an Ethernet network. RoCE has two versions, RoCE v1 and RoCE v2. RoCE v1 is an Ethernet link layer protocol, so it allows any two hosts in the same Ethernet broadcast domain to communicate; RoCE v2 is a network layer protocol, so RoCE v2 data packets can be routed. Since data centers are generally built on Ethernet, the application of RDMA is more convenient and widespread.

[0003] However, in cloud computing and virtualization scenarios, RDMA is usually not available, and therefore the advantages of RDMA cannot be brought into play. Summary of the invention

[0004] The embodiments of the present disclosure provide a remote direct memory access method and device in a virtualization scenario to implement remote direct memory access in a virtualization scenario.

[0005] In a first aspect, an embodiment of the present disclosure provides a remote direct memory access method in a virtualization scenario, comprising:

[0006] Obtaining a remote direct memory access (RDMA) request from the first virtual machine to the memory of the second virtual machine;

[0007] Calling, through a first preset driver in the first virtual machine, a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs, and converting the RDMA request into an Ethernet message;

[0008] The Ethernet message is transmitted to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

[0009] In a second aspect, an embodiment of the present disclosure provides a remote direct memory access method in a virtualization scenario, including:

[0010] Receiving the Ethernet message transmitted by the first virtual network card through the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, wherein the first virtual network card is the virtual network card associated with the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs;

[0011] The Ethernet message is converted into an RDMA request through the second virtualized RDMA device and transmitted to the second virtual machine memory.

[0012] In a third aspect, an embodiment of the present disclosure provides a remote direct memory access device in a virtualization scenario, including:

[0013] An acquiring unit, configured to acquire a remote direct memory access (RDMA) request from the first virtual machine to the memory of the second virtual machine;

[0014] A virtualized RDMA unit, configured to call a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset driver in the first virtual machine, and convert the RDMA request into an Ethernet message;

[0015] A communication unit is used to transmit the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a remote direct memory access device in a virtualization scenario, including:

[0017] A communication unit, configured to receive an Ethernet message transmitted by the first virtual network card through a second virtual network card associated with a second virtualized RDMA device in an emulator of a host machine to which the second virtual machine belongs, wherein the first virtual network card is a virtual network card associated with a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs;

[0018] The virtualized RDMA unit is used to convert the Ethernet message into an RDMA request through the second virtualized RDMA device, and transmit the RDMA request to the second virtual machine memory.

[0019] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0020] The memory stores computer-executable instructions;

[0021] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the remote direct memory access method in a virtualization scenario as described in the first aspect and various possible designs of the first aspect, or the remote direct memory access method in a virtualization scenario as described in the second aspect and various possible designs of the second aspect.

[0022] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the remote direct memory access method in a virtualization scenario as described in the first aspect and various possible designs of the first aspect, or the remote direct memory access method in a virtualization scenario as described in the second aspect and various possible designs of the second aspect is implemented.

[0023] In a seventh aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the remote direct memory access method in a virtualization scenario as described in the first aspect and various possible designs of the first aspect, or the remote direct memory access method in a virtualization scenario as described in the second aspect and various possible designs of the second aspect.

[0024] The remote direct memory access method and device in a virtualized scenario provided by the embodiment of the present disclosure obtains a remote direct memory access RDMA request of a first virtual machine to the memory of a second virtual machine; through a first preset driver in the first virtual machine, calls a first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs, and converts the RDMA request into an Ethernet message; through a first virtual network card associated with the first virtualized RDMA device, transmits the Ethernet message to a second virtual network card associated with a second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine. In the embodiment of the present disclosure, RDMA technology is implemented by software in a virtualized scenario, which does not depend on whether the physical network card of the host machine has RDMA capability, and is not restricted by queues for resources, thus avoiding unstable performance caused by multiple network cards competing for queues for resources, and can support hot migration of virtual machines. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A schematic diagram of the architecture of a remote direct memory access method in a virtualization scenario provided by an embodiment of the present disclosure;

[0027] Figure 2 A flowchart of a remote direct memory access method in a virtualization scenario provided by an embodiment of the present disclosure;

[0028] Figure 3 A flowchart of a remote direct memory access method in a virtualization scenario provided by another embodiment of the present disclosure;

[0029] Figure 4 A structural block diagram of a remote direct memory access device in a virtualization scenario provided by an embodiment of the present disclosure;

[0030] Figure 5 A structural block diagram of a remote direct memory access device in a virtualization scenario provided by another embodiment of the present disclosure;

[0031] Figure 6 A schematic diagram of the hardware structure of a remote direct memory access device in a virtualization scenario provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0033] In the data center field, Remote Direct Memory Access (RDMA) is a technology that bypasses the kernel of the remote host operating system to access data in its memory. Since it does not go through the operating system, it not only saves a lot of CPU resources, but also improves system throughput and reduces the system's network communication latency. It is particularly suitable for wide application in large-scale parallel computer clusters. RDMA over Converged Ethernet (RoCE) is a network protocol that allows the use of remote direct memory access (RDMA) on an Ethernet network. RoCE has two versions: RoCE v1 and RoCE v2. RoCE v1 is an Ethernet link layer protocol, so it allows communication between any two hosts in the same Ethernet broadcast domain. RoCE v2 is a network layer protocol, so RoCEv2 data packets can be routed. Since data centers are generally built on Ethernet, the application of RDMA is more convenient and widespread.

[0034] For example, in the remote storage iSCSI (Internet Small Computer System Interface) scenario, using TCP (Transmission Control Protocol) can achieve about 60K IOPS performance; using RDMA acceleration, you can get about 200K IOPS performance;

[0035] In AI scenarios, using RDMA acceleration can enable GPU training to achieve better performance;

[0036] In storage system scenarios such as Redis and Valkey, using TCP can achieve a QPS performance of about 180K; using RDMA acceleration, more than 400K QPS performance can be achieved.

[0037] In cloud computing and virtualization scenarios, QEMU (Quick EMUlator, an open source virtualization software and hardware emulator) is the most widely used hypervisor, providing rich device simulations such as disks, network cards, sound cards, and graphics cards, allowing users to test, experience, and use various virtual devices. However, QEMU lacks virtualization support for RDMA devices, so users cannot use RDMA simulated devices in virtualization scenarios.

[0038] Since there is currently no virtualization support for RDMA devices in QEMU, that is, it cannot provide RDMA capabilities, hardware network cards that support RDMA can be used in some virtualization scenarios. After using the SR-IOV (Single Root I / O Virtualization, that is, a PF physical network card is virtualized into multiple VF virtual network cards for virtual machines to use) and VFIO (Virtual Function I / O) technologies, RDMA capabilities are provided by passing PCI (Peripheral Component Interconnect) through PF / VF. However, PCI pass-through technology limits the hot migration capabilities of virtual machines, and the number of queues cannot be arbitrarily defined for VF virtual network cards, and the performance is unstable due to competition between multiple VF network cards for hardware QP (Queue Pair) resources.

[0039] In order to solve the above technical problems, the disclosed embodiment provides a remote direct memory access method in a virtualized scenario, which obtains a remote direct memory access RDMA request of a first virtual machine to the memory of a second virtual machine; through a first preset driver in the first virtual machine, calls a first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs, and converts the RDMA request into an Ethernet message; through a first virtual network card associated with the first virtualized RDMA device, transmits the Ethernet message to a second virtual network card associated with a second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine. In this embodiment, RDMA technology is implemented by software in a virtualized scenario, which does not depend on whether the physical network card of the host machine has RDMA capability, and is not restricted by queues for resources, thus avoiding unstable performance caused by multiple network cards competing for queues for resources, and can support hot migration of virtual machines.

[0040] The architecture of the remote direct memory access method in the virtualization scenario of the embodiment of the present disclosure is as follows: Figure 1As shown, an RDMA application can be provided in the user state of the first virtual machine, and the user of the first virtual machine can trigger an RDMA command in the RDMA application; the kernel state of the first virtual machine includes at least IB (InfiniBand subsystem in the Linux kernel, a high-performance network architecture), a first preset driver, and a PCI bridge (PCI Bridge); the emulator QEMU of the host machine to which the first virtual machine belongs includes at least a first virtualized RDMA device, a second preset driver, an Ethernet-based RDMA program (RoCE) and a first virtual network card; and the virtual machine architecture and emulator architecture on the second virtual machine side are similar to those on the first virtual machine side. The RDMA request is transmitted from the user state process of the first virtual machine to the kernel state process of the first virtual machine. The kernel state process of the first virtual machine calls the first preset driver and calls the first virtualized RDMA device. The first virtualized RDMA device calls the second preset driver to call the Ethernet-based RDMA program through the second preset driver. The Ethernet-based RDMA program converts the RDMA request into an Ethernet message and transmits the Ethernet message to the first virtual network card through a preset user data message protocol channel between the first virtualized RDMA device and the first virtual network card. Then, the first virtualized network card can transmit the Ethernet message to the second virtual network card, which is a virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs. The second virtual network card transmits the Ethernet message to the second virtualized RDMA device through the preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card. The first virtualized RDMA device calls the fourth preset driver to call the Ethernet-based RDMA program through the fourth preset driver, convert the Ethernet message into an RDMA request, and directly transmit the RDMA request to the memory of the second virtual machine.

[0041] The first virtualized network card can transmit the Ethernet message to the second virtual network card by means of the Linux bridge in the kernel state of the host machine to which the first virtual machine belongs. The Linux bridge is connected to RXE through a UDP channel, wherein RXE is an Ethernet-based RDMA program (Soft-RoCE). In addition, the user state of the host machine to which the first virtual machine belongs may also include an RDMA application program for realizing the RDMA function.

[0042] The remote direct memory access method in a virtualization scenario disclosed in the present invention will be described in detail below in conjunction with specific embodiments.

[0043] refer to Figure 2 , Figure 2 A flow chart of a remote direct memory access method in a virtualization scenario provided by an embodiment of the present disclosure. The method of this embodiment can be applied to a first virtual machine. The remote direct memory access method in the virtualization scenario includes:

[0044] S201. Obtain a remote direct memory access (RDMA) request from a first virtual machine to a memory of a second virtual machine.

[0045] In this embodiment, when a user of the first virtual machine needs to access the memory of the second virtual machine through remote direct memory access (RDMA), a remote direct memory access (RDMA) request of the first virtual machine to the memory of the second virtual machine can be triggered, wherein accessing the memory of the second virtual machine through remote direct memory access (RDMA) includes but is not limited to reading data from the memory of the second virtual machine or writing data to the memory of the second virtual machine, and accordingly, the RDMA request includes but is not limited to an RDMA read or RDMA write request.

[0046] Optionally, the first virtual machine provides a user-oriented RDMA application, and the user can trigger an RDMA command in the RDMA application, for example:

[0047] . / ibv_rc_pingpong-g 1 192.168.122.1-r 1-n 10-e

[0048] The RDMA command may then be converted into an RDMA request from the first virtual machine to the memory of the second virtual machine.

[0049] Optionally, the RDMA command and RDMA request may include but are not limited to the request type (such as read, write, etc.), local memory address, remote memory address, data length, queue pair, etc.

[0050] It should be noted that, in this embodiment, the first virtual machine and the second virtual machine can be on different physical machines or on the same physical machine, as long as they can be interconnected through a virtual network card.

[0051] S202: Calling a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset driver in the first virtual machine, and converting the RDMA request into an Ethernet message.

[0052] In this embodiment, a virtualized RDMA device PVRDMA (Para-Virtualized RDMA, semi-virtualized RDMA) is pre-added in the emulator (Quick EMUlator, QEMU) of the host machine to which the first virtual machine belongs. For the convenience of description, it is recorded as the first virtualized RDMA device here. The first virtualized RDMA device is an RDMA device virtualized by the emulator, implemented by software, and is a device protocol defined by VMWARE (virtual machine software). It can communicate with the operating system inside the virtual machine through the PCI (Peripheral Component Interconnect) protocol and respond to user requests, including but not limited to querying RDMA devices (such as querying the capabilities of RDMA devices, etc.), querying associated virtual network cards, managing GIDs, managing queue pairs (QPs), managing notification queues (CQs), and other RDMA operations.

[0053] Accordingly, a first preset driver is pre-deployed in the first virtual machine, and the first preset driver is a driver of the first virtualized RDMA device. The first virtualized RDMA device can be called in the first virtual machine by calling the first preset driver. In this embodiment, after obtaining the RDMA request of the first virtual machine to the memory of the second virtual machine, the first virtualized RDMA device can be called through the first preset driver in the first virtual machine to process the RDMA request.

[0054] Optionally, after the first virtual machine obtains the RDMA request, the RDMA request can be input into the user state process of the first virtual machine. Since the first preset driver needs to be called in the kernel state, the RDMA request needs to be transmitted to the kernel state process of the first virtual machine, and then the first preset driver in the first virtual machine is called through the kernel state process of the first virtual machine, thereby calling the first virtualized RDMA device.

[0055] Furthermore, when the first virtualized RDMA device processes the RDMA request, specifically because the first virtualized RDMA device in this embodiment is not a physical device and does not use the queue pair of the physical RDMA device, that is, the sending queue and the receiving queue, the communication between virtual machines can adopt Ethernet communication, so the RDMA request can be converted into an Ethernet message, that is, the RoCE (RDMA over Converged Ethernet, RDMA based on Ethernet) technology is applied to realize the direct transmission of RDMA requests between different virtual machines on Ethernet without the intervention of the operating system. The specific conversion process can be implemented using the RoCE protocol.

[0056] Optionally, in this embodiment, the RoCE protocol can be implemented in software, that is, an Ethernet-based RDMA program (that is, a RoCE program, or also referred to as a virtualized RoCE device) can be pre-deployed in the emulator of the host machine to which the first virtual machine belongs, and used to execute the RoCE protocol to convert RDMA requests into Ethernet messages, and of course, Ethernet messages can also be converted into RDMA requests. The Ethernet-based RDMA program can be called through the first virtualized RDMA device to convert the RDMA request into an Ethernet message.

[0057] Furthermore, a second preset driver can be pre-deployed in the emulator of the host machine to which the first virtual machine belongs. The second preset driver is an abstract layer of the first virtual RDMA device and can be used as a driver for an Ethernet-based RDMA program. Of course, it can also support more other drivers and perform general device management in the future. In this embodiment, the first virtual RDMA device can call an Ethernet-based RDMA program through the second preset driver.

[0058] Optionally, when calling the Ethernet-based RDMA program to convert the RDMA request into an Ethernet message, the RDMA request can be converted into one or more Ethernet messages according to a preset data length threshold, wherein the data length of any Ethernet message does not exceed the preset data length threshold. For example, in the case of MTU 1024 (MTU is the maximum data length of a single data packet in network transmission), that is, the preset data length threshold is 1024 bytes, for an IB SEND 4K RDMA request, its data length is 4K, so after being processed by the Ethernet-based RDMA program, it can be converted into 4 Ethernet messages:

[0059] IB_OPCODE_SEND_FIRST type messages (0-1023 bytes), IB_OPCODE_SEND_MIDDLE type messages (1024-2047 bytes), IB_OPCODE_SEND_MIDDLE type messages (2048-3071 bytes) and IB_OPCODE_SEND_LAST (3072-4095 bytes) type messages.

[0060] S203. Transmit the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

[0061] In this embodiment, after obtaining the Ethernet message, the Ethernet message can be transmitted using Ethernet. In this embodiment, an associated virtual network card can be pre-configured for the first virtualized RDMA device, which is recorded as the first virtual network card, and the first virtual network card is also deployed in the emulator of the host machine to which the first virtual machine belongs; similarly, a second virtual network card associated with the second virtualized RDMA device is also deployed on the second virtual machine side, and the first virtual network card and the second virtual network card are interconnected, so that the Ethernet message can be transmitted to the second virtual network card through the first virtual network card.

[0062] Optionally, a preset UDP (User Datagram Protocol) channel between the first virtualized RDMA device and the first virtual network card can be preconfigured, and the first virtualized RDMA device can transmit the Ethernet message to the first virtual network card through the preset UDP channel, and the first virtual network card transmits the Ethernet message to the second virtual network card. Optionally, the preset UDP channel can directly connect the Ethernet-based RDMA program and the first virtual network card, and after the Ethernet-based RDMA program obtains the Ethernet message, it directly transmits it to the first virtual network card through the preset UDP channel.

[0063] Furthermore, on the side of the second virtual machine, the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs can receive the Ethernet message transmitted by the first virtual network card, and then the Ethernet message can be converted into an RDMA request through the second virtualized RDMA device and transmitted to the memory of the second virtual machine, thereby realizing remote direct memory access.

[0064] Optionally, an Ethernet-based RDMA program (RoCE program) may also be pre-deployed in the emulator of the host machine to which the second virtual machine belongs, and the Ethernet-based RDMA program may be called by the second virtualized RDMA device to convert the Ethernet message into an RDMA request. Optionally, if the RDMA request is converted into one or more Ethernet messages in the aforementioned process, the Ethernet-based RDMA program may restore the one or more Ethernet messages into an RDMA request.

[0065] Optionally, a preset UDP channel between the second virtualized RDMA device and the second virtual network card may be preconfigured, and the second virtual network card may transmit the Ethernet message to the second virtualized RDMA device through the preset UDP channel. Optionally, the preset UDP channel may directly connect the Ethernet-based RDMA program and the second virtual network card, and after the second virtual network card receives the Ethernet message, it may directly transmit it to the Ethernet-based RDMA program through the preset UDP channel, convert it into an RDMA request, and then directly transmit it to the second virtual machine memory.

[0066] The remote direct memory access method in a virtualized scenario provided in this embodiment obtains a remote direct memory access RDMA request from a first virtual machine to the memory of a second virtual machine; through a first preset driver in the first virtual machine, calls a first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs, and converts the RDMA request into an Ethernet message; through a first virtual network card associated with the first virtualized RDMA device, transmits the Ethernet message to a second virtual network card associated with a second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine. In this embodiment, RDMA technology is implemented in a virtualized scenario by software, which does not depend on whether the physical network card of the host machine has RDMA capabilities, and is not restricted by queues for resources, thus avoiding unstable performance caused by multiple network cards competing for queues for resources, and can support hot migration of virtual machines.

[0067] Specifically, since the virtualized RDMA device is implemented by software, and the software-implemented QP (queue pair) resources are stored in the memory, there is almost no limit on the number of QP resources, which is only limited by the memory size. Therefore, there is no competition for QP resources by multiple network cards, which also avoids the unstable performance caused by multiple network cards competing for queue pair resources. In addition, since the virtualized RDMA device is implemented by software, it is easy to control the virtualized RDMA device to suspend reading and writing (while the physical RDMA device is usually difficult to suspend reading and writing for hot migration), so that hot migration of virtual machines can be supported.

[0068] Based on any of the above embodiments, this embodiment provides a remote direct memory access method in a virtualization scenario, which may specifically include:

[0069] S301, the first virtual machine obtains an RDMA request for the memory of the second virtual machine;

[0070] S302, the first virtual machine inputs the RDMA request into the user state process of the first virtual machine, and then transmits it to the kernel state process of the first virtual machine, and calls the first preset driver in the first virtual machine through the kernel state process of the first virtual machine, and calls the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs;

[0071] S303, the first virtualized RDMA device calls the second preset driver to call the Ethernet-based RDMA program through the second preset driver;

[0072] S304, the Ethernet-based RDMA program converts the RDMA request into an Ethernet message;

[0073] S305, transmitting the Ethernet message to the first virtual network card through a preset user data message protocol channel between the first virtualized RDMA device and the first virtual network card, and the first virtual network card transmits the Ethernet message to the second virtual network card, where the second virtual network card is a virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs;

[0074] S306: The second virtual network card transmits the Ethernet message to the second virtualized RDMA device through the preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card, and the first virtualized RDMA device calls the fourth preset driver to call the Ethernet-based RDMA program through the fourth preset driver to convert the Ethernet message into an RDMA request;

[0075] The fourth preset driver is a driver in the emulator of the host machine to which the second virtual machine belongs, and is used to call the Ethernet-based RDMA program in the emulator of the host machine to which the second virtual machine belongs;

[0076] Of course, the preset user datagram protocol channel can also directly connect the Ethernet-based RDMA program in the emulator of the host machine to which the second virtual machine belongs and the second virtual network card, so that the second virtual network card can directly transmit the Ethernet message to the Ethernet-based RDMA program and convert the Ethernet message into an RDMA request;

[0077] S307: Transmit the RDMA request directly to the second virtual machine memory.

[0078] S308. Optionally, after converting the Ethernet message into an RDMA request, a notification message can be sent to a third preset driver in the second virtual machine through the second virtualized RDMA device, and the third preset driver transmits the notification message to the kernel state process of the second virtual machine, and then transmits it to the kernel state process of the second virtual machine, so as to display the notification message in the second virtual machine, which can be used to notify the user of the second virtual machine, wherein the third preset driver is a driver in the second virtual machine, and is used to call the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs.

[0079] refer to Figure 3 , Figure 3 A flow chart of a remote direct memory access method in a virtualization scenario provided by an embodiment of the present disclosure. The method of this embodiment can be applied to a second virtual machine. The remote direct memory access method in the virtualization scenario includes:

[0080] S401, receiving an Ethernet message transmitted by a first virtual network card through a second virtual network card associated with a second virtualized RDMA device in an emulator of a host machine to which a second virtual machine belongs, wherein the first virtual network card is a virtual network card associated with a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs;

[0081] S402: Convert the Ethernet message into an RDMA request through the second virtualized RDMA device, and transmit the request to the second virtual machine memory.

[0082] Based on any of the foregoing embodiments, converting the Ethernet message into an RDMA request by using the second virtualized RDMA device includes:

[0083] The Ethernet-based RDMA program is called through the second virtualized RDMA device to convert the Ethernet message into an RDMA request, wherein the Ethernet-based RDMA program is preset in the emulator of the host machine to which the second virtual machine belongs.

[0084] On the basis of any of the above embodiments, after converting the Ethernet message into an RDMA request through the second virtualized RDMA device, the method further includes:

[0085] A notification message is sent to a third preset driver in the second virtual machine through the second virtualized RDMA device, and the third preset driver transmits the notification message to the kernel state process of the second virtual machine, and then transmits it to the kernel state process of the second virtual machine to display the notification message in the second virtual machine.

[0086] Based on any of the foregoing embodiments, converting the Ethernet message into an RDMA request by using the second virtualized RDMA device includes:

[0087] The Ethernet message is transmitted to the second virtualized RDMA device through a preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card, and the Ethernet message is converted into an RDMA request through the second virtualized RDMA device.

[0088] The remote direct memory access method in the virtualization scenario provided in the above embodiment is a corresponding method on the second virtual machine side, and its principle and technical effects can be found in the above embodiment.

[0089] Corresponding to the remote direct memory access method in the virtualization scenario of the above embodiment, Figure 4 This is a block diagram of a remote direct memory access device in a virtualized scenario provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4The remote direct memory access device 500 in the virtualization scenario includes: an acquisition unit 501, a virtualized RDMA unit 502, and a communication unit 503.

[0090] The acquiring unit 501 is used to acquire a remote direct memory access RDMA request from the first virtual machine to the memory of the second virtual machine;

[0091] The virtualized RDMA unit 502 is used to call the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs through the first preset driver in the first virtual machine, and convert the RDMA request into an Ethernet message;

[0092] The communication unit 503 is used to transmit the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

[0093] In one or more embodiments of the present disclosure, when the virtualized RDMA unit 502 calls the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs and converts the RDMA request into an Ethernet message, it is used to:

[0094] The first virtualized RDMA device is used to call an Ethernet-based RDMA program to convert the RDMA request into an Ethernet message, wherein the Ethernet-based RDMA program is preset in an emulator of a host machine to which the first virtual machine belongs.

[0095] In one or more embodiments of the present disclosure, when the virtualized RDMA unit 502 calls the Ethernet-based RDMA program and converts the RDMA request into an Ethernet message, it is used to:

[0096] An Ethernet-based RDMA program is called to convert the RDMA request into one or more Ethernet messages according to a preset data length threshold, wherein the data length of any Ethernet message does not exceed the preset data length threshold.

[0097] In one or more embodiments of the present disclosure, when the virtualized RDMA unit 502 calls the Ethernet-based RDMA program through the first virtualized RDMA device, it is used to:

[0098] The second preset driver is called through the first virtualized RDMA device to call the Ethernet-based RDMA program through the second preset driver, wherein the second preset driver is preset in the emulator of the host machine to which the first virtual machine belongs.

[0099] In one or more embodiments of the present disclosure, when transmitting the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, the communication unit 503 is used to:

[0100] The Ethernet message is transmitted to the first virtual network card through a preset user data message protocol channel between the first virtualized RDMA device and the first virtual network card, and the first virtual network card transmits the Ethernet message to the second virtual network card.

[0101] In one or more embodiments of the present disclosure, when the virtualized RDMA unit 502 calls the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs through the first preset driver in the first virtual machine, it is used to:

[0102] The RDMA request is input into the user state process of the first virtual machine, and then transmitted to the kernel state process of the first virtual machine. The first preset driver in the first virtual machine is called through the kernel state process of the first virtual machine, and the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs is called.

[0103] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0104] Corresponding to the remote direct memory access method in the virtualization scenario in the above embodiment, Figure 5 A block diagram of a remote direct memory access device in a virtualization scenario provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 5 The remote direct memory access device 600 in the virtualization scenario includes: a communication unit 601 and a virtualized RDMA unit 602 .

[0105] Wherein, the communication unit 601 is used to receive the Ethernet message transmitted by the first virtual network card through the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, wherein the first virtual network card is the virtual network card associated with the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs;

[0106] The virtualized RDMA unit 602 is used to convert the Ethernet message into an RDMA request through the second virtualized RDMA device, and transmit the RDMA request to the second virtual machine memory.

[0107] In one or more embodiments of the present disclosure, when converting the Ethernet message into an RDMA request through the second virtualized RDMA device, the virtualized RDMA unit 602 is configured to:

[0108] The Ethernet-based RDMA program is called through the second virtualized RDMA device to convert the Ethernet message into an RDMA request, wherein the Ethernet-based RDMA program is preset in the emulator of the host machine to which the second virtual machine belongs.

[0109] In one or more embodiments of the present disclosure, after converting the Ethernet message into an RDMA request through the second virtualized RDMA device, the virtualized RDMA unit 602 is further configured to:

[0110] A notification message is sent to a third preset driver in the second virtual machine through the second virtualized RDMA device, and the third preset driver transmits the notification message to the kernel state process of the second virtual machine, and then transmits it to the kernel state process of the second virtual machine to display the notification message in the second virtual machine.

[0111] In one or more embodiments of the present disclosure, when converting the Ethernet message into an RDMA request through the second virtualized RDMA device, the communication unit 601 is used to:

[0112] The Ethernet message is transmitted to the second virtualized RDMA device through a preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card, and the Ethernet message is converted into an RDMA request through the second virtualized RDMA device.

[0113] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0114] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.

[0115] refer to Figure 6, which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure, and the electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0116] like Figure 6 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0117] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0118] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0119] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0120] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0121] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0122] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0125] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0126] In a first aspect, according to one or more embodiments of the present disclosure, a remote direct memory access method in a virtualization scenario is provided, comprising:

[0127] Obtaining a remote direct memory access (RDMA) request from the first virtual machine to the memory of the second virtual machine;

[0128] Calling, through a first preset driver in the first virtual machine, a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs, and converting the RDMA request into an Ethernet message;

[0129] The Ethernet message is transmitted to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

[0130] According to one or more embodiments of the present disclosure, calling the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs, and converting the RDMA request into an Ethernet message includes:

[0131] The first virtualized RDMA device is used to call an Ethernet-based RDMA program to convert the RDMA request into an Ethernet message, wherein the Ethernet-based RDMA program is preset in an emulator of a host machine to which the first virtual machine belongs.

[0132] According to one or more embodiments of the present disclosure, calling an Ethernet-based RDMA program and converting the RDMA request into an Ethernet message includes:

[0133] An Ethernet-based RDMA program is called to convert the RDMA request into one or more Ethernet messages according to a preset data length threshold, wherein the data length of any Ethernet message does not exceed the preset data length threshold.

[0134] According to one or more embodiments of the present disclosure, calling an Ethernet-based RDMA program through the first virtualized RDMA device includes:

[0135] The second preset driver is called through the first virtualized RDMA device to call the Ethernet-based RDMA program through the second preset driver, wherein the second preset driver is preset in the emulator of the host machine to which the first virtual machine belongs.

[0136] According to one or more embodiments of the present disclosure, the transmitting of the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs includes:

[0137] The Ethernet message is transmitted to the first virtual network card through a preset user data message protocol channel between the first virtualized RDMA device and the first virtual network card, and the first virtual network card transmits the Ethernet message to the second virtual network card.

[0138] According to one or more embodiments of the present disclosure, calling a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset driver in the first virtual machine includes:

[0139] The RDMA request is input into the user state process of the first virtual machine, and then transmitted to the kernel state process of the first virtual machine. The first preset driver in the first virtual machine is called through the kernel state process of the first virtual machine, and the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs is called.

[0140] In a second aspect, according to one or more embodiments of the present disclosure, a remote direct memory access method in a virtualization scenario is provided, comprising:

[0141] Receiving the Ethernet message transmitted by the first virtual network card through the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, wherein the first virtual network card is the virtual network card associated with the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs;

[0142] The Ethernet message is converted into an RDMA request through the second virtualized RDMA device and transmitted to the second virtual machine memory.

[0143] According to one or more embodiments of the present disclosure, converting the Ethernet message into an RDMA request by using the second virtualized RDMA device includes:

[0144] The Ethernet-based RDMA program is called through the second virtualized RDMA device to convert the Ethernet message into an RDMA request, wherein the Ethernet-based RDMA program is preset in the emulator of the host machine to which the second virtual machine belongs.

[0145] According to one or more embodiments of the present disclosure, after converting the Ethernet message into an RDMA request by the second virtualized RDMA device, the method further includes:

[0146] A notification message is sent to a third preset driver in the second virtual machine through the second virtualized RDMA device, and the third preset driver transmits the notification message to the kernel state process of the second virtual machine, and then transmits it to the kernel state process of the second virtual machine to display the notification message in the second virtual machine.

[0147] According to one or more embodiments of the present disclosure, converting the Ethernet message into an RDMA request by using the second virtualized RDMA device includes:

[0148] The Ethernet message is transmitted to the second virtualized RDMA device through a preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card, and the Ethernet message is converted into an RDMA request through the second virtualized RDMA device.

[0149] In a third aspect, according to one or more embodiments of the present disclosure, a remote direct memory access device in a virtualization scenario is provided, including:

[0150] An acquiring unit, configured to acquire a remote direct memory access (RDMA) request from the first virtual machine to the memory of the second virtual machine;

[0151] A virtualized RDMA unit, configured to call a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset driver in the first virtual machine, and convert the RDMA request into an Ethernet message;

[0152] A communication unit is used to transmit the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

[0153] According to one or more embodiments of the present disclosure, when the virtualized RDMA unit calls the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs and converts the RDMA request into an Ethernet message, it is used to:

[0154] The first virtualized RDMA device is used to call an Ethernet-based RDMA program to convert the RDMA request into an Ethernet message, wherein the Ethernet-based RDMA program is preset in an emulator of a host machine to which the first virtual machine belongs.

[0155] According to one or more embodiments of the present disclosure, when the virtualized RDMA unit calls an Ethernet-based RDMA program and converts the RDMA request into an Ethernet message, it is used to:

[0156] An Ethernet-based RDMA program is called to convert the RDMA request into one or more Ethernet messages according to a preset data length threshold, wherein the data length of any Ethernet message does not exceed the preset data length threshold.

[0157] According to one or more embodiments of the present disclosure, when the virtualized RDMA unit calls the Ethernet-based RDMA program through the first virtualized RDMA device, it is used to:

[0158] The second preset driver is called through the first virtualized RDMA device to call the Ethernet-based RDMA program through the second preset driver, wherein the second preset driver is preset in the emulator of the host machine to which the first virtual machine belongs.

[0159] According to one or more embodiments of the present disclosure, when the communication unit transmits the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, it is used to:

[0160] The Ethernet message is transmitted to the first virtual network card through a preset user data message protocol channel between the first virtualized RDMA device and the first virtual network card, and the first virtual network card transmits the Ethernet message to the second virtual network card.

[0161] According to one or more embodiments of the present disclosure, when the virtualized RDMA unit calls the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs through the first preset driver in the first virtual machine, it is used to:

[0162] The RDMA request is input into the user state process of the first virtual machine, and then transmitted to the kernel state process of the first virtual machine. The first preset driver in the first virtual machine is called through the kernel state process of the first virtual machine, and the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs is called.

[0163] In a fourth aspect, according to one or more embodiments of the present disclosure, a remote direct memory access device in a virtualization scenario is provided, including:

[0164] A communication unit, configured to receive an Ethernet message transmitted by the first virtual network card through a second virtual network card associated with a second virtualized RDMA device in an emulator of a host machine to which the second virtual machine belongs, wherein the first virtual network card is a virtual network card associated with a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs;

[0165] The virtualized RDMA unit is used to convert the Ethernet message into an RDMA request through the second virtualized RDMA device, and transmit the RDMA request to the second virtual machine memory.

[0166] According to one or more embodiments of the present disclosure, when the virtualized RDMA unit converts the Ethernet message into an RDMA request through the second virtualized RDMA device, it is configured to:

[0167] The Ethernet-based RDMA program is called through the second virtualized RDMA device to convert the Ethernet message into an RDMA request, wherein the Ethernet-based RDMA program is preset in the emulator of the host machine to which the second virtual machine belongs.

[0168] According to one or more embodiments of the present disclosure, after converting the Ethernet message into an RDMA request through the second virtualized RDMA device, the virtualized RDMA unit is further used to:

[0169] A notification message is sent to a third preset driver in the second virtual machine through the second virtualized RDMA device, and the third preset driver transmits the notification message to the kernel state process of the second virtual machine, and then transmits it to the kernel state process of the second virtual machine to display the notification message in the second virtual machine.

[0170] According to one or more embodiments of the present disclosure, when the communication unit converts the Ethernet message into an RDMA request through the second virtualized RDMA device, it is used to:

[0171] The Ethernet message is transmitted to the second virtualized RDMA device through a preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card, and the Ethernet message is converted into an RDMA request through the second virtualized RDMA device.

[0172] In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0173] The memory stores computer-executable instructions;

[0174] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the remote direct memory access method in a virtualization scenario as described in the first aspect and various possible designs of the first aspect, or the remote direct memory access method in a virtualization scenario as described in the second aspect and various possible designs of the second aspect.

[0175] In a sixth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the remote direct memory access method in a virtualization scenario as described in the first aspect and various possible designs of the first aspect, or the remote direct memory access method in a virtualization scenario as described in the second aspect and various possible designs of the second aspect is implemented.

[0176] In the seventh aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the remote direct memory access method in a virtualization scenario as described in the first aspect and various possible designs of the first aspect, or the remote direct memory access method in a virtualization scenario as described in the second aspect and various possible designs of the second aspect.

[0177] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0178] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0179] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A remote direct memory access method in a virtualization scenario, characterized in that: include: Obtaining a remote direct memory access (RDMA) request from the first virtual machine to the memory of the second virtual machine; Calling, through a first preset driver in the first virtual machine, a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs, and converting the RDMA request into an Ethernet message; The first preset driver is configured to drive an RDMA device in an emulator of a host machine; The Ethernet message is transmitted to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

2. The method according to claim 1, characterized in that: The calling of the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs, and converting the RDMA request into an Ethernet message, comprises: The first virtualized RDMA device is used to call an Ethernet-based RDMA program to convert the RDMA request into an Ethernet message, wherein the Ethernet-based RDMA program is preset in an emulator of a host machine to which the first virtual machine belongs.

3. The method according to claim 2, characterized in that The calling of the Ethernet-based RDMA program to convert the RDMA request into an Ethernet message includes: An Ethernet-based RDMA program is called to convert the RDMA request into one or more Ethernet messages according to a preset data length threshold, wherein the data length of any Ethernet message does not exceed the preset data length threshold.

4. The method according to claim 2, characterized in that: The calling of the Ethernet-based RDMA program through the first virtualized RDMA device includes: The second preset driver is called through the first virtualized RDMA device to call the Ethernet-based RDMA program through the second preset driver, wherein the second preset driver is preset in the emulator of the host machine to which the first virtual machine belongs.

5. The method according to any one of claims 1 to 4, characterized in that: The method of transmitting the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs includes: The Ethernet message is transmitted to the first virtual network card through a preset user data message protocol channel between the first virtualized RDMA device and the first virtual network card, and the first virtual network card transmits the Ethernet message to the second virtual network card.

6. The method according to any one of claims 1 to 4, characterized in that: The method of calling a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset driver in the first virtual machine includes: The RDMA request is input into the user state process of the first virtual machine, and then transmitted to the kernel state process of the first virtual machine. The first preset driver in the first virtual machine is called through the kernel state process of the first virtual machine, and the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs is called.

7. A remote direct memory access method in a virtualization scenario, characterized in that: include: Receiving the Ethernet message transmitted by the first virtual network card through the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs, wherein the first virtual network card is the virtual network card associated with the first virtualized RDMA device in the emulator of the host machine to which the first virtual machine belongs; The Ethernet message is converted into an RDMA request through the second virtualized RDMA device and transmitted to the second virtual machine memory.

8. The method according to claim 7, characterized in that The converting the Ethernet message into an RDMA request by the second virtualized RDMA device includes: The Ethernet-based RDMA program is called through the second virtualized RDMA device to convert the Ethernet message into an RDMA request, wherein the Ethernet-based RDMA program is preset in the emulator of the host machine to which the second virtual machine belongs.

9. The method according to claim 7 or 8, characterized in that: After converting the Ethernet message into an RDMA request through the second virtualized RDMA device, the method further includes: A notification message is sent to a third preset driver in the second virtual machine through the second virtualized RDMA device, and the third preset driver transmits the notification message to the kernel state process of the second virtual machine, and then transmits it to the kernel state process of the second virtual machine to display the notification message in the second virtual machine.

10. The method according to claim 7 or 8, characterized in that: The converting the Ethernet message into an RDMA request by the second virtualized RDMA device includes: The Ethernet message is transmitted to the second virtualized RDMA device through a preset user data message protocol channel between the second virtualized RDMA device and the second virtual network card, and the Ethernet message is converted into an RDMA request through the second virtualized RDMA device.

11. A remote direct memory access device in a virtualization scenario, characterized in that: include: An acquiring unit, configured to acquire a remote direct memory access (RDMA) request from the first virtual machine to the memory of the second virtual machine; A virtualized RDMA unit, configured to call a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs through a first preset driver in the first virtual machine, and convert the RDMA request into an Ethernet message; A communication unit is used to transmit the Ethernet message to the second virtual network card associated with the second virtualized RDMA device in the emulator of the host machine to which the second virtual machine belongs through the first virtual network card associated with the first virtualized RDMA device, so that the second virtualized RDMA device converts the Ethernet message into the RDMA request and transmits it to the memory of the second virtual machine.

12. A remote direct memory access device in a virtualization scenario, characterized in that: include: A communication unit, configured to receive an Ethernet message transmitted by the first virtual network card through a second virtual network card associated with a second virtualized RDMA device in an emulator of a host machine to which the second virtual machine belongs, wherein the first virtual network card is a virtual network card associated with a first virtualized RDMA device in an emulator of a host machine to which the first virtual machine belongs; The virtualized RDMA unit is used to convert the Ethernet message into an RDMA request through the second virtualized RDMA device, and transmit the RDMA request to the second virtual machine memory.

13. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 10 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • InfiniBand network card virtualization networking system

    CN120151202A

  • Soft-RoCE-based virtual network topology simulation method

    CN120474926A