WO2022089551A1 - Server system and data processing method - Google Patents

Server system and data processing method Download PDF

Info

Publication number
WO2022089551A1
WO2022089551A1 PCT/CN2021/127198 CN2021127198W WO2022089551A1 WO 2022089551 A1 WO2022089551 A1 WO 2022089551A1 CN 2021127198 W CN2021127198 W CN 2021127198W WO 2022089551 A1 WO2022089551 A1 WO 2022089551A1
Authority
WO
WIPO (PCT)
Prior art keywords
card
server
request
heterogeneous
driver
Prior art date
Application number
PCT/CN2021/127198
Other languages
French (fr)
Chinese (zh)
Inventor
于海鑫
邹倩
陈士阳
Original Assignee
华为云计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2022089551A1 publication Critical patent/WO2022089551A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload

Abstract

Disclosed in the present application are a server system and a data processing method. By means of expansion using an offload card connecting to a heterogeneous card, the offload card can take charge of processing a management and control plane of a second virtual device of the heterogeneous card, and thus, resources of servers can be saved and implementation of lightweight servers can be facilitated. The server system in the present application comprises a server, an offload card, and a heterogeneous card, the offload card is connected to the server, and the heterogeneous card is connected to the offload card. The offload card is used to record a mapping relationship between a first virtual device of the offload card and a second virtual device of the heterogeneous card, and achieve communication between a cloud instance of the server and the second virtual device of the heterogeneous card according to the mapping relationship; the first virtual device of the offload card is directly connected to the cloud instance of the server, and the second virtual device of the heterogeneous card is directly connected to the offload card.

Description

一种服务器系统以及数据处理的方法A server system and data processing method 技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种服务器系统以及数据处理的方法。The present application relates to the field of computer technology, and in particular, to a server system and a data processing method.
背景技术Background technique
在云场景中,服务器上部署有云实例,例如,虚拟机(virtual machine,VM)等等。为了提高输入/输出(input/output,I/O)业务的处理速度,可将服务器中的一些I/O业务卸载至低成本的设备中执行,从而释放服务器的中央处理器(central processing unit,CPU)资源。这些用于卸载I/O业务的设备通常被称为卸载卡,例如,专用集成电路(application specificintegrated circuit,ASIC)或现场可编程逻辑门阵列(field programmable gate array,FPGA)等等。In a cloud scenario, a cloud instance, such as a virtual machine (virtual machine, VM), is deployed on the server. In order to improve the processing speed of input/output (I/O) services, some I/O services in the server can be offloaded to low-cost devices for execution, thereby releasing the central processing unit (central processing unit) of the server. CPU) resources. These devices for offloading I/O services are usually called offload cards, for example, application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs) and so on.
在某些云场景的特殊需求下,需要引入额外的异构卡,例如,图形处理器(graphics processing unit,GPU)、网络接口控制器(network interface controller,NIC)等等。一般地,可将这些异构卡直接与服务器连接,使得卸载卡、异构卡分别占用服务器的不同高速串行计算机扩展总线标准(peripheral component interconnect express,PCIE)接口。Under the special requirements of some cloud scenarios, additional heterogeneous cards need to be introduced, such as graphics processing unit (GPU), network interface controller (NIC), and so on. Generally, these heterogeneous cards can be directly connected to the server, so that the offload card and the heterogeneous card respectively occupy different high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIE) interfaces of the server.
异构卡通常支持单根I/O虚拟化(single-root I/O virtualization,SRIOV)功能,故异构卡可创建出虚拟化设备。由于这些虚拟化设备直通至服务器的云实例,故异构卡可基于这些虚拟化设备,实现与服务器的云实例之间的通信。Heterogeneous cards usually support single-root I/O virtualization (SRIOV) function, so heterogeneous cards can create virtualized devices. Since these virtualized devices are directly connected to the cloud instance of the server, the heterogeneous card can communicate with the cloud instance of the server based on these virtualized devices.
上述方案中,服务器直接对接异构卡的扩展,会增加管理面的复杂度。因此,前端服务器会被占用很多资源,这些资源用于处理异构卡的虚拟化设备的管控面,不符合前端服务器的轻量化趋势。In the above solution, the expansion of the server directly connected to the heterogeneous card will increase the complexity of the management plane. Therefore, the front-end server will occupy a lot of resources. These resources are used to process the control plane of the virtualization device of the heterogeneous card, which does not conform to the lightweight trend of the front-end server.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种服务器系统以及数据处理的方法,通过卸载卡对接异构卡的扩展,故可由卸载卡负责处理异构卡的第二虚拟化设备的管控面,能够节省服务器的资源,有利于促进服务器的轻量化。Embodiments of the present application provide a server system and a data processing method. Through the expansion of the connection between the offload card and the heterogeneous card, the offload card can be responsible for processing the management and control plane of the second virtualization device of the heterogeneous card, which can save server resources. , which is conducive to promoting the lightweight of the server.
本申请实施例的第一方面提供了一种服务器系统,该服务器系统包括:服务器、卸载卡和异构卡,卸载卡与服务器连接,异构卡与卸载卡连接。其中,卸载卡用于记录卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备的映射关系,根据映射关系实现服务器的云实例与异构卡的第二虚拟化设备之间的通信,其中,卸载卡的第一虚拟化设备直通至服务器的云实例,异构卡的第二虚拟设备直通至卸载卡。A first aspect of the embodiments of the present application provides a server system, the server system includes: a server, an offload card and a heterogeneous card, the offload card is connected to the server, and the heterogeneous card is connected to the offload card. The offload card is used to record the mapping relationship between the first virtualization device of the offload card and the second virtualization device of the heterogeneous card, and realize the mapping relationship between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship. communication, wherein the first virtualized device of the offload card is directly connected to the cloud instance of the server, and the second virtual device of the heterogeneous card is directly connected to the offload card.
在上述服务器系统中,卸载卡连接于服务器和异构卡之间。由于卸载卡的第一虚拟化设备直通至服务器的云实例,故卸载卡可基于第一虚拟化设备,实现与服务器的云实例之间的通信。更进一步地,由于异构卡的第二虚拟设备直通至卸载卡,故异构 卡可基于第二虚拟设备,实现与卸载卡之间的通信。因此,卸载卡可作为异构卡和服务器的云实例之间的桥梁,实现异构卡和服务器的云实例之间的通信。由于卸载卡直接对接异构卡的扩展,故可由卸载卡负责处理异构卡的第二虚拟化设备的管控面,能够节省服务器的资源,有利于促进服务器的轻量化。In the above server system, the offload card is connected between the server and the heterogeneous card. Since the first virtualization device of the offload card is directly connected to the cloud instance of the server, the offload card can communicate with the cloud instance of the server based on the first virtualization device. Furthermore, since the second virtual device of the heterogeneous card is directly connected to the offload card, the heterogeneous card can communicate with the offload card based on the second virtual device. Therefore, the offload card can act as a bridge between the heterogeneous card and the cloud instance of the server, and realize the communication between the heterogeneous card and the cloud instance of the server. Since the offload card is directly connected to the expansion of the heterogeneous card, the offload card can be responsible for processing the management and control plane of the second virtualization device of the heterogeneous card, which can save the resources of the server and help to promote the lightweight of the server.
在一种可能的实现方式中,服务器包括第一接口,卸载卡包括第二接口和第三接口,异构卡包括第四接口;第一接口与第二接口连接,第三接口和第四接口连接。前述实现方式中,卸载卡本身具有两个接口,卸载卡通过其中一个接口与服务器连接,通过另一个接口与异构卡连接,从而令卸载卡连接在卸载卡与服务器之间。In a possible implementation manner, the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface; the first interface is connected to the second interface, and the third interface and the fourth interface connect. In the foregoing implementation manner, the unloading card itself has two interfaces, and the unloading card is connected to the server through one of the interfaces, and is connected to the heterogeneous card through the other interface, so that the unloading card is connected between the unloading card and the server.
在一种可能的实现方式中,服务器系统还包括扩展卡,服务器包括第一接口,扩展卡包括第二接口、第三接口、第四接口和第五接口,卸载卡包括第六接口和第七接口,异构卡包括第八接口;第一接口和第二接口连接,第二接口和第三接口连接,第四接口和第五接口连接,第六接口和第三接口连接,第七接口和第四接口连接,第八接口和第五接口连接。前述实现方式中,服务器、卸载卡和异构卡分别连接在同一张拓展卡的不同接口上,通过设置拓展卡的接口之间的连接关系,使得卸载卡连接在卸载卡与服务器之间。In a possible implementation manner, the server system further includes an expansion card, the server includes a first interface, the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface, and the uninstall card includes a sixth interface and a seventh interface Interface, the heterogeneous card includes an eighth interface; the first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, the sixth interface is connected to the third interface, and the seventh interface is connected to The fourth interface is connected, and the eighth interface is connected with the fifth interface. In the foregoing implementation manner, the server, the unloading card and the heterogeneous card are respectively connected to different interfaces of the same expansion card. By setting the connection relationship between the interfaces of the expansion card, the unloading card is connected between the unloading card and the server.
在一种可能的实现方式中,异构卡支持第一协议,卸载卡加载有与第一协议对应的第一驱动,服务器支持第二协议,且服务器的云实例加载有与第二协议对应的第二驱动;卸载卡具体用于通过第一驱动接收来自第二虚拟化设备的第一操作请求,第一操作请求符合第一协议的格式要求;卸载卡具体用于将第一操作请求转换为第二操作请求,第二操作请求符合第二协议的格式要求;卸载卡具体用于通过第一虚拟化设备将第二操作请求发送至第二驱动,以使得服务器的云实例基于第二操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。前述实现方式中,卸载卡通过第一驱动接收来自异构卡的第二虚拟化设备的第一操作请求后,可将第一操作请求转换为第二操作请求,第一操作请求符合第一协议的格式要求,第二操作请求符合第二协议的格式要求。然后,卸载卡通过第一虚拟化设备将第一操作请求发送至服务器的云实例的第二驱动,使得服务器的云实例基于第一操作请求完成相应的操作。因此,在本申请提供的服务器系统中,即使服务器的云实例仅加载第二驱动,也可以实现服务器的云实例与异构卡之间的通信。In a possible implementation manner, the heterogeneous card supports the first protocol, the unloading card is loaded with the first driver corresponding to the first protocol, the server supports the second protocol, and the cloud instance of the server is loaded with the first driver corresponding to the second protocol the second driver; the unloading card is specifically used to receive the first operation request from the second virtualization device through the first driver, and the first operation request conforms to the format requirements of the first protocol; the unloading card is specifically used to convert the first operation request into The second operation request, the second operation request conforms to the format requirements of the second protocol; the uninstall card is specifically used to send the second operation request to the second driver through the first virtualization device, so that the cloud instance of the server is based on the second operation request. , to read the target data from the memory of the server's cloud instance or write the target data to the memory of the server's cloud instance. In the foregoing implementation manner, after receiving the first operation request from the second virtualization device of the heterogeneous card through the first driver, the uninstall card can convert the first operation request into a second operation request, and the first operation request conforms to the first protocol. The format requirements of the second operation request conform to the format requirements of the second protocol. Then, the uninstall card sends the first operation request to the second driver of the cloud instance of the server through the first virtualization device, so that the cloud instance of the server completes the corresponding operation based on the first operation request. Therefore, in the server system provided by the present application, even if the cloud instance of the server only loads the second driver, the communication between the cloud instance of the server and the heterogeneous card can be realized.
在一种可能的实现方式中,卸载卡包括支持第二协议的引擎模块;卸载卡具体用于在确定异构卡启动后,加载第一驱动;卸载卡具体用于通过第一驱动获取异构卡的设备信息;卸载卡具体用于基于配置信息将引擎模块配置为第一虚拟化设备,配置信息为预置的信息;卸载卡具体用于通过第一虚拟化设备接收来自第二驱动的枚举结果,枚举结果用于指示服务器的云实例已检测到第一虚拟化设备;卸载卡具体用于基于设备信息和枚举结果构建异构卡的第二虚拟化设备与卸载卡的第一虚拟化设备之间的映射关系。前述实现方式中,卸载卡可基于配置信息将引擎模块配置为第一虚拟化设备,且可基于服务器的云实例的枚举结果和异构卡的设备信息,构建卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系。对于服务器一侧而言,引擎模块可呈现为第一虚拟化设备,故服务器的云实例可根据自身的需求对第一虚拟化设备发送信息。卸载卡通过第一虚拟化设备接收到该信息后,可基于卸载卡的第一虚拟化设备 与异构卡的第二虚拟化设备之间的映射关系,将该信息发送至异构卡的第二虚拟化设备,从而实现服务器的云实例与异构卡之间的通信。In a possible implementation manner, the unloading card includes an engine module supporting the second protocol; the unloading card is specifically used to load the first driver after it is determined that the heterogeneous card is started; the unloading card is specifically used to obtain the heterogeneous card through the first driver Device information of the card; the uninstall card is specifically used to configure the engine module as the first virtualization device based on the configuration information, and the configuration information is preset information; the uninstall card is specifically used to receive the data from the second driver through the first virtualization device The enumeration result is used to indicate that the cloud instance of the server has detected the first virtualization device; the uninstall card is specifically used to construct the second virtualization device of the heterogeneous card and the first virtual device of the uninstall card based on the device information and the enumeration result. The mapping relationship between virtualized devices. In the foregoing implementation manner, the offload card can configure the engine module as the first virtualized device based on the configuration information, and can construct the first virtualized device of the offload card based on the enumeration result of the cloud instance of the server and the device information of the heterogeneous card. The mapping relationship with the second virtualization device of the heterogeneous card. For the server side, the engine module can be presented as the first virtualized device, so the cloud instance of the server can send information to the first virtualized device according to its own requirements. After receiving the information through the first virtualization device, the uninstall card can send the information to the first virtualization device of the heterogeneous card based on the mapping relationship between the first virtualization device of the uninstall card and the second virtualization device of the heterogeneous card. Two virtualized devices, thereby realizing the communication between the cloud instance of the server and the heterogeneous card.
在一种可能的实现方式中,若第一操作请求为第一读请求,则卸载卡具体用于通过第一虚拟化设备,接收来自第二驱动的第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据;卸载卡具体用于将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求;卸载卡具体用于通过第一驱动将第一发送请求发送至第二虚拟化设备,以使得异构卡基于第一发送请求,通过第二虚拟化设备向卸载卡发送第一读请求。前述实现方式中,卸载卡通过第一虚拟化设备接收服务器的云实例的第二驱动的第二发送请求后,可将第二发送请求转换为第一发送请求,第二发送请求符合第二协议的格式要求,第一发送请求符合第一协议的格式要求。然后,卸载卡通过第一驱动将第一发送请求发送至异构卡的第二虚拟化设备,使得异构卡可基于第一发送请求确定服务器的云实例即将发送目标数据,从而发起第一读请求。In a possible implementation manner, if the first operation request is the first read request, the uninstall card is specifically configured to receive, through the first virtualization device, a second sending request from the second driver, and the second sending request conforms to the first The format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send the target data; the uninstall card is specifically used to convert the second sending request into a first sending request, and the first sending request conforms to the format of the first protocol. requirements; the offload card is specifically configured to send the first sending request to the second virtualization device through the first driver, so that the heterogeneous card sends the first read request to the offload card through the second virtual device based on the first sending request. In the foregoing implementation manner, after receiving the second sending request of the second driver of the cloud instance of the server through the first virtualization device, the uninstall card can convert the second sending request into the first sending request, and the second sending request conforms to the second protocol. The format requirements of the first sending request conform to the format requirements of the first protocol. Then, the offload card sends the first sending request to the second virtualization device of the heterogeneous card through the first driver, so that the heterogeneous card can determine based on the first sending request that the cloud instance of the server is about to send the target data, thereby initiating the first read ask.
在一种可能的实现方式中,卸载卡具体用于通过第一虚拟化设备接收来自第二驱动的目标数据;卸载卡具体用于通过第一驱动将目标数据发送至第二虚拟化设备。前述实现方式中,服务器的云实例在读取目标数据后,可通过自身的第二驱动将目标数据发送至卸载卡第一虚拟化设备。然后,卸载卡通过第一驱动将目标数据发送至异构卡的第二虚拟化设备,使得异构卡成功读取目标数据。In a possible implementation manner, the uninstall card is specifically configured to receive target data from the second driver through the first virtualization device; the uninstall card is specifically configured to send the target data to the second virtualization device through the first driver. In the foregoing implementation manner, after reading the target data, the cloud instance of the server can send the target data to the first virtualization device of the offload card through its own second driver. Then, the offload card sends the target data to the second virtualization device of the heterogeneous card through the first driver, so that the heterogeneous card successfully reads the target data.
在一种可能的实现方式中,若第一操作请求为第一读请求,第二操作请求为第二读请求,则卸载卡还用于通过第一虚拟化设备将第二读请求发送至第二驱动,以使得服务器的云实例基于第二读请求从服务器的云实例的内存中读取目标数据,并传输至第一虚拟化设备;卸载卡还用于将目标数据存储至卸载卡的内存中;卸载卡还用于通过第一驱动接收来自第二虚拟化设备的第一读请求;卸载卡还用于基于第一读请求从卸载卡的内存中读取目标数据;卸载卡还用于通过第一驱动将目标数据发送至第二虚拟化设备。前述实现方式中,卸载卡可通过第一虚拟化设备向服务器的云实例的第二驱动发送第二读请求,以从服务器的云实例获取目标数据,并存储在卸载卡的内存中。当卸载卡通过第一驱动接收到来自异构卡的第二虚拟化设备的第一读请求后,可从内存读取目标数据,并发送至异构卡的第二虚拟化设备中,使得异构卡成功读取目标数据。In a possible implementation manner, if the first operation request is a first read request and the second operation request is a second read request, the offload card is further configured to send the second read request to the second read request through the first virtualization device Second drive, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the second read request, and transmits it to the first virtualization device; the offload card is also used to store the target data in the memory of the offload card The unloading card is also used to receive the first read request from the second virtualization device through the first driver; the unloading card is also used to read target data from the memory of the unloading card based on the first read request; the unloading card is also used for The target data is sent to the second virtualization device through the first driver. In the foregoing implementation manner, the offload card can send a second read request to the second driver of the cloud instance of the server through the first virtualization device, so as to obtain target data from the cloud instance of the server and store it in the memory of the offload card. When the offload card receives the first read request from the second virtualization device of the heterogeneous card through the first driver, the target data can be read from the memory and sent to the second virtualization device of the heterogeneous card, so that the The composition card successfully reads the target data.
在一种可能的实现方式中,若第一操作请求为第一写请求,则卸载卡具体用于通过第一驱动接收来自第二虚拟化设备的第一接收请求,第一接收请求符合第一协议的格式要求,且第一接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;卸载卡具体用于将第一接收请求转换为第二接收请求,第二接收请求符合第二协议的格式要求;卸载卡具体用于通过第一虚拟化设备将第二接收请求发送至第二驱动;卸载卡具体用于通过第一虚拟化设备接收来自第二驱动的可用内存空间信息;卸载卡具体用于通过第一驱动将可用内存空间信息发送至第二虚拟化设备,以使得异构卡基于可用内存空间信息,通过第二虚拟化设备向卸载卡发送第一写请求。前述实现方式中,卸载卡通过第一驱动接收来自异构卡的第二虚拟化设备的第一接收请求后,可将第一接收请求转换为第二接收请求,第一接收请求符合第一协议的格式要求,第 二接收请求符合第二协议的格式要求。然后,卸载卡通过第一虚拟化设备将第一接收请求发送至服务器的云实例的第二驱动,使得服务器的云实例通过第二驱动向卸载卡发送可用内存空间信息。接着,卸载卡通过第一驱动将可用内存空间信息发送至异构卡的第二虚拟化设备,使得异构卡基于可用内存空间信息确定要向云实例的哪个内存位置写入目标数据,从而发起第一写请求。In a possible implementation manner, if the first operation request is the first write request, the uninstall card is specifically configured to receive the first receive request from the second virtualization device through the first driver, and the first receive request conforms to the first receive request. The format requirements of the protocol, and the first receiving request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; the unloading card is specifically used to convert the first receiving request into a second receiving request, and the second receiving request conforms to Format requirements of the second protocol; the uninstall card is specifically used to send the second reception request to the second driver through the first virtualization device; the uninstall card is specifically used to receive the available memory space information from the second driver through the first virtualization device The unloading card is specifically configured to send the available memory space information to the second virtualization device through the first driver, so that the heterogeneous card sends the first write request to the unloading card through the second virtualization device based on the available memory space information. In the foregoing implementation manner, after receiving the first reception request from the second virtualization device of the heterogeneous card through the first driver, the uninstall card can convert the first reception request into a second reception request, and the first reception request conforms to the first protocol. The format requirement of the second receiving request conforms to the format requirement of the second protocol. Then, the offload card sends the first reception request to the second driver of the cloud instance of the server through the first virtualization device, so that the cloud instance of the server sends available memory space information to the offload card through the second driver. Next, the offload card sends the available memory space information to the second virtualization device of the heterogeneous card through the first driver, so that the heterogeneous card determines which memory location of the cloud instance to write the target data to based on the available memory space information, thereby initiating a First write request.
本申请实施例的第二方面提供了一种数据处理的方法,其特征在于,方法应用于服务器系统,服务器系统包括:服务器、卸载卡和异构卡,卸载卡与服务器连接,异构卡与卸载卡连接;卸载卡记录卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备的映射关系;卸载卡根据映射关系实现服务器的云实例与异构卡的第二虚拟化设备之间的通信,其中,卸载卡的第一虚拟化设备直通至服务器的云实例,异构卡的第二虚拟设备直通至卸载卡。A second aspect of the embodiments of the present application provides a data processing method, which is characterized in that the method is applied to a server system, and the server system includes: a server, an offload card, and a heterogeneous card, the offload card is connected to the server, and the heterogeneous card is connected to the server. The uninstall card is connected; the uninstall card records the mapping relationship between the first virtualization device of the uninstall card and the second virtualization device of the heterogeneous card; the uninstall card realizes the relationship between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship. Communication between the two, wherein the first virtual device of the offload card is directly connected to the cloud instance of the server, and the second virtual device of the heterogeneous card is directly connected to the offload card.
在上述方法中,卸载卡连接于服务器和异构卡之间。由于卸载卡的第一虚拟化设备直通至服务器的云实例,故卸载卡可基于第一虚拟化设备,实现与服务器的云实例之间的通信。更进一步地,由于异构卡的第二虚拟设备直通至卸载卡,故异构卡可基于第二虚拟设备,实现与卸载卡之间的通信。因此,卸载卡可作为异构卡和服务器的云实例之间的桥梁,实现异构卡和服务器的云实例之间的通信。由于卸载卡直接对接异构卡的扩展,故可由卸载卡负责处理异构卡的第二虚拟化设备的管控面,能够节省服务器的资源,有利于促进服务器的轻量化。In the above method, the offload card is connected between the server and the heterogeneous card. Since the first virtualization device of the offload card is directly connected to the cloud instance of the server, the offload card can communicate with the cloud instance of the server based on the first virtualization device. Furthermore, since the second virtual device of the heterogeneous card is directly connected to the offload card, the heterogeneous card can communicate with the offload card based on the second virtual device. Therefore, the offload card can act as a bridge between the heterogeneous card and the cloud instance of the server, and realize the communication between the heterogeneous card and the cloud instance of the server. Since the offload card is directly connected to the expansion of the heterogeneous card, the offload card can be responsible for processing the management and control plane of the second virtualization device of the heterogeneous card, which can save the resources of the server and help to promote the lightweight of the server.
在一种可能的实现方式中,异构卡支持第一协议,卸载卡加载有与第一协议对应的第一驱动,服务器支持第二协议,且服务器的云实例加载有与第二协议对应的第二驱动,卸载卡根据映射关系实现服务器的云实例与异构卡的第二虚拟化设备之间的通信包括:卸载卡通过第一驱动接收来自第二虚拟化设备的第一操作请求,第一操作请求符合第一协议的格式要求;卸载卡将第一操作请求转换为第二操作请求,第二操作请求符合第二协议的格式要求;卸载卡通过第一虚拟化设备将第二操作请求发送至第二驱动,以使得服务器的云实例基于第二操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。In a possible implementation manner, the heterogeneous card supports the first protocol, the unloading card is loaded with the first driver corresponding to the first protocol, the server supports the second protocol, and the cloud instance of the server is loaded with the first driver corresponding to the second protocol For the second driver, the offload card implements the communication between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship, including: the offload card receives the first operation request from the second virtualization device through the first driver, An operation request meets the format requirements of the first protocol; the uninstall card converts the first operation request into a second operation request, and the second operation request meets the format requirements of the second protocol; the uninstall card converts the second operation request through the first virtualization device The data is sent to the second driver, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server or writes the target data to the memory of the cloud instance of the server based on the second operation request.
在一种可能的实现方式中,卸载卡包括支持第二协议的引擎模块,卸载卡记录卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备的映射关系包括:卸载卡在确定异构卡启动后,加载第一驱动;卸载卡通过第一驱动获取异构卡的设备信息;卸载卡基于配置信息将引擎模块配置为第一虚拟化设备,配置信息为预置的信息;卸载卡通过第一虚拟化设备接收来自第二驱动的枚举结果,枚举结果用于指示服务器的云实例已检测到第一虚拟化设备;卸载卡基于设备信息和枚举结果构建异构卡的第二虚拟化设备与卸载卡的第一虚拟化设备之间的映射关系。In a possible implementation manner, the offload card includes an engine module supporting the second protocol, and the offload card recording the mapping relationship between the first virtualization device of the offload card and the second virtualization device of the heterogeneous card includes: After the heterogeneous card is started, the first driver is loaded; the unloading card obtains the device information of the heterogeneous card through the first driver; the unloading card configures the engine module as the first virtualized device based on the configuration information, and the configuration information is preset information; The card receives the enumeration result from the second driver through the first virtualization device, and the enumeration result is used to indicate that the cloud instance of the server has detected the first virtualization device; the uninstall card constructs the heterogeneous card based on the device information and the enumeration result. The mapping relationship between the second virtualization device and the first virtualization device of the offload card.
在一种可能的实现方式中,若第一操作请求为第一读请求,则卸载卡通过第一驱动接收来自第二虚拟化设备的第一操作请求之前,该方法还包括:卸载卡通过第一虚拟化设备,接收来自第二驱动的第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据;卸载卡将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求;卸载卡通过第一驱动将第一发送请求发送至第二虚拟化设备,以使得异构卡基于第一发送请求,通过 第二虚拟化设备向卸载卡发送第一读请求。In a possible implementation manner, if the first operation request is the first read request, before the uninstall card receives the first operation request from the second virtualization device through the first driver, the method further includes: A virtualized device that receives a second sending request from the second driver, the second sending request conforms to the format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send target data; The sending request is converted into a first sending request, and the first sending request conforms to the format requirements of the first protocol; the offload card sends the first sending request to the second virtualization device through the first driver, so that the heterogeneous card is based on the first sending request , sending a first read request to the offload card through the second virtualization device.
在一种可能的实现方式中,该方法还包括:卸载卡通过第一虚拟化设备接收来自第二驱动的目标数据;卸载卡通过第一驱动将目标数据发送至第二虚拟化设备。In a possible implementation manner, the method further includes: the offload card receives the target data from the second driver through the first virtualization device; the offload card sends the target data to the second virtualization device through the first driver.
在一种可能的实现方式中,若第一操作请求为第一读请求,第二操作请求为第二读请求,则卸载卡通过第一驱动将第一发送请求发送至第二虚拟化设备之后,该方法还包括:卸载卡通过第一虚拟化设备将第二读请求发送至第二驱动,以使得服务器的云实例基于第二读请求从服务器的云实例的内存中读取目标数据,并传输至第一虚拟化设备;卸载卡将目标数据存储至卸载卡的内存中;卸载卡通过第一驱动接收来自第二虚拟化设备的第一读请求;卸载卡基于第一读请求从卸载卡的内存中读取目标数据;卸载卡通过第一驱动将目标数据发送至第二虚拟化设备。In a possible implementation manner, if the first operation request is a first read request and the second operation request is a second read request, after the uninstall card sends the first sending request to the second virtualization device through the first driver , the method further includes: the unloading card sends the second read request to the second driver through the first virtualization device, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the second read request, and transmission to the first virtualization device; the unloading card stores the target data in the memory of the unloading card; the unloading card receives the first read request from the second virtualization device through the first driver; The target data is read in the memory of the device; the unloading card sends the target data to the second virtualization device through the first driver.
在一种可能的实现方式中,若第一操作请求为第一写请求,则卸载卡通过第一驱动接收来自第二虚拟化设备的第一操作请求之前,该方法还包括:卸载卡通过第一驱动接收来自第二虚拟化设备的第一接收请求,第一接收请求符合第一协议的格式要求,且第一接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;卸载卡将第一接收请求转换为第二接收请求,第二接收请求符合第二协议的格式要求;卸载卡通过第一虚拟化设备将第二接收请求发送至第二驱动;卸载卡通过第一虚拟化设备接收来自第二驱动的可用内存空间信息;卸载卡通过第一驱动将可用内存空间信息发送至第二虚拟化设备,以使得异构卡基于可用内存空间信息,通过第二虚拟化设备向卸载卡发送第一写请求。In a possible implementation manner, if the first operation request is the first write request, before the uninstall card receives the first operation request from the second virtualization device through the first driver, the method further includes: a driver receives a first reception request from the second virtualization device, the first reception request conforms to the format requirements of the first protocol, and the first reception request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; The unloading card converts the first receiving request into a second receiving request, and the second receiving request conforms to the format requirements of the second protocol; the unloading card sends the second receiving request to the second driver through the first virtualization device; the unloading card passes the first The virtualization device receives the available memory space information from the second driver; the uninstall card sends the available memory space information to the second virtualization device through the first driver, so that the heterogeneous card passes the second virtualization device based on the available memory space information. Send the first write request to the offload card.
本申请实施例的第三方面提供了一种服务器系统,该服务器系统包括:服务器、卸载卡和异构卡,异构卡支持第一协议,服务器和卸载卡均加载有与第一协议对应的第一驱动,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接;卸载卡用于通过卸载卡的第一驱动接收来自异构卡的操作请求,操作请求符合第一协议的格式要求;卸载卡还用于通过直通通道将操作请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。A third aspect of the embodiments of the present application provides a server system, the server system includes: a server, an unloading card, and a heterogeneous card, the heterogeneous card supports a first protocol, and both the server and the unloading card are loaded with the corresponding first protocol. The first driver, one end of the uninstall card is connected to the server, and the other end of the uninstall card is connected to the heterogeneous card; the uninstall card is used to receive the operation request from the heterogeneous card through the first driver of the uninstall card, and the operation request conforms to the first protocol. Format requirements; the offload card is also used to send the operation request to the first driver of the cloud instance of the server through the pass-through channel, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server or sends the target data to the cloud instance of the server based on the operation request. The memory of the cloud instance writes the target data.
在一种可能的实现方式中,服务器包括第一接口,卸载卡包括第二接口和第三接口,异构卡包括第四接口;第一接口与第二接口连接,第三接口和第四接口连接。In a possible implementation manner, the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface; the first interface is connected to the second interface, and the third interface and the fourth interface connect.
在一种可能的实现方式中,服务器系统还包括扩展卡,服务器包括第一接口,扩展卡包括第二接口、第三接口、第四接口和第五接口,卸载卡包括第六接口和第七接口,异构卡包括第八接口;第一接口和第二接口连接,第二接口和第三接口连接,第四接口和第五接口连接,第六接口和第三接口连接,第七接口和第四接口连接,第八接口和第五接口连接。In a possible implementation manner, the server system further includes an expansion card, the server includes a first interface, the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface, and the uninstall card includes a sixth interface and a seventh interface Interface, the heterogeneous card includes an eighth interface; the first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, the sixth interface is connected to the third interface, and the seventh interface is connected to The fourth interface is connected, and the eighth interface is connected with the fifth interface.
在一种可能的实现方式中,卸载卡还用于通过直通通道接收来自服务器的云实例的第一驱动的初始化请求;卸载卡还用于通过卸载卡的第一驱动将初始化请求发送至异构卡,以使得异构卡基于初始化请求,向卸载卡的第一驱动发送异构卡的设备信息;卸载卡还用于在通过卸载卡的第一驱动接收异构卡的设备信息后,通过直通通道将异构卡的设备信息发送至服务器的云实例的第一驱动。In a possible implementation manner, the uninstall card is further configured to receive an initialization request from the first driver of the cloud instance of the server through the pass-through channel; the uninstall card is further configured to send the initialization request to the heterogeneous through the first driver of the uninstall card card, so that the heterogeneous card sends the device information of the heterogeneous card to the first driver of the uninstall card based on the initialization request; the uninstall card is also used for receiving the device information of the heterogeneous card through the first driver of the uninstall card, The channel sends the device information of the heterogeneous card to the first driver of the cloud instance of the server.
在一种可能的实现方式中,若操作请求为读请求,则卸载卡还用于通过直通通道, 接收来自服务器的云实例的第一驱动的发送请求,发送请求符合第一协议的格式要求,且发送请求用于指示服务器的云实例即将发送目标数据;卸载卡还用于通过卸载卡的第一驱动将发送请求发送至异构卡,以使得异构卡基于发送请求,向卸载卡的第一驱动发送读请求。In a possible implementation manner, if the operation request is a read request, the offload card is further configured to receive a sending request from the first driver of the cloud instance of the server through the pass-through channel, and the sending request conforms to the format requirements of the first protocol, And the sending request is used to indicate that the cloud instance of the server is about to send the target data; the unloading card is also used to send the sending request to the heterogeneous card through the first driver of the unloading card, so that the heterogeneous card can send the data to the first driver of the unloading card based on the sending request. A driver sends a read request.
在一种可能的实现方式中,卸载卡还用于通过直通通道接收来自服务器的云实例的第一驱动的目标数据;卸载卡还用于通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, the offload card is further configured to receive target data from the first driver of the cloud instance of the server through the pass-through channel; the offload card is further configured to send the target data to the heterogeneous through the first driver of the offload card Card.
在一种可能的实现方式中,卸载卡还用于通过直通通道将读请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于卸载卡的读请求从服务器的云实例的内存中读取目标数据,并通过服务器的云实例的第一驱动将目标数据发送至直通通道;卸载卡还用于将目标数据存储至卸载卡的内存中;卸载卡还用于通过卸载卡的第一驱动接收来自异构卡的读请求;卸载卡还用于基于异构卡的读请求从卸载卡的内存中读取目标数据;卸载卡还用于通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, the offload card is further configured to send a read request to the first driver of the cloud instance of the server through the pass-through channel, so that the cloud instance of the server can delete the memory of the cloud instance of the server from the memory of the cloud instance of the server based on the read request of the offload card. Read the target data in the server, and send the target data to the pass-through channel through the first driver of the cloud instance of the server; the offload card is also used to store the target data in the memory of the offload card; the offload card is also used to pass the first drive of the offload card. A driver receives the read request from the heterogeneous card; the unloading card is also used to read target data from the memory of the unloading card based on the read request of the heterogeneous card; the unloading card is also used to send the target data through the first driver of the unloading card to heterogeneous cards.
在一种可能的实现方式中,若操作请求为写请求,则卸载卡还用于通过卸载卡的第一驱动接收来自异构卡的接收请求,接收请求符合第一协议的格式要求,且接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;卸载卡还用于通过直通通道将接收请求发送至服务器的云实例的第一驱动;卸载卡还用于通过直通通道接收来自服务器的云实例的第一驱动的可用内存空间信息;卸载卡还用于通过卸载卡的第一驱动将可用内存空间信息发送至异构卡,以使得异构卡基于可用内存空间信息,向卸载卡发送写请求。In a possible implementation manner, if the operation request is a write request, the unloading card is further configured to receive the receiving request from the heterogeneous card through the first driver of the unloading card, the receiving request conforms to the format requirements of the first protocol, and the receiving The request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; the offload card is also used to send the receiving request to the first driver of the cloud instance of the server through the pass-through channel; the offload card is also used to receive through the pass-through channel Available memory space information from the first driver of the cloud instance of the server; the uninstall card is also used to send the available memory space information to the heterogeneous card through the first driver of the uninstall card, so that the heterogeneous card can send the information to the heterogeneous card based on the available memory space information. The offload card sends a write request.
本申请实施例的第四方面提供了一种数据处理的方法,该方法应用于服务器系统,所述服务器系统包括服务器、卸载卡和异构卡,异构卡支持第一协议,服务器和卸载卡均加载有与第一协议对应的第一驱动,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接;该方法包括:卸载卡通过卸载卡的第一驱动接收来自异构卡的操作请求,操作请求符合第一协议的格式要求;卸载卡将操作请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。A fourth aspect of the embodiments of the present application provides a data processing method. The method is applied to a server system. The server system includes a server, an offload card, and a heterogeneous card. The heterogeneous card supports a first protocol. The server and the offload card Both are loaded with a first driver corresponding to the first protocol, one end of the unloading card is connected to the server, and the other end of the unloading card is connected to the heterogeneous card; the method includes: the unloading card receives data from the heterogeneous card through the first driver of the unloading card The operation request conforms to the format requirements of the first protocol; the uninstall card sends the operation request to the first driver of the cloud instance of the server, so that the cloud instance of the server reads the target from the memory of the cloud instance of the server based on the operation request data or write target data to the memory of the server's cloud instance.
在一种可能的实现方式中,该方法还包括:卸载卡通过直通通道接收来自服务器的云实例的第一驱动的初始化请求;卸载卡通过卸载卡的第一驱动将初始化请求发送至异构卡,以使得异构卡基于初始化请求,向卸载卡的第一驱动发送异构卡的设备信息;卸载卡在通过卸载卡的第一驱动接收异构卡的设备信息后,通过直通通道将异构卡的设备信息发送至服务器的云实例的第一驱动。In a possible implementation manner, the method further includes: the uninstall card receives an initialization request from the first driver of the cloud instance of the server through the pass-through channel; the uninstall card sends the initialization request to the heterogeneous card through the first driver of the uninstall card , so that the heterogeneous card sends the device information of the heterogeneous card to the first driver of the unloading card based on the initialization request; after the unloading card receives the device information of the heterogeneous card through the first driver of the unloading card, the The device information of the card is sent to the first driver of the cloud instance of the server.
在一种可能的实现方式中,若操作请求为读请求,则卸载卡通过卸载卡的第一驱动接收来自异构卡的操作请求之前,该方法还包括:卸载卡通过直通通道,接收来自服务器的云实例的第一驱动的发送请求,发送请求符合第一协议的格式要求,且发送请求用于指示服务器的云实例即将发送目标数据;卸载卡通过卸载卡的第一驱动将发送请求发送至异构卡,以使得异构卡基于发送请求,向卸载卡的第一驱动发送读请求。In a possible implementation manner, if the operation request is a read request, before the unloading card receives the operation request from the heterogeneous card through the first driver of the unloading card, the method further includes: the unloading card receives the operation request from the server through the pass-through channel The sending request of the first driver of the cloud instance, the sending request conforms to the format requirements of the first protocol, and the sending request is used to indicate that the cloud instance of the server is about to send the target data; the unloading card sends the sending request to the first driver of the unloading card to Heterogeneous card, so that based on the sending request, the heterogeneous card sends a read request to the first driver that unloads the card.
在一种可能的实现方式中,该方法还包括:卸载卡通过直通通道接收来自服务器的云实例的第一驱动的目标数据;卸载卡通过卸载卡的第一驱动将目标数据发送至异 构卡。In a possible implementation manner, the method further includes: the offload card receives target data from the first driver of the cloud instance of the server through the pass-through channel; the offload card sends the target data to the heterogeneous card through the first driver of the offload card .
在一种可能的实现方式中,卸载卡通过卸载卡的第一驱动将发送请求发送至异构卡之后,该方法还包括:卸载卡通过直通通道将读请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于卸载卡的读请求从服务器的云实例的内存中读取目标数据,并通过服务器的云实例的第一驱动将目标数据发送至直通通道;卸载卡将目标数据存储至卸载卡的内存中;卸载卡通过卸载卡的第一驱动接收来自异构卡的读请求;卸载卡基于异构卡的读请求从卸载卡的内存中读取目标数据;卸载卡通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, after the offload card sends the sending request to the heterogeneous card through the first driver of the offload card, the method further includes: the offload card sends the read request to the first driver of the cloud instance of the server through the pass-through channel drive, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the read request of the offload card, and sends the target data to the pass-through channel through the first driver of the cloud instance of the server; the offload card sends the target data Stored in the memory of the unloading card; the unloading card receives the read request from the heterogeneous card through the first driver of the unloading card; the unloading card reads the target data from the memory of the unloading card based on the read request of the heterogeneous card; The first driver of the card sends the target data to the heterogeneous card.
在一种可能的实现方式中,若操作请求为写请求,则卸载卡通过卸载卡的第一驱动接收来自异构卡的操作请求之前,该方法还包括:卸载卡通过卸载卡的第一驱动接收来自异构卡的接收请求,接收请求符合第一协议的格式要求,且接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;卸载卡通过直通通道将接收请求发送至服务器的云实例的第一驱动;卸载卡通过直通通道接收来自服务器的云实例的第一驱动的可用内存空间信息;卸载卡通过卸载卡的第一驱动将可用内存空间信息发送至异构卡,以使得异构卡基于可用内存空间信息,向卸载卡发送写请求。In a possible implementation manner, if the operation request is a write request, before the unloading card receives the operation request from the heterogeneous card through the first driver of the unloading card, the method further includes: the unloading card passes the first driver of the unloading card Receive the receiving request from the heterogeneous card, the receiving request conforms to the format requirements of the first protocol, and the receiving request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; the unloading card sends the receiving request to the The first driver of the cloud instance of the server; the unloading card receives the available memory space information from the first driver of the cloud instance of the server through the pass-through channel; the unloading card sends the available memory space information to the heterogeneous card through the first driver of the unloading card, So that the heterogeneous card sends a write request to the offload card based on the available memory space information.
本申请实施例的第五方面提供了一种卸载卡,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接,卸载卡包括:记录模块,用于记录卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备的映射关系,通信模块,用于根据映射关系实现服务器的云实例与异构卡的第二虚拟化设备之间的通信,其中,卸载卡的第一虚拟化设备直通至服务器的云实例,异构卡的第二虚拟设备直通至卸载卡。A fifth aspect of the embodiments of the present application provides an unloading card. One end of the unloading card is connected to the server, and the other end of the unloading card is connected to the heterogeneous card. The unloading card includes: a recording module for recording the first virtual data of the unloading card. The mapping relationship between the virtualization device and the second virtualization device of the heterogeneous card, the communication module is used to realize the communication between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship, wherein, the first virtualization device of the uninstall card is A virtualized device is directly connected to the cloud instance of the server, and the second virtualized device of the heterogeneous card is directly connected to the offload card.
在一种可能的实现方式中,服务器包括第一接口,卸载卡包括第二接口和第三接口,异构卡包括第四接口;第一接口与第二接口连接,第三接口和第四接口连接。In a possible implementation manner, the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface; the first interface is connected to the second interface, and the third interface and the fourth interface connect.
在一种可能的实现方式中,服务器系统还包括扩展卡,服务器包括第一接口,扩展卡包括第二接口、第三接口、第四接口和第五接口,卸载卡包括第六接口和第七接口,异构卡包括第八接口;第一接口和第二接口连接,第二接口和第三接口连接,第四接口和第五接口连接,第六接口和第三接口连接,第七接口和第四接口连接,第八接口和第五接口连接。In a possible implementation manner, the server system further includes an expansion card, the server includes a first interface, the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface, and the uninstall card includes a sixth interface and a seventh interface Interface, the heterogeneous card includes an eighth interface; the first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, the sixth interface is connected to the third interface, and the seventh interface is connected to The fourth interface is connected, and the eighth interface is connected with the fifth interface.
在一种可能的实现方式中,异构卡支持第一协议,卸载卡加载有与第一协议对应的第一驱动,服务器支持第二协议,且服务器的云实例加载有与第二协议对应的第二驱动;通信模块具体用于:通过第一驱动接收来自第二虚拟化设备的第一操作请求,第一操作请求符合第一协议的格式要求;将第一操作请求转换为第二操作请求,第二操作请求符合第二协议的格式要求;通过第一虚拟化设备将第二操作请求发送至第二驱动,以使得服务器的云实例基于第二操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。In a possible implementation manner, the heterogeneous card supports the first protocol, the unloading card is loaded with the first driver corresponding to the first protocol, the server supports the second protocol, and the cloud instance of the server is loaded with the first driver corresponding to the second protocol The second driver; the communication module is specifically configured to: receive the first operation request from the second virtualization device through the first driver, and the first operation request conforms to the format requirements of the first protocol; convert the first operation request into the second operation request , the second operation request conforms to the format requirements of the second protocol; the second operation request is sent to the second driver through the first virtualization device, so that the cloud instance of the server reads from the memory of the cloud instance of the server based on the second operation request Fetch or write target data to the server's cloud instance's memory.
在一种可能的实现方式中,卸载卡包括支持第二协议的引擎模块;记录模块具体用于:在确定异构卡启动后,加载第一驱动;通过第一驱动获取异构卡的设备信息;基于配置信息将引擎模块配置为第一虚拟化设备,配置信息为预置的信息;通过第一虚拟化设备接收来自第二驱动的枚举结果,枚举结果用于指示服务器的云实例已检测到第一虚拟化设备;基于设备信息和枚举结果构建异构卡的第二虚拟化设备与卸载卡 的第一虚拟化设备之间的映射关系。In a possible implementation manner, the unloading card includes an engine module supporting the second protocol; the recording module is specifically configured to: load the first driver after determining that the heterogeneous card is started; obtain device information of the heterogeneous card through the first driver ; Configure the engine module as the first virtualized device based on the configuration information, and the configuration information is preset information; Receive the enumeration result from the second driver through the first virtualized device, and the enumeration result is used to indicate that the cloud instance of the server has been The first virtualized device is detected; the mapping relationship between the second virtualized device of the heterogeneous card and the first virtualized device of the unloaded card is constructed based on the device information and the enumeration result.
在一种可能的实现方式中,若第一操作请求为第一读请求,则通信模块具体用于:通过第一虚拟化设备,接收来自第二驱动的第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据;将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求;通过第一驱动将第一发送请求发送至第二虚拟化设备,以使得异构卡基于第一发送请求,通过第二虚拟化设备向卸载卡发送第一读请求。In a possible implementation manner, if the first operation request is a first read request, the communication module is specifically configured to: receive a second sending request from the second driver through the first virtualization device, and the second sending request conforms to the The format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send the target data; the second sending request is converted into a first sending request, and the first sending request conforms to the format requirements of the first protocol; A driver sends the first sending request to the second virtualization device, so that the heterogeneous card sends the first read request to the offload card through the second virtualization device based on the first sending request.
在一种可能的实现方式中,通信模块具体用于:通过第一虚拟化设备接收来自第二驱动的目标数据;通过第一驱动将目标数据发送至第二虚拟化设备。In a possible implementation manner, the communication module is specifically configured to: receive the target data from the second driver through the first virtualization device; and send the target data to the second virtualization device through the first driver.
在一种可能的实现方式中,若第一操作请求为第一读请求,第二操作请求为第二读请求,则通信模块还用于:通过第一虚拟化设备将第二读请求发送至第二驱动,以使得服务器的云实例基于第二读请求从服务器的云实例的内存中读取目标数据,并传输至第一虚拟化设备;将目标数据存储至卸载卡的内存中;通过第一驱动接收来自第二虚拟化设备的第一读请求;基于第一读请求从卸载卡的内存中读取目标数据;通过第一驱动将目标数据发送至第二虚拟化设备。In a possible implementation manner, if the first operation request is a first read request and the second operation request is a second read request, the communication module is further configured to: send the second read request to the the second drive, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the second read request, and transmits it to the first virtualization device; stores the target data in the memory of the offload card; A driver receives the first read request from the second virtualization device; reads target data from the memory of the offload card based on the first read request; sends the target data to the second virtualization device through the first driver.
在一种可能的实现方式中,若第一操作请求为第一写请求,则通信模块具体用于:通过第一驱动接收来自第二虚拟化设备的第一接收请求,第一接收请求符合第一协议的格式要求,且第一接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;将第一接收请求转换为第二接收请求,第二接收请求符合第二协议的格式要求;通过第一虚拟化设备将第二接收请求发送至第二驱动;通过第一虚拟化设备接收来自第二驱动的可用内存空间信息;通过第一驱动将可用内存空间信息发送至第二虚拟化设备,以使得异构卡基于可用内存空间信息,通过第二虚拟化设备向卸载卡发送第一写请求。In a possible implementation manner, if the first operation request is the first write request, the communication module is specifically configured to: receive the first receive request from the second virtualization device through the first driver, and the first receive request conforms to the first receive request. The format requirements of a protocol, and the first receiving request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; the first receiving request is converted into a second receiving request, and the second receiving request conforms to the second protocol. Format requirements; send the second receiving request to the second driver through the first virtualization device; receive the available memory space information from the second driver through the first virtualization device; send the available memory space information to the second driver through the first driver The device is virtualized, so that the heterogeneous card sends a first write request to the offload card through the second virtualization device based on the available memory space information.
本申请实施例的第六方面提供了一种卸载卡,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接,异构卡支持第一协议,服务器和卸载卡均加载有与第一协议对应的第一驱动;卸载卡包括:通信模块,用于通过卸载卡的第一驱动接收来自异构卡的操作请求,操作请求符合第一协议的格式要求;通信模块还用于通过直通通道将操作请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。A sixth aspect of the embodiments of the present application provides an unloading card, one end of the unloading card is connected to a server, the other end of the unloading card is connected to a heterogeneous card, the heterogeneous card supports a first protocol, and both the server and the unloading card are loaded with The first driver corresponding to the first protocol; the unloading card includes: a communication module for receiving an operation request from the heterogeneous card through the first driver of the unloading card, and the operation request conforms to the format requirements of the first protocol; the communication module is also used to pass The through channel sends the operation request to the first driver of the cloud instance of the server, so that the cloud instance of the server reads target data from the memory of the cloud instance of the server or writes the target data to the memory of the cloud instance of the server based on the operation request.
在一种可能的实现方式中,服务器包括第一接口,卸载卡包括第二接口和第三接口,异构卡包括第四接口;第一接口与第二接口连接,第三接口和第四接口连接。In a possible implementation manner, the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface; the first interface is connected to the second interface, and the third interface and the fourth interface connect.
在一种可能的实现方式中,服务器系统还包括扩展卡,服务器包括第一接口,扩展卡包括第二接口、第三接口、第四接口和第五接口,卸载卡包括第六接口和第七接口,异构卡包括第八接口;第一接口和第二接口连接,第二接口和第三接口连接,第四接口和第五接口连接,第六接口和第三接口连接,第七接口和第四接口连接,第八接口和第五接口连接。In a possible implementation manner, the server system further includes an expansion card, the server includes a first interface, the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface, and the uninstall card includes a sixth interface and a seventh interface Interface, the heterogeneous card includes an eighth interface; the first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, the sixth interface is connected to the third interface, and the seventh interface is connected to The fourth interface is connected, and the eighth interface is connected with the fifth interface.
在一种可能的实现方式中,通信模块还用于:通过直通通道接收来自服务器的云实例的第一驱动的初始化请求;通过卸载卡的第一驱动将初始化请求发送至异构卡,以使得异构卡基于初始化请求,向卸载卡的第一驱动发送异构卡的设备信息;在通过 卸载卡的第一驱动接收异构卡的设备信息后,通过直通通道将异构卡的设备信息发送至服务器的云实例的第一驱动。In a possible implementation manner, the communication module is further configured to: receive an initialization request from the first driver of the cloud instance of the server through the pass-through channel; send the initialization request to the heterogeneous card by uninstalling the first driver of the card, so that the Based on the initialization request, the heterogeneous card sends the device information of the heterogeneous card to the first driver of the uninstall card; after receiving the device information of the heterogeneous card through the first driver of the uninstall card, the device information of the heterogeneous card is sent through the pass-through channel The first driver to the cloud instance of the server.
在一种可能的实现方式中,若操作请求为读请求,则通信模块还用于:通过直通通道,接收来自服务器的云实例的第一驱动的发送请求,发送请求符合第一协议的格式要求,且发送请求用于指示服务器的云实例即将发送目标数据;通过卸载卡的第一驱动将发送请求发送至异构卡,以使得异构卡基于发送请求,向卸载卡的第一驱动发送读请求。In a possible implementation manner, if the operation request is a read request, the communication module is further configured to: receive a sending request from the first driver of the cloud instance of the server through the pass-through channel, and the sending request conforms to the format requirements of the first protocol , and the sending request is used to indicate that the cloud instance of the server is about to send the target data; the sending request is sent to the heterogeneous card through the first driver of the uninstall card, so that the heterogeneous card sends the read data to the first driver of the uninstall card based on the sending request ask.
在一种可能的实现方式中,通信模块还用于:通过直通通道接收来自服务器的云实例的第一驱动的目标数据;通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, the communication module is further configured to: receive target data from the first driver of the cloud instance of the server through the pass-through channel; and send the target data to the heterogeneous card through the first driver of the offload card.
在一种可能的实现方式中,通信模块还用于:通过直通通道将读请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于卸载卡的读请求从服务器的云实例的内存中读取目标数据,并通过服务器的云实例的第一驱动将目标数据发送至直通通道;将目标数据存储至卸载卡的内存中;通过卸载卡的第一驱动接收来自异构卡的读请求;基于异构卡的读请求从卸载卡的内存中读取目标数据;通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, the communication module is further configured to: send the read request to the first driver of the cloud instance of the server through the pass-through channel, so that the cloud instance of the server can download the read request from the cloud instance of the server based on the read request of the unloaded card from the cloud instance of the server. Read the target data in the memory, and send the target data to the pass-through channel through the first driver of the cloud instance of the server; store the target data in the memory of the offload card; receive the read data from the heterogeneous card through the first driver of the offload card request; read target data from the memory of the offload card based on a read request of the heterogeneous card; send the target data to the heterogeneous card through the first driver of the offload card.
在一种可能的实现方式中,若操作请求为写请求,则通信模块还用于:通过卸载卡的第一驱动接收来自异构卡的接收请求,接收请求符合第一协议的格式要求,且接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;通过直通通道将接收请求发送至服务器的云实例的第一驱动;通过直通通道接收来自服务器的云实例的第一驱动的可用内存空间信息;通过卸载卡的第一驱动将可用内存空间信息发送至异构卡,以使得异构卡基于可用内存空间信息,向卸载卡发送写请求。In a possible implementation manner, if the operation request is a write request, the communication module is further configured to: receive a reception request from the heterogeneous card through the first driver of the unload card, the reception request conforms to the format requirements of the first protocol, and The receiving request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; send the receiving request to the first driver of the cloud instance of the server through the pass-through channel; receive the first driver of the cloud instance from the server through the pass-through channel The available memory space information; the available memory space information is sent to the heterogeneous card through the first driver of the unloading card, so that the heterogeneous card sends a write request to the unloading card based on the available memory space information.
本申请实施例的第七方面提供了一种卸载卡,该卸载卡包括:处理器和存储器;存储器用于存储计算机执行指令;处理器用于执行存储器所存储的计算机执行指令,以使卸载卡实现如第二方面、第二方面中任一种可能的实现方式、第四方面或第四方面中任一种可能的实现方式所述的方法。A seventh aspect of the embodiments of the present application provides an uninstall card, the uninstall card includes: a processor and a memory; the memory is used for storing computer-executed instructions; the processor is used for executing computer-executed instructions stored in the memory, so that the uninstall card realizes The method as described in the second aspect, any possible implementation manner of the second aspect, the fourth aspect, or any one possible implementation manner of the fourth aspect.
本申请实施例的第八方面提供了一种计算机存储介质,包括计算机可读指令,当所述计算机可读指令被执行时,实现如第二方面、第二方面中任一种可能的实现方式、第四方面或第四方面中任一种可能的实现方式所述的方法。An eighth aspect of the embodiments of the present application provides a computer storage medium, including computer-readable instructions, when the computer-readable instructions are executed, any one of the possible implementation manners of the second aspect and the second aspect is implemented. , the fourth aspect, or the method described in any possible implementation manner of the fourth aspect.
本申请实施例的第九方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第二方面、第二方面中任一种可能的实现方式、第四方面或第四方面中任一种可能的实现方式所述的方法。A ninth aspect of the embodiments of the present application provides a computer program product including instructions, which, when run on a computer, enables the computer to execute any of the second aspect, any possible implementation manner of the second aspect, and the fourth aspect or the method described in any possible implementation manner of the fourth aspect.
本申请实施例提供的服务器系统中,卸载卡连接于服务器和异构卡之间。由于卸载卡的第一虚拟化设备直通至服务器的云实例,故卸载卡可基于第一虚拟化设备,实现与服务器的云实例之间的通信。更进一步地,由于异构卡的第二虚拟设备直通至卸载卡,故异构卡可基于第二虚拟设备,实现与卸载卡之间的通信。因此,卸载卡可作为异构卡和服务器的云实例之间的桥梁,实现异构卡和服务器的云实例之间的通信。由于卸载卡直接对接异构卡的扩展,故可由卸载卡负责处理异构卡的第二虚拟化设备的管控面,能够节省服务器的资源,有利于促进服务器的轻量化。In the server system provided by the embodiment of the present application, the offload card is connected between the server and the heterogeneous card. Since the first virtualization device of the offload card is directly connected to the cloud instance of the server, the offload card can communicate with the cloud instance of the server based on the first virtualization device. Furthermore, since the second virtual device of the heterogeneous card is directly connected to the offload card, the heterogeneous card can communicate with the offload card based on the second virtual device. Therefore, the offload card can act as a bridge between the heterogeneous card and the cloud instance of the server, and realize the communication between the heterogeneous card and the cloud instance of the server. Since the offload card is directly connected to the expansion of the heterogeneous card, the offload card can be responsible for processing the management and control plane of the second virtualization device of the heterogeneous card, which can save the resources of the server and help to promote the lightweight of the server.
附图说明Description of drawings
图1为本申请实施例提供的服务器系统的一个结构示意图;FIG. 1 is a schematic structural diagram of a server system provided by an embodiment of the present application;
图2为本申请实施例提供的服务器系统的另一结构示意图;2 is another schematic structural diagram of a server system provided by an embodiment of the present application;
图3为本申请实施例提供的服务器系统的另一结构示意图;3 is another schematic structural diagram of a server system provided by an embodiment of the present application;
图4为本申请实施例提供的卸载卡的一个结构示意图;4 is a schematic structural diagram of an unloading card provided by an embodiment of the present application;
图5为本申请实施例提供的卸载卡的另一结构示意图;FIG. 5 is another schematic structural diagram of an unloading card provided by an embodiment of the present application;
图6为本申请实施例提供的数据处理的方法的一个流程示意图;6 is a schematic flowchart of a data processing method provided by an embodiment of the present application;
图7为本申请实施例提供的数据处理的方法的另一流程示意图;FIG. 7 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图8为本申请实施例提供的数据处理的方法的另一流程示意图;FIG. 8 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图9为本申请实施例提供的数据处理的方法的另一流程示意图;9 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图10为本申请实施例提供的数据处理的方法的另一流程示意图;10 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图11为本申请实施例提供的数据处理的方法的另一流程示意图;11 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图12为本申请实施例提供的数据处理的方法的另一流程示意图;12 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图13为本申请实施例提供的数据处理的方法的另一流程示意图;13 is another schematic flowchart of a data processing method provided by an embodiment of the present application;
图14为本申请实施例提供的卸载卡的另一个结构示意图;FIG. 14 is another schematic structural diagram of an unloading card provided by an embodiment of the present application;
图15为本申请实施例提供的卸载卡的另一个结构示意图;FIG. 15 is another schematic structural diagram of an unloading card provided by an embodiment of the present application;
图16为本申请实施例提供的卸载卡的另一个结构示意图。FIG. 16 is another schematic structural diagram of an unloading card provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种服务器系统以及数据处理的方法,通过卸载卡对接异构卡的扩展,故可由卸载卡负责处理异构卡的第二虚拟化设备的管控面,能够节省服务器的资源,有利于促进服务器的轻量化。Embodiments of the present application provide a server system and a data processing method. Through the expansion of the connection between the offload card and the heterogeneous card, the offload card can be responsible for processing the management and control plane of the second virtualization device of the heterogeneous card, which can save server resources. , which is conducive to promoting the lightweight of the server.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”并他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is only a distinguishing manner adopted when describing objects with the same attributes in the embodiments of the present application. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, product or device comprising a series of elements is not necessarily limited to those elements, but may include no explicit or other units inherent to these processes, methods, products, or devices.
本申请实施例应用于云场景中。在此类场景中,服务器(宿主机)上通常部署有至少一个云实例,例如VM、裸金属服务器(bare metal server,BMS)、应用容器引擎(docker)等等。为了满足云场景的各类需求,服务器上一般连接有异构卡,例如GPU、NIC等设备。The embodiments of the present application are applied in cloud scenarios. In such scenarios, at least one cloud instance is usually deployed on the server (host), such as VM, bare metal server (BMS), application container engine (docker), and so on. In order to meet various requirements of cloud scenarios, servers are generally connected with heterogeneous cards, such as GPUs, NICs and other devices.
服务器通常支持标准协议,而异构卡通常支持非标准协议。为了与异构卡通信,服务器的云实例需额外加载异构卡的专用驱动(即异构卡所支持的非标准协议对应的驱动),从而实现服务器的云实例与异构卡之间的通信。因此,若服务器的云实例仅加载通用驱动(即服务器所支持的标准协议对应的驱动),则无法实现服务器的云实例与异构卡之间的通信,存在一定的生态问题。Servers usually support standard protocols, while heterogeneous cards usually support non-standard protocols. In order to communicate with the heterogeneous card, the cloud instance of the server needs to additionally load the dedicated driver of the heterogeneous card (that is, the driver corresponding to the non-standard protocol supported by the heterogeneous card), so as to realize the communication between the cloud instance of the server and the heterogeneous card. . Therefore, if the cloud instance of the server only loads the general driver (that is, the driver corresponding to the standard protocol supported by the server), the communication between the cloud instance of the server and the heterogeneous card cannot be realized, and there are certain ecological problems.
进一步地,服务器直接对接异构卡的扩展,会增加管理面的复杂度。因此,前端 服务器会被占用很多资源,这些资源用于处理异构卡的虚拟化设备的管控面,不符合前端服务器的轻量化趋势。Further, the expansion of the server directly connected to the heterogeneous card will increase the complexity of the management plane. Therefore, the front-end server will occupy a lot of resources, and these resources are used to process the control plane of the virtualized device of heterogeneous cards, which does not conform to the trend of light-weight front-end servers.
更进一步地,内核轻量化技术正在探索和演进,也是未来的发展趋势。内核的不断优化和瘦身,也会带来和某些形态的异构卡驱动兼容性的问题,可能会无法适配某些硬件设备。Further, the core lightweight technology is being explored and evolved, which is also the future development trend. The continuous optimization and downsizing of the kernel will also bring about compatibility problems with some forms of heterogeneous card drivers, and may not be able to adapt to some hardware devices.
更进一步地,当前技术存在安全问题,由于异构卡直接插在服务器上,所有的VF设备都暴露给前端虚拟机,各个VM之间会相互影响,没有特别好的处理办法进行恢复和隔离。Furthermore, the current technology has security problems. Since the heterogeneous card is directly inserted into the server, all VF devices are exposed to the front-end virtual machine, and each VM will affect each other. There is no particularly good solution for recovery and isolation.
更进一步地,设计上不够灵活,过度依赖异构卡厂商,在遇到使用场景上的变化时,无法基于简单的修改设计达到云客户的多样化需求。Furthermore, the design is not flexible enough, and it relies too much on heterogeneous card manufacturers. When encountering changes in usage scenarios, it is impossible to meet the diverse needs of cloud customers based on simple design modifications.
为了解决上述问题,本申请实施例提供了一种服务器系统。图1为本申请实施例提供的服务器系统的一个结构示意图。如图1所示,服务器系统包括:服务器、卸载卡和异构卡,其中,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接。具体地,可通过多种方式实现前述服务器、卸载卡和异构卡之间的物理连接关系,下文将分别进行介绍。In order to solve the above problem, an embodiment of the present application provides a server system. FIG. 1 is a schematic structural diagram of a server system provided by an embodiment of the present application. As shown in FIG. 1 , the server system includes: a server, an offload card and a heterogeneous card, wherein one end of the offload card is connected to the server, and the other end of the offload card is connected to the heterogeneous card. Specifically, the physical connection relationship between the aforementioned server, the offload card, and the heterogeneous card can be implemented in various ways, which will be introduced separately below.
在一种可能的实现方式中,如图2所示(图2为本申请实施例提供的服务器系统的另一结构示意图),服务器系统包括:服务器、卸载卡、异构卡和扩展卡(例如,riser卡,即PCIe接口的功能扩展卡或转接卡)。服务器具有第一接口,扩展卡具有第二接口、第三接口、第四接口和第五接口,卸载卡具有第六接口和第七接口,异构卡具有第八接口。在扩展卡内部中,第二接口和第三接口连接,第四接口和第五接口连接。而在扩展卡外部,服务器的第一接口和扩展卡第二接口连接。卸载卡的第六接口和扩展卡第三接口连接,卸载卡的第七接口和扩展卡的第四接口连接,异构卡的第八接口和扩展卡的第五接口连接,从而实现上述的物理连接关系,即异构卡通过卸载卡连接至服务器。In a possible implementation manner, as shown in FIG. 2 ( FIG. 2 is another schematic structural diagram of the server system provided by the embodiment of the application), the server system includes: a server, an offload card, a heterogeneous card, and an expansion card (for example, , riser card, that is, the function expansion card or riser card of the PCIe interface). The server has a first interface, the expansion card has a second interface, a third interface, a fourth interface and a fifth interface, the uninstall card has a sixth interface and a seventh interface, and the heterogeneous card has an eighth interface. Inside the expansion card, the second interface is connected to the third interface, and the fourth interface is connected to the fifth interface. Outside the expansion card, the first interface of the server is connected to the second interface of the expansion card. The sixth interface of the unloading card is connected to the third interface of the expansion card, the seventh interface of the unloading card is connected to the fourth interface of the expansion card, and the eighth interface of the heterogeneous card is connected to the fifth interface of the expansion card, so as to realize the above physical Connection relationship, that is, the heterogeneous card is connected to the server through the offload card.
在另一种可能的实现方式中,如图3所示(图3为本申请实施例提供的服务器系统的另一结构示意图),服务器系统包括:服务器、卸载卡和异构卡。服务器具有第一接口,卸载卡具有第二接口和第三接口,异构卡具有第四接口。服务器的第一接口与卸载卡的第二接口连接,卸载卡的第三接口和异构卡的第四接口连接,从而实现上述的物理连接关系,即异构卡通过卸载卡连接至服务器。In another possible implementation manner, as shown in FIG. 3 ( FIG. 3 is another schematic structural diagram of the server system provided by the embodiment of the application), the server system includes: a server, an offload card, and a heterogeneous card. The server has a first interface, the offload card has a second interface and a third interface, and the heterogeneous card has a fourth interface. The first interface of the server is connected to the second interface of the uninstall card, and the third interface of the uninstall card is connected to the fourth interface of the heterogeneous card, so as to realize the above-mentioned physical connection relationship, that is, the heterogeneous card is connected to the server through the uninstall card.
应理解,前述的各个接口可以为PCIe接口或其他类型的接口,此处不做限制。It should be understood that each of the foregoing interfaces may be PCIe interfaces or other types of interfaces, which are not limited here.
在上述服务器系统中,卸载卡可作为服务器与异构卡之间的桥梁,当服务器与异构卡进行信息交互时,卸载卡可对二者之间传输的信息进行集中管理。下文将对服务器、卸载卡和异构卡分别进行介绍:In the above server system, the offload card can be used as a bridge between the server and the heterogeneous card. When the server and the heterogeneous card exchange information, the offload card can centrally manage the information transmitted between the two. The following will introduce the server, uninstall card and heterogeneous card respectively:
服务器上可部署有至少一个云实例,云实例可以为VM-BMS、docker等等,且服务器支持标准的虚拟化I/O协议(以下简称为标准协议),例如,virtio协议、非易失性存储快速(non-volatile memory express,NVMe)协议等等。因此,服务器以及服务器上的云实例通常加载有标准协议所对应的驱动,即标准驱动(也可称为通用驱动),进而通过标准驱动,与支持标准协议的设备实现交互。At least one cloud instance can be deployed on the server, the cloud instance can be VM-BMS, docker, etc., and the server supports standard virtualization I/O protocols (hereinafter referred to as standard protocols), such as virtio protocol, non-volatile Storage Express (non-volatile memory express, NVMe) protocol and more. Therefore, a server and a cloud instance on the server are usually loaded with a driver corresponding to a standard protocol, that is, a standard driver (also called a generic driver), and then interact with a device supporting the standard protocol through the standard driver.
异构卡可为不同厂商所制定的GPU、NIC等设备,由于各个厂商自定义的协议与 标准协议不同,故异构卡通常支持非标准协议(即非标准的虚拟化I/O协议)。由于卸载卡要与异构卡实现通信,则卸载卡需要加载异构卡所支持的非标准协议对应的驱动,即非标准驱动(也可称为专用驱动)。更进一步的,异构卡可支持SRIOV功能,即异构卡可创建出虚拟化设备,包括至少一个物理功能(physical function,PF)和多个虚拟功能(virtual function,VF)。异构卡的虚拟化设备直通至卸载卡,即异构卡可通过其虚拟化设备与卸载卡通信。Heterogeneous cards can be GPUs, NICs and other devices developed by different manufacturers. Since the protocols customized by each manufacturer are different from standard protocols, heterogeneous cards usually support non-standard protocols (ie, non-standard virtualized I/O protocols). Since the unloading card needs to communicate with the heterogeneous card, the unloading card needs to load a driver corresponding to a non-standard protocol supported by the heterogeneous card, that is, a non-standard driver (also called a dedicated driver). Further, the heterogeneous card can support the SRIOV function, that is, the heterogeneous card can create a virtualized device including at least one physical function (physical function, PF) and multiple virtual functions (virtual function, VF). The virtualization device of the heterogeneous card is directly connected to the offload card, that is, the heterogeneous card can communicate with the offload card through its virtualization device.
图4为本申请实施例提供的卸载卡的一个结构示意图。如图4所示,卸载卡为支持标准协议的设备,包含硬件系统和处理器,硬件系统和处理器电连接,故处理器可与硬件系统实现信息交互。值得注意的是,卸载卡可通过多种形式实现。例如,卸载卡可为ASIC芯片,即该ASIC芯片包含硬件系统和处理器两个部分。又如,卸载卡可为FPGA芯片+ARM芯片的组合,其中,FPGA芯片作为硬件系统,ARM芯片作为处理器等等,此处不做限制。FIG. 4 is a schematic structural diagram of an unloading card provided by an embodiment of the present application. As shown in FIG. 4 , the offload card is a device supporting a standard protocol, including a hardware system and a processor, and the hardware system and the processor are electrically connected, so the processor can realize information interaction with the hardware system. It is worth noting that unloading the card can be achieved in several forms. For example, the offload card can be an ASIC chip, that is, the ASIC chip includes two parts, a hardware system and a processor. For another example, the unloading card may be a combination of an FPGA chip and an ARM chip, wherein the FPGA chip is used as a hardware system, and the ARM chip is used as a processor, etc., which is not limited here.
具体地,如图5所示(图5为本申请实施例提供的卸载卡的另一结构示意图),卸载卡启动后,当卸载卡的处理器运行相应的代码,处理器可在卸载卡内部呈现为软件系统(即软件系统所实现的步骤,从物理硬件上看,均可视为是处理器在执行),此时,卸载卡可作为一个支持软硬协同的设备,两个系统相互配合,使得卸载卡工作在服务器和异构卡之间,作为二者之间信息传递的桥梁,实现信息的数据格式转换和传输等功能。下文将结合图5对硬件系统和软件系统分别进行简单的介绍:Specifically, as shown in FIG. 5 (FIG. 5 is another schematic structural diagram of the unload card provided by the embodiment of the application), after the unload card is started, when the processor of the unload card runs the corresponding code, the processor can be inside the unload card. It is presented as a software system (that is, the steps implemented by the software system can be regarded as being executed by the processor from the perspective of physical hardware). , so that the unloading card works between the server and the heterogeneous card, as a bridge for information transmission between the two, and realizes functions such as data format conversion and transmission of information. The following will briefly introduce the hardware system and the software system in conjunction with Figure 5:
硬件系统包含协议处理模块、协议转换模块和存储模块(即卸载卡的内存)等模块。其中,协议处理模块包含多个支持不同标准协议的引擎模块,例如,至少一个支持virtio协议的引擎模块(virtio engine),至少一个支持NVMe协议的引擎模块(NVMe engine)等等。此外,协议处理模块还包含直通通道(PF bypass)和PCIe交换机(PCIe switch),引擎模块和直通通道挂载在PCIe交换机上。需要说明的是,引擎模块可被软件系统的处理模块配置为直通至服务器的云实例的虚拟化设备。卸载卡内部的虚拟化设备和直通通道均可用于通过PCIe交换机接收来自服务器的云实例的信息或向服务器的云实例发送信息,值得注意的是,硬件系统内部的虚拟化设备工作在非直通场景下(该场景下,卸载卡需要对传递的信息进行数据格式的转化),而直通通道工作在直通场景下(该场景下,卸载卡不需要对传递的信息进行数据格式的转化)。协议转换模块可用于在非直通场景下对信息进行数据格式的转换,例如,将来自异构卡的信息(异构卡发送至服务器的云实例的信息)转换为符合标准协议的格式要求的信息,从而通过引擎模块发送至服务器,又如,将来自虚拟化设备的信息(即服务器的云实例发送至异构卡的信息)转换为符合非标准协议的格式要求的信息,从而发送至异构卡等等。此外,协议转换模块在直通场景下,不对信息进行数据格式的转换。在非直通场景和直通场景中,存储模块用于存储数据和虚拟化设备之间的映射关系等等,此处先不做展开介绍。The hardware system includes modules such as a protocol processing module, a protocol conversion module, and a storage module (ie, the memory of the offload card). The protocol processing module includes a plurality of engine modules supporting different standard protocols, for example, at least one engine module (virtio engine) supporting the virtio protocol, at least one engine module (NVMe engine) supporting the NVMe protocol, and so on. In addition, the protocol processing module also includes a pass-through channel (PF bypass) and a PCIe switch (PCIe switch). The engine module and the pass-through channel are mounted on the PCIe switch. It should be noted that the engine module may be configured by the processing module of the software system as a virtualization device directly connected to the cloud instance of the server. Both the virtualization device and the pass-through channel inside the offload card can be used to receive information from or send information to the cloud instance of the server through the PCIe switch. It is worth noting that the virtualization device inside the hardware system works in a non-pass-through scenario. (In this scenario, the offload card needs to convert the data format of the transmitted information), while the pass-through channel works in the pass-through scenario (in this scenario, the offload card does not need to convert the data format of the transmitted information). The protocol conversion module can be used to convert the data format of the information in the non-pass-through scenario, for example, convert the information from the heterogeneous card (the information sent by the heterogeneous card to the cloud instance of the server) into the information that meets the format requirements of the standard protocol , so as to be sent to the server through the engine module, for another example, the information from the virtualized device (that is, the information sent by the cloud instance of the server to the heterogeneous card) is converted into information that conforms to the format requirements of the non-standard protocol, and then sent to the heterogeneous card. card and so on. In addition, the protocol conversion module does not convert the data format of the information in the pass-through scenario. In the non-pass-through and pass-through scenarios, the storage module is used to store the mapping relationship between data and virtualized devices, etc., which will not be introduced here.
软件系统包含处理模块和初始化模块。在非直通场景中,处理模块可用于对引擎模块进行配置,使得引擎模块对外呈现为虚拟化设备,从而被服务器发现和使用。更进一步地,处理模块在对引擎模块完成配置得到虚拟化设备后,可将卸载卡内部的虚拟化设备与异构卡的虚拟化设备进行绑定(即构建卸载卡的虚拟化设备与异构卡的虚 拟化设备之间的映射关系),使得卸载卡内部的虚拟化设备作为异构卡的专用通道,例如,处理模块在对两个引擎模块分别进行配置后,得到虚拟化设备A和虚拟化设备B。然后,处理模块可将虚拟化设备A与异构卡C的虚拟化设备D和E绑定,将虚拟化设备B与异构卡F的虚拟化设备G、H和I绑定,使得虚拟化设备A作为异构卡C的专用通道,虚拟化设备B作为异构卡F的专用通道等等。在非直通场景和直通场景中,初始化模块均用于加载异构卡所对应的非标准驱动,并基于该非标准驱动初始化异构卡,从而使得异构卡和卸载卡之间可以进行信息交互。The software system includes a processing module and an initialization module. In a non-pass-through scenario, the processing module can be used to configure the engine module, so that the engine module appears as a virtualized device to the outside, so that it can be discovered and used by the server. Further, after the processing module completes the configuration of the engine module to obtain the virtualized device, it can bind the virtualized device inside the offload card to the virtualized device of the heterogeneous card (that is, to construct the virtualized device of the offloaded card and the heterogeneous card. The mapping relationship between the virtualized devices of the card), so that the virtualized device inside the unloading card is used as a dedicated channel for the heterogeneous card. chemical equipment B. Then, the processing module can bind the virtualization device A to the virtualization devices D and E of the heterogeneous card C, and bind the virtualization device B to the virtualization devices G, H and I of the heterogeneous card F, so that the virtualization Device A serves as a dedicated channel for heterogeneous card C, virtualized device B serves as a dedicated channel for heterogeneous card F, and so on. In both non-pass-through and pass-through scenarios, the initialization module is used to load the non-standard driver corresponding to the heterogeneous card, and initialize the heterogeneous card based on the non-standard driver, so that information exchange between the heterogeneous card and the unloading card can be performed. .
本申请实施例中,云计算系统可工作在非直通场景和直通场景下,下文将对两种场景分别进行介绍。需要说明的是,云计算系统具体工作在哪种模式下,可根据实际需求对云计算系统进行提前场景设置。为了方便说明,下文将异构卡所支持的非标准协议称为第一协议,将服务器所支持的标准协议称为第二协议,将非标准协议对应的驱动称为第一驱动,将标准协议对应的驱动称为第二驱动,将卸载卡的虚拟化设备称为第一虚拟化设备,将异构卡的虚拟化设备称为第二虚拟化设备。In the embodiment of the present application, the cloud computing system can work in a non-pass-through scenario and a pass-through scenario, and the two scenarios will be introduced separately below. It should be noted that, depending on which mode the cloud computing system works in, scenarios can be set in advance for the cloud computing system according to actual needs. For the convenience of description, the non-standard protocol supported by the heterogeneous card is referred to as the first protocol, the standard protocol supported by the server is referred to as the second protocol, the driver corresponding to the non-standard protocol is referred to as the first driver, and the standard protocol is referred to as the first driver. The corresponding driver is referred to as the second driver, the virtualization device of the unload card is referred to as the first virtualization device, and the virtualization device of the heterogeneous card is referred to as the second virtualization device.
首先对非直通场景进行介绍。在非直通场景中,卸载卡可记录卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备的映射关系(即初始化过程),然后根据映射关系实现服务器的云实例与异构卡的第二虚拟化设备之间的通信(即数据传输过程),其中,卸载卡的第一虚拟化设备直通至服务器的云实例,异构卡的第二虚拟设备直通至卸载卡。下面先对非直通场景的初始化过程进行介绍。图6为本申请实施例提供的数据处理的方法的一个流程示意图,如图6所示,该方法包括:First, the non-pass-through scenarios are introduced. In a non-pass-through scenario, the offload card can record the mapping relationship between the first virtualization device of the offload card and the second virtualized device of the heterogeneous card (that is, the initialization process), and then realize the cloud instance of the server and the heterogeneous card according to the mapping relationship. The communication between the second virtualization devices (ie the data transmission process), wherein the first virtualization device of the offload card is directly connected to the cloud instance of the server, and the second virtual device of the heterogeneous card is directly connected to the offload card. The initialization process of the non-pass-through scenario is described below. FIG. 6 is a schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 6 , the method includes:
601、服务器启动后,加载第二驱动。601. After the server is started, load a second driver.
本实施例中,由于服务器与卸载卡的一侧连接,故卸载卡与服务器可同步启动也可异步启动。例如,若卸载卡并未自带电源,则只能在服务器开机启动后,由服务器控制卸载卡启动。又如,若卸载卡自带电源,则服务器和卸载卡同分别通过自身的电源实现同步启动等等,此处不做限制。In this embodiment, since the server is connected to one side of the uninstall card, the uninstall card and the server can be started synchronously or asynchronously. For example, if the unloading card does not have its own power supply, the server can only control the unloading card to start after the server is powered on. For another example, if the unloading card has its own power supply, the server and the unloading card can be started synchronously through their own power supplies, etc., which is not limited here.
值得注意的是,在服务器启动后,服务器以及服务器的云实例均可加载服务器所支持的第二协议对应的第二驱动。更进一步地,在卸载卡启动后,卸载卡内部的处理器开始运行,从而启动软件系统,以支持软硬协同的功能,即使得硬件系统和软件系统可以相互配合工作。It is worth noting that, after the server is started, both the server and the cloud instance of the server can load the second driver corresponding to the second protocol supported by the server. Furthermore, after the unloading card is started, the processor inside the unloading card starts to run, thereby starting the software system to support the function of software-hardware coordination, that is, the hardware system and the software system can cooperate with each other.
602、卸载卡在确定异构卡启动后,加载第一驱动。602. After it is determined that the heterogeneous card is activated, the unloading card loads the first driver.
同样的,由于异构卡与卸载卡的另一侧连接,卸载卡与异构卡可同步启动也可异步启动,具体可参考步骤301中服务器与卸载卡的启动过程的相关说明,此处不再赘述。在卸载卡确定异构卡启动后,即卸载卡确定异构卡上电后,卸载卡通过初始化模块加载异构卡所支持的第一协议对应的第一驱动(异构卡对应的第一驱动)。Similarly, since the heterogeneous card is connected to the other side of the unloading card, the unloading card and the heterogeneous card can be started synchronously or asynchronously. For details, please refer to the relevant description of the startup process of the server and the unloading card in step 301. Repeat. After the unloading card determines that the heterogeneous card is started, that is, after the unloading card determines that the heterogeneous card is powered on, the unloading card loads the first driver corresponding to the first protocol supported by the heterogeneous card through the initialization module (the first driver corresponding to the heterogeneous card). ).
603、卸载卡通过第一驱动获取异构卡的设备信息。603. The uninstall card acquires the device information of the heterogeneous card through the first driver.
在加载第一驱动后,卸载卡可通过第一驱动向异构卡发送初始化请求,以使得异构卡基于初始化请求进行单根I/O虚拟化(single-root I/O virtualization,SRIOV)初始化。异构卡在进行SRIOV初始化的过程中,可创建直通至卸载卡的第二虚拟化设备(包含至少一个PF和多个VF),此后,异构卡可通过第二虚拟化设备与卸载卡进行通信。在异构卡完成SRIOV初始化后,可通过第二虚拟化设备向卸载卡返回异构卡的设备信 息,异构卡的设备信息包含各个PF和VF的设备标识(identity,ID)和设备类型等信息。After loading the first driver, the unloading card may send an initialization request to the heterogeneous card through the first driver, so that the heterogeneous card performs single-root I/O virtualization (SRIOV) initialization based on the initialization request . During the SRIOV initialization process of the heterogeneous card, a second virtualization device (including at least one PF and multiple VFs) that is directly connected to the offload card can be created. communication. After the heterogeneous card completes the SRIOV initialization, the device information of the heterogeneous card can be returned to the unloading card through the second virtualization device. The device information of the heterogeneous card includes the device identification (identity, ID) and device type of each PF and VF, etc. information.
604、卸载卡基于配置信息将引擎模块配置为第一虚拟化设备,配置信息为预置的信息。604. The uninstall card configures the engine module as the first virtualization device based on the configuration information, where the configuration information is preset information.
在卸载卡的硬件系统中,包括支持第二协议的引擎模块,例如,前述的virtio engine、NVMe engine等等。在加载第一驱动后,卸载卡通过处理模块获取用于配置第一虚拟化设备的配置信息。该配置信息为预置的信息,包含与第一虚拟化设备的设备类型相关的信息(命令通道)、与第一虚拟化设备的数量相关的信息(队列数量)等等。得到配置信息后,处理模块可基于配置信息将引擎模块配置为第一虚拟化设备。In the hardware system of the offload card, an engine module supporting the second protocol is included, for example, the aforementioned virtio engine, NVMe engine, and so on. After loading the first driver, the unloading card obtains configuration information for configuring the first virtualization device through the processing module. The configuration information is preset information, including information related to the device type of the first virtualized device (command channel), information related to the number of the first virtualized device (the number of queues), and the like. After obtaining the configuration information, the processing module may configure the engine module as the first virtualization device based on the configuration information.
例如,设服务器支持virtio协议。在加载第一驱动后,卸载卡通过处理模块获取与virtio协议对应的配置信息,该配置信息所包含的内容(即具体要配置成virtio协议下的哪种第一虚拟化设备和多少个第一虚拟化设备)已被提前设置,如该配置信息包含与virtio-gpu对应的命令通道以及与virtio-gpu对应的队列数量。得到该配置信息后,处理模块可在virtio engine、NVMe engine等模块中确定出virtio engine,并基于该配置信息将virtio engine配置为virtio-gpu1、virtio-gpu2、…、virtio-gpuN等N个第一虚拟化设备,N的取值与队列数量相关。For example, suppose the server supports the virtio protocol. After loading the first driver, the unloading card obtains the configuration information corresponding to the virtio protocol through the processing module, and the content contained in the configuration information (that is, which first virtualization device under the virtio protocol should be configured and how many first virtual devices are to be configured) Virtualization device) has been set in advance, such as the configuration information contains the command channel corresponding to virtio-gpu and the number of queues corresponding to virtio-gpu. After obtaining the configuration information, the processing module can determine the virtio engine in the virtio engine, NVMe engine and other modules, and configure the virtio engine as the Nth Nth such as virtio-gpu1, virtio-gpu2, ..., virtio-gpuN based on the configuration information For a virtualized device, the value of N is related to the number of queues.
需要说明的是,卸载卡的第一虚拟化设备直通至服务器的云实例,即卸载卡可通过第一虚拟化设备与服务器的云实例进行通信。It should be noted that the first virtualization device of the offload card is directly connected to the cloud instance of the server, that is, the offload card can communicate with the cloud instance of the server through the first virtualization device.
值得注意的是,卸载卡向服务器的云实例发送信息的过程中,卸载卡通过第一虚拟化设备所发送的信息,经由服务器(宿主机)的第二驱动转发至服务器的云实例的第二驱动,从而到达服务器的云实例。该过程可描述为卸载卡的第一虚拟化设备向服务器的云实例的第二驱动发送信息,后续不在赘述。It is worth noting that in the process of the offload card sending information to the cloud instance of the server, the information sent by the offload card through the first virtualization device is forwarded to the second server of the cloud instance of the server via the second driver of the server (host). drive to reach the cloud instance of the server. This process can be described as the first virtualization device of the uninstall card sending information to the second driver of the cloud instance of the server, which will not be described in detail later.
同理,服务器的云实例向卸载卡发送信息的过程中,服务器的云实例的第二驱动所发送的信息,经由服务器的第二驱动转发至卸载卡的第一虚拟化设备,从而到达卸载卡。该过程可描述为服务器的云实例的第二驱动向卸载卡的第一虚拟化设备发送信息,后续不在赘述。Similarly, when the cloud instance of the server sends information to the offload card, the information sent by the second driver of the cloud instance of the server is forwarded to the first virtualization device of the offload card via the second driver of the server, thereby reaching the offload card. . This process can be described as the second driver of the cloud instance of the server sending information to the first virtualization device of the offload card, which will not be described in detail later.
应理解,前述例子仅以服务器的云实例所支持的第二协议为virtio协议为例进行示意性说明,并不对本申请中服务器的云实例所支持的第二协议的类型构成限制。It should be understood that the foregoing examples only take the second protocol supported by the cloud instance of the server as the virtio protocol for illustrative illustration, and do not limit the type of the second protocol supported by the cloud instance of the server in this application.
还应理解,前述例子中,在virtio协议下,仅以第一虚拟化设备为virtio-gpu为例进行示意性说明,第一虚拟化设备还可以virtio-blk、virtio-net等其他类型的设备。It should also be understood that in the foregoing example, under the virtio protocol, only the first virtualized device is virtio-gpu as an example for schematic illustration, and the first virtualized device may also be other types of devices such as virtio-blk and virtio-net .
还应理解,步骤603和步骤604可同步执行,也可异步执行。当二者异步执行时,步骤603可先于步骤604执行,步骤603也可后于步骤604执行,此处不做限定。It should also be understood that step 603 and step 604 may be performed synchronously or asynchronously. When the two are executed asynchronously, step 603 can be executed before step 604, and step 603 can also be executed after step 604, which is not limited here.
605、卸载卡通过第一虚拟化设备接收来自第二驱动的枚举结果,枚举结果用于指示服务器的云实例已检测到第一虚拟化设备。605. The uninstall card receives an enumeration result from the second driver through the first virtualization device, where the enumeration result is used to indicate that the cloud instance of the server has detected the first virtualization device.
卸载卡的处理模块在完成配置操作得到第一虚拟化设备后,第一虚拟化设备可被服务器的云实例发现。当服务器的云实例发现(检测到)第一虚拟化设备后,可通过云实例的第二驱动向卸载卡的第一虚拟化设备下发枚举结果,该枚举结果用于指示服务器的云实例已检测到第一虚拟化设备。After the processing module of the offload card completes the configuration operation to obtain the first virtualized device, the first virtualized device can be discovered by the cloud instance of the server. After the cloud instance of the server discovers (detects) the first virtualized device, the second driver of the cloud instance can deliver an enumeration result to the first virtualized device of the offload card, where the enumeration result is used to indicate the cloud of the server The instance has detected the first virtualized device.
依旧如上述例子,处理模块对virtio engine完成配置后,可使得virtio engine对服 务器的云实例呈现为virtio-gpu1、virtio-gpu2、…、virtio-gpuN等设备。服务器的云实例(通过云实例的第二驱动)检测到virtio-gpu1、virtio-gpu2、…、virtio-gpuN后,可向卸载卡下发枚举结果,从而通知卸载卡,服务器的云实例已检测到virtio-gpu1、virtio-gpu2、…、virtio-gpuN。As in the above example, after the processing module completes the configuration of the virtio engine, the virtio engine can present the cloud instances of the server as virtio-gpu1, virtio-gpu2, ..., virtio-gpuN and other devices. After the cloud instance of the server (through the second driver of the cloud instance) detects virtio-gpu1, virtio-gpu2, ..., virtio-gpuN, it can send the enumeration result to the uninstall card to notify the uninstall card that the cloud instance of the server has virtio-gpu1, virtio-gpu2, …, virtio-gpuN detected.
606、卸载卡基于异构卡的设备信息和枚举结果构建异构卡的第二虚拟化设备与卸载卡的第一虚拟化设备之间的映射关系。606. The offload card builds a mapping relationship between the second virtualized device of the heterogeneous card and the first virtualized device of the offloaded card based on the device information of the heterogeneous card and the enumeration result.
在步骤603中,卸载卡通过第一驱动接收到异构卡的设备信息后,可通过第一驱动将这些设备信息发送至处理模块。In step 603, after receiving the device information of the heterogeneous card through the first driver, the uninstall card can send the device information to the processing module through the first driver.
卸载卡的处理模块在接收到枚举结果和异构卡的设备信息后,可基于异构卡的设备信息和枚举结果构建异构卡的第二虚拟化设备与卸载卡的第一虚拟化设备之间的映射关系,并将该映射关系存储于存储模块中。After receiving the enumeration result and the device information of the heterogeneous card, the processing module of the offload card can construct the second virtualized device of the heterogeneous card and the first virtualized device of the offload card based on the device information of the heterogeneous card and the enumeration result. The mapping relationship between the devices is stored, and the mapping relationship is stored in the storage module.
例如,设异构卡的设备信息用于指示异构卡包含两个第二虚拟化设备(分别为VF1和VF2),而枚举结果用于指示服务器的云实例检测到三个第一虚拟化设备(分别为virtio-gpu1、virtio-gpu2和virtio-gpu3)。处理模块可基于异构卡的设备信息和枚举结果,建立如下映射关系:virtio-gpu1与VF1对应,virtio-gpu2与VF1对应,virtio-gpu3与VF2对应。For example, let the device information of the heterogeneous card be used to indicate that the heterogeneous card contains two second virtualization devices (VF1 and VF2 respectively), and the enumeration result is used to indicate that the cloud instance of the server has detected three first virtualization devices devices (virtio-gpu1, virtio-gpu2 and virtio-gpu3 respectively). The processing module can establish the following mapping relationship based on the device information and enumeration results of the heterogeneous cards: virtio-gpu1 corresponds to VF1, virtio-gpu2 corresponds to VF1, and virtio-gpu3 corresponds to VF2.
同理,若有另一张异构卡接在卸载卡上,同样也可对该异构卡执行如同步骤601至步骤606的初始化过程。那么,卸载卡则加载有多个异构卡对应的第一驱动,且卸载卡可以记录多个第一虚拟化设备和不同异构卡的多个第二虚拟化设备之间的映射关系。例如,设有异构卡1和异构卡2先后接入卸载卡,分别完成初始化后,可得到如下映射关系:virtio-gpu1与异构卡1的VF1对应,virtio-gpu2与异构卡1的VF1对应,virtio-gpu3与异构卡1的VF2对应,virtio-gpu4与异构卡2的VF3对应,virtio-gpu5与异构卡2的VF4对应等等。若服务器的云实例对virtio-gpu1发送了某个信息,卸载卡可基于virtio-gpu1与VF1之间的对应关系,将该信息转发至VF1,故可将该信息成功发送至异构卡1。Similarly, if another heterogeneous card is connected to the unloading card, the same initialization process as step 601 to step 606 can also be performed for the heterogeneous card. Then, the unloading card is loaded with first drivers corresponding to multiple heterogeneous cards, and the unloading card can record the mapping relationship between multiple first virtualization devices and multiple second virtualization devices of different heterogeneous cards. For example, if the heterogeneous card 1 and the heterogeneous card 2 are connected to the unloading card successively, after the initialization is completed, the following mapping relationship can be obtained: virtio-gpu1 corresponds to the VF1 of the heterogeneous card 1, and virtio-gpu2 corresponds to the heterogeneous card 1 virtio-gpu3 corresponds to VF2 of heterogeneous card 1, virtio-gpu4 corresponds to VF3 of heterogeneous card 2, virtio-gpu5 corresponds to VF4 of heterogeneous card 2, and so on. If the cloud instance of the server sends certain information to virtio-gpu1, the offload card can forward the information to VF1 based on the correspondence between virtio-gpu1 and VF1, so the information can be successfully sent to heterogeneous card 1.
更进一步地,本申请实施例的服务器系统还具有对第一虚拟化设备的重加载功能。以服务器支持virtio协议为例进行说明。设服务器所支持的virtio协议为virtio1.0版本,经过前述的步骤601至步骤606后(其中,在virtio engine的配置过程中,所使用的是virtio1.0对应的配置信息),使得virtio engine呈现为virtio1.0下的virtio-gpu。若服务器所支持的virtio协议进行了版本更替,如从virtio1.0更新至virtio2.0,那么,处理模块可获取virtio2.0对应的配置信息,基于该配置信息对已完成配置的virtio engine进行重配置,使得virtio engine呈现为virtio2.0下的virtio-gpu。同理,若需要更改virtio engine呈现的设备类型,例如,将virtio-gpu切换为virtio-blk,处理模块可获取新的配置信息,基于该配置信息对已完成配置的virtio engine进行重配置,使得virtio engine呈现为virtio-blk。需要说明的是,即使第一虚拟化设备被重加载,不会更改重加载后的第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系,即保留重加载前的第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系。Further, the server system of the embodiment of the present application also has a reloading function for the first virtualization device. Take the server supporting the virtio protocol as an example. Assuming that the virtio protocol supported by the server is the virtio1.0 version, after the aforementioned steps 601 to 606 (wherein, in the configuration process of the virtio engine, the configuration information corresponding to virtio1.0 is used), so that the virtio engine presents It is virtio-gpu under virtio1.0. If the version of the virtio protocol supported by the server is changed, for example, from virtio1.0 to virtio2.0, the processing module can obtain the configuration information corresponding to virtio2.0, and based on the configuration information, the virtio engine that has been configured will be reconfigured. The configuration makes the virtio engine appear as virtio-gpu under virtio2.0. Similarly, if you need to change the device type presented by the virtio engine, for example, switch virtio-gpu to virtio-blk, the processing module can obtain new configuration information, and reconfigure the configured virtio engine based on the configuration information, so that The virtio engine is presented as virtio-blk. It should be noted that even if the first virtualized device is reloaded, the mapping relationship between the reloaded first virtualized device and the second virtualized device of the heterogeneous card will not be changed, that is, the first virtualized device before reloading is retained. A mapping relationship between a virtualized device and a second virtualized device of a heterogeneous card.
经过上述初始化过程,可进行数据传输过程。对于服务器一侧而言,服务器的云实例所能看到是卸载卡呈现的第一虚拟化设备,故服务器的云实例可根据自身的需求 对第一虚拟化设备发送信息。卸载卡通过第一虚拟化设备接收到该信息后,可基于卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系,将该信息发送至异构卡的第二虚拟化设备,相当于服务器的云实例实际上在对异构卡发送信息,从而实现服务器的云实例与异构卡之间的通信。After the above initialization process, the data transmission process can be performed. For the server side, what the cloud instance of the server can see is the first virtualized device presented by the uninstall card, so the cloud instance of the server can send information to the first virtualized device according to its own needs. After receiving the information through the first virtualization device, the uninstall card can send the information to the first virtualization device of the heterogeneous card based on the mapping relationship between the first virtualization device of the uninstall card and the second virtualization device of the heterogeneous card. Second, the virtualized device, which is equivalent to the cloud instance of the server is actually sending information to the heterogeneous card, so as to realize the communication between the cloud instance of the server and the heterogeneous card.
在非直通场景中,数据传输过程包含发送(transmit,TX)方向的数据传输过程和接收(receive,RX)方向的数据传输过程。TX方向的数据传输过程包含两种模式,下文先对第一种模式进行介绍。图7为本申请实施例提供的数据处理的方法的另一流程示意图,如图7所示,该方法包括:In a non-pass-through scenario, the data transmission process includes a data transmission process in a transmit (transmit, TX) direction and a data transmission process in a receive (receive, RX) direction. The data transmission process in the TX direction includes two modes, and the first mode is introduced first. FIG. 7 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 7 , the method includes:
701、卸载卡通过第一虚拟化设备,接收来自第二驱动的第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据。701. The uninstall card receives a second sending request from the second driver through the first virtualization device, the second sending request conforms to the format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send the target data .
经过初始化后,服务器的云实例所能看到是卸载卡呈现的第一虚拟化设备。当服务器的云实例需要对第一虚拟化设备发送目标数据时,可生成第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据。在得到第二发送请求后,服务器的云实例通过第二驱动将第二发送请求发送至第一虚拟化设备。After initialization, what the cloud instance of the server can see is the first virtualized device presented by the offload card. When the cloud instance of the server needs to send target data to the first virtualization device, a second sending request can be generated, the second sending request conforms to the format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send target data. After obtaining the second sending request, the cloud instance of the server sends the second sending request to the first virtualization device through the second driver.
例如,服务器的云实例要对virtio-gpu1发送目标数据时,可生成第二发送请求,第二发送请求符合第二协议(即virtio协议)的格式要求。然后,服务器的云实例通过第二驱动将第二发送请求发送至virtio-gpu1。For example, when the cloud instance of the server wants to send target data to virtio-gpu1, a second sending request may be generated, and the second sending request conforms to the format requirements of the second protocol (ie, the virtio protocol). Then, the cloud instance of the server sends the second sending request to virtio-gpu1 through the second driver.
702、卸载卡将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求。702. The uninstall card converts the second sending request into a first sending request, where the first sending request conforms to the format requirements of the first protocol.
卸载卡通过第一虚拟化设备接收到第二发送请求后,通过第一虚拟化设备将第二发送请求发送至协议转换模块,使得协议转换模块从存储模块中获取第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系,并基于该映射关系将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求。After receiving the second sending request through the first virtualization device, the unloading card sends the second sending request to the protocol conversion module through the first virtualization device, so that the protocol conversion module obtains the first virtualization device and the heterogeneous configuration from the storage module. The mapping relationship between the second virtualization devices of the card, and based on the mapping relationship, the second sending request is converted into a first sending request, and the first sending request conforms to the format requirements of the first protocol.
例如,若协议转换模块接收到来自virtio-gpu1的第二发送请求,可从存储模块获取virtio-gpu1与异构卡1的VF1之间的映射关系。确定第二发送请求是发送至异构卡1的请求后,可对第二发送请求进行数据格式的转换,得到第一发送请求,第一发送请求符合异构卡1所支持的第一协议的格式要求。又如,若协议转换模块接收到来自virtio-gpu5的第二发送请求,可从存储模块获取virtio-gpu5与异构卡2的VF4之间的映射关系。确定第二发送请求是发送至异构卡2的请求后,可对第二发送请求进行数据格式的转换,得到第一发送请求,第一发送请求符合异构卡2所支持的第一协议的格式要求等等。For example, if the protocol conversion module receives the second sending request from virtio-gpu1, the mapping relationship between virtio-gpu1 and the VF1 of the heterogeneous card 1 can be obtained from the storage module. After determining that the second sending request is a request sent to the heterogeneous card 1, the data format of the second sending request can be converted to obtain the first sending request, and the first sending request conforms to the first protocol supported by the heterogeneous card 1. format requirement. For another example, if the protocol conversion module receives the second sending request from virtio-gpu5, the mapping relationship between virtio-gpu5 and the VF4 of the heterogeneous card 2 can be obtained from the storage module. After it is determined that the second sending request is a request sent to the heterogeneous card 2, the data format of the second sending request can be converted to obtain the first sending request, and the first sending request conforms to the first protocol supported by the heterogeneous card 2. format requirements, etc.
值得注意的是,协议转换模块在进行数据格式的转换时,需要从存储模块中获取数据格式的映射表,从而基于该映射表完成数据格式的转换。具体地,该映射表记载了第一协议的数据格式和第二协议的数据格式之间的对应关系,故协议转换模块可基于该映射表,将第二发送请求(符合第二协议的数据格式要求)转换成第一发送请求(符合第一协议的数据格式要求)。It is worth noting that when the protocol conversion module converts the data format, it needs to obtain the mapping table of the data format from the storage module, so as to complete the conversion of the data format based on the mapping table. Specifically, the mapping table records the correspondence between the data format of the first protocol and the data format of the second protocol, so the protocol conversion module can convert the second sending request (the data format conforming to the second protocol) based on the mapping table request) into the first sending request (complies with the data format requirements of the first protocol).
更进一步地,前述数据格式的转换包含目标数据的地址的转换等等。Further, the aforementioned conversion of the data format includes conversion of the address of the target data and the like.
703、卸载卡通过第一驱动将第一发送请求发送至第二虚拟化设备,以使得异构卡基于第一发送请求,通过第二虚拟化设备向卸载卡发送第一读请求。703. The offload card sends the first sending request to the second virtualization device through the first driver, so that the heterogeneous card sends the first read request to the offload card through the second virtualization device based on the first sending request.
得到第一发送请求后,卸载卡通过协议转换模块将第一发送请求发送至第一驱动,使得第一驱动将第一发送请求发送至异构卡的第二虚拟化设备。After obtaining the first sending request, the offload card sends the first sending request to the first driver through the protocol conversion module, so that the first driver sends the first sending request to the second virtualization device of the heterogeneous card.
例如,若协议转换模块接收到来自virtio-gpu1的第二发送请求,可从存储模块获取virtio-gpu1与异构卡1的VF1之间的映射关系。确定第二发送请求是发送至异构卡1的请求后,可对第二发送请求进行数据格式的转换,得到第一发送请求,第一发送请求符合异构卡1所支持的第一协议的格式要求。然后,协议转换模块将第一发送请求发送至异构卡1对应的第一驱动,使得该第一驱动将第一发送请求发送至VF1。For example, if the protocol conversion module receives the second sending request from virtio-gpu1, the mapping relationship between virtio-gpu1 and the VF1 of the heterogeneous card 1 can be obtained from the storage module. After determining that the second sending request is a request sent to the heterogeneous card 1, the data format of the second sending request can be converted to obtain the first sending request, and the first sending request conforms to the first protocol supported by the heterogeneous card 1. format requirement. Then, the protocol conversion module sends the first sending request to the first driver corresponding to the heterogeneous card 1, so that the first driver sends the first sending request to the VF1.
704、卸载卡通过第一驱动接收来自第二虚拟化设备的第一读请求,第一读请求符合第一协议的格式要求。704. The uninstall card receives the first read request from the second virtualization device through the first driver, where the first read request conforms to the format requirement of the first protocol.
异构卡接收到第一发送请求后,可确定服务器的云实例即将向异构卡发送目标数据。故异构卡生成第一读请求,第一读请求符合第一协议的格式要求,且用于指示异构卡需读取目标数据。得到第一读请求后,异构卡通过第二虚拟化设备将第一读请求发送至卸载卡。After the heterogeneous card receives the first sending request, it can be determined that the cloud instance of the server is about to send the target data to the heterogeneous card. Therefore, the heterogeneous card generates the first read request, and the first read request conforms to the format requirements of the first protocol, and is used to indicate that the heterogeneous card needs to read the target data. After obtaining the first read request, the heterogeneous card sends the first read request to the offload card through the second virtualization device.
705、卸载卡将第一读请求转换为第二读请求,第二读请求符合第二协议的格式要求。705. The uninstall card converts the first read request into a second read request, where the second read request conforms to the format requirements of the second protocol.
卸载卡的第一驱动接收到来自第二虚拟化设备的第一读请求后,可将第一读请求发送至协议转换模块,使得协议转换模块基于从存储模块中获取卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系,并基于该映射关系将第一读请求转换为第二读请求,第二读请求符合第二协议的格式要求。After receiving the first read request from the second virtualization device, the first driver of the offload card can send the first read request to the protocol conversion module, so that the protocol conversion module obtains the first virtualized data of the offload card from the storage module based on the The mapping relationship between the device and the second virtualized device of the heterogeneous card, and based on the mapping relationship, the first read request is converted into a second read request, and the second read request conforms to the format requirements of the second protocol.
例如,在卸载卡所安装的第一驱动中,若异构卡1对应的第一驱动接收到来自异构卡1的VF1的第一读请求,可将第一读请求发送至协议转换模块,并通知协议转换模块第一读请求来自异构卡1的VF1(例如,可在第一读请求上携带VF1的标识等等)。协议转换模块可从存储模块获取virtio-gpu1与异构卡1的VF1之间的映射关系,确定第一读请求是通过virtio-gpu1发送至云实例的请求后,可对第一读请求进行数据格式的转换,得到第二读请求,第二读请求符合服务器的云实例所支持的第二协议(即virtio协议)的格式要求。然后,协议转换模块将第二读请求发送至virtio-gpu1。For example, in the first driver installed on the uninstall card, if the first driver corresponding to the heterogeneous card 1 receives the first read request from the VF1 of the heterogeneous card 1, it can send the first read request to the protocol conversion module, And notify the protocol conversion module that the first read request comes from the VF1 of the heterogeneous card 1 (for example, the first read request may carry the identifier of the VF1, etc.). The protocol conversion module can obtain the mapping relationship between virtio-gpu1 and the VF1 of the heterogeneous card 1 from the storage module. After determining that the first read request is a request sent to the cloud instance through virtio-gpu1, it can perform data processing on the first read request. The format is converted to obtain a second read request, and the second read request conforms to the format requirements of the second protocol (ie, the virtio protocol) supported by the cloud instance of the server. Then, the protocol conversion module sends the second read request to virtio-gpu1.
706、卸载卡通过第一虚拟化设备将第二读请求发送至第二驱动。706. The uninstall card sends the second read request to the second driver through the first virtualization device.
得到第二读请求后,卸载卡通过协议转换模块将第二读请求发送至第一虚拟化设备,使得第一虚拟化设备将第二读请求发送至服务器的云实例的第二驱动。After obtaining the second read request, the offload card sends the second read request to the first virtualization device through the protocol conversion module, so that the first virtualization device sends the second read request to the second driver of the cloud instance of the server.
707、服务器的云实例基于第二读请求,从服务器的云实例的内存读取目标数据。707. The cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the second read request.
服务器的云实例得到第二读请求后,可基于该第二读请求从服务器的云实例的内存读取目标数据。After the cloud instance of the server obtains the second read request, the target data can be read from the memory of the cloud instance of the server based on the second read request.
708、卸载卡通过第一虚拟化设备接收来自第二驱动的目标数据。708. The uninstall card receives the target data from the second driver through the first virtualization device.
服务器的云实例得到目标数据后,可通过第二驱动将目标数据返回给第一虚拟化设备。After the cloud instance of the server obtains the target data, the second driver can return the target data to the first virtualization device.
709、卸载卡通过第一驱动将目标数据发送至第二虚拟化设备。709. The uninstall card sends the target data to the second virtualization device through the first driver.
卸载卡通过第一虚拟化设备接收到目标数据后,通过第一虚拟化设备将目标数据 发送至协议转换模块,使得协议转换模块从存储模块中获取第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系,但不对目标数据进行数据格式的转换,基于该映射关系直接将目标数据发送至异构卡对应的第一驱动,进而通过该第一驱动将目标数据发送至异构卡的第二虚拟化设备,即异构卡成功读取目标数据。至此,TX方向的数据传输过程完成。After receiving the target data through the first virtualization device, the offload card sends the target data to the protocol conversion module through the first virtualization device, so that the protocol conversion module obtains the second data between the first virtualization device and the heterogeneous card from the storage module. The mapping relationship between virtualized devices, but the data format conversion of the target data is not performed. Based on the mapping relationship, the target data is directly sent to the first driver corresponding to the heterogeneous card, and then the target data is sent to the heterogeneous card through the first driver. The second virtualized device that constitutes the card, that is, the heterogeneous card successfully reads the target data. So far, the data transmission process in the TX direction is completed.
例如,若协议转换模块接收到来自virtio-gpu1的目标数据,可从存储模块获取virtio-gpu1与异构卡1的VF1之间的映射关系。确定目标数据是发送至异构卡1的数据后,但不对目标数据进行数据格式的转换。然后,协议转换模块将目标数据发送至异构卡1对应的第一驱动,使得该第一驱动将目标数据发送至VF1。For example, if the protocol conversion module receives the target data from virtio-gpu1, the mapping relationship between virtio-gpu1 and the VF1 of the heterogeneous card 1 can be obtained from the storage module. After it is determined that the target data is the data sent to the heterogeneous card 1, the data format conversion of the target data is not performed. Then, the protocol conversion module sends the target data to the first driver corresponding to the heterogeneous card 1, so that the first driver sends the target data to the VF1.
以上是对TX方向的数据传输过程的第一种模式进行的说明,下文将对第二种模式进行介绍。图8为本申请实施例提供的数据处理的方法的另一流程示意图,如图8所示,该方法包括:The above is the description of the first mode of the data transmission process in the TX direction, and the second mode will be introduced below. FIG. 8 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 8 , the method includes:
801、卸载卡通过第一虚拟化设备,接收来自第二驱动的第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据。801. The uninstall card receives a second sending request from the second driver through the first virtualization device, the second sending request conforms to the format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send the target data .
802、卸载卡将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求。802. The offload card converts the second sending request into a first sending request, where the first sending request conforms to the format requirements of the first protocol.
803、卸载卡通过第一驱动将第一发送请求发送至第二虚拟化设备,以使得异构卡基于第一发送请求,通过第二虚拟化设备向卸载卡发送第一读请求。803. The offload card sends the first sending request to the second virtualization device through the first driver, so that the heterogeneous card sends the first read request to the offload card through the second virtualization device based on the first sending request.
关于步骤701至步骤703的说明,可参考前述步骤801至步骤803的相关说明部分,此处不再赘述。For the description of steps 701 to 703 , reference may be made to the relevant descriptions of the foregoing steps 801 to 803 , which will not be repeated here.
804、卸载卡通过第一虚拟化设备将第二读请求发送至第二驱动。804. The uninstall card sends the second read request to the second driver through the first virtualization device.
卸载卡在将第一发送请求发送至异构卡的第二虚拟化设备后。卸载卡可生成第二读请求,第二读请求符合第二协议的格式要求,且用于指示卸载卡需读取目标数据。然后,卸载卡通过第一虚拟化设备将第二读请求发送至服务器的云实例的第二驱动。After the offload card sends the first sending request to the second virtualization device of the heterogeneous card. The unloading card can generate a second read request, and the second read request conforms to the format requirements of the second protocol and is used to instruct the unloading card to read target data. Then, the offload card sends the second read request to the second driver of the cloud instance of the server through the first virtualization device.
805、服务器的云实例基于第二读请求从服务器的云实例的内存中读取目标数据。805. The cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the second read request.
服务器的云实例得到第二读请求后,则基于第二读请求从服务器的云实例的内存中读取目标数据。After the cloud instance of the server obtains the second read request, the target data is read from the memory of the cloud instance of the server based on the second read request.
806、服务器的云实例通过第二驱动将目标数据发送至第一虚拟化设备。806. The cloud instance of the server sends the target data to the first virtualization device through the second driver.
得到目标数据后,服务器的云实例通过第二驱动将目标数据返回给第一虚拟化设备。After obtaining the target data, the cloud instance of the server returns the target data to the first virtualization device through the second driver.
807、卸载卡将目标数据存储至卸载卡的内存中。807. The uninstall card stores the target data in the memory of the uninstall card.
卸载卡通过第一虚拟化设备接收到目标数据后,将目标数据发送至操作模块(包含在硬件系统中,图5中并未示出),使得操作模块将目标数据存放在卸载卡的存储模块中。After receiving the target data through the first virtualization device, the uninstall card sends the target data to the operation module (included in the hardware system, not shown in FIG. 5 ), so that the operation module stores the target data in the storage module of the uninstall card. middle.
808、卸载卡通过第一驱动接收来自第二虚拟化设备的第一读请求。808. The offload card receives the first read request from the second virtualization device through the first driver.
异构卡接收到第二发送请求后,可确定服务器的云实例即将发送目标数据,故可生成第一读请求,第一读请求符合第一协议的格式要求。然后,异构卡通过第二虚拟化设备将第一读请求发送至卸载卡的第一驱动。After receiving the second sending request, the heterogeneous card can determine that the cloud instance of the server is about to send the target data, so a first read request can be generated, and the first read request conforms to the format requirements of the first protocol. Then, the heterogeneous card sends the first read request to the first driver of the offload card through the second virtualization device.
809、卸载卡基于第一读请求从卸载卡的内存中读取目标数据。809. The offload card reads the target data from the memory of the offload card based on the first read request.
由于卸载卡的存储模块已经预先存储有目标数据,因此,卸载卡的第一驱动接收到第一读请求后,可将第一读请求发送至操作模块,使得操作模块基于第一读请求,将在存储模块中获取目标数据。Since the target data has been pre-stored in the storage module of the uninstall card, after receiving the first read request, the first driver of the uninstall card can send the first read request to the operation module, so that the operation module based on the first read request Get the target data in the storage module.
810、卸载卡通过第一驱动将目标数据发送至第二虚拟化设备。810. The uninstall card sends the target data to the second virtualization device through the first driver.
得到目标数据后,卸载卡通过操作模块将目标数据发送至第一驱动,使得第一驱动将目标数据返回给异构卡的第二虚拟化设备,即异构卡成功读取目标数据。至此,TX方向的数据传输过程完成。After obtaining the target data, the uninstall card sends the target data to the first driver through the operation module, so that the first driver returns the target data to the second virtualization device of the heterogeneous card, that is, the heterogeneous card successfully reads the target data. So far, the data transmission process in the TX direction is completed.
以上是对TX方向的数据传输过程所进行的说明,以下将对RX方向的数据传输过程进行介绍。图9为本申请实施例提供的数据处理的方法的另一流程示意图,如图9所示,该方法包括:The above is the description of the data transmission process in the TX direction, and the following describes the data transmission process in the RX direction. FIG. 9 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 9 , the method includes:
901、卸载卡通过第一驱动接收来自第二虚拟化设备的第一接收请求,第一接收请求符合第一协议的格式要求,且第一接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息。901. The uninstall card receives a first reception request from the second virtualization device through the first driver, the first reception request conforms to the format requirements of the first protocol, and the first reception request is used to instruct the heterogeneous card to request to obtain the cloud instance of the server available memory space information.
经过初始化后,异构卡可主动向服务器的云实例索取可用内存空间信息,从而确定服务器的云实例中的哪一部分内存可用于写入目标数据。具体地,异构卡可先生成第一接收请求,第一接收请求符合第一协议的格式要求,且用于指示异构卡请求获取服务器的云实例的可用内存空间信息。然后,异构卡通过第二虚拟化设备将第一接收请求发送至卸载卡。After initialization, the heterogeneous card can actively request the available memory space information from the cloud instance of the server, so as to determine which part of the memory in the cloud instance of the server can be used for writing target data. Specifically, the heterogeneous card may first generate a first receiving request, the first receiving request conforms to the format requirements of the first protocol, and is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server. Then, the heterogeneous card sends the first reception request to the offload card through the second virtualization device.
902、卸载卡将第一接收请求转换为第二接收请求,第二接收请求符合第二协议的格式要求。902. The uninstall card converts the first receiving request into a second receiving request, where the second receiving request conforms to the format requirements of the second protocol.
903、卸载卡通过第一虚拟化设备将第二接收请求发送至第二驱动。903. The uninstall card sends the second reception request to the second driver through the first virtualization device.
关于步骤902和步骤903的说明,可参考上述步骤705和步骤706的相关说明部分,此处不再赘述。For the description of step 902 and step 903, reference may be made to the relevant description part of the above-mentioned step 705 and step 706, which will not be repeated here.
904、卸载卡通过第一虚拟化设备接收来自第二驱动的可用内存空间信息。904. The uninstall card receives the available memory space information from the second driver through the first virtualization device.
服务器的云实例在得到第二接收请求后,可基于第二接收请求,获取自身的可用内存空间信息。然后,服务器的云实例通过第二驱动将可用内存空间信息返回给第一虚拟化设备。After the cloud instance of the server obtains the second receiving request, it can obtain its own available memory space information based on the second receiving request. Then, the cloud instance of the server returns the available memory space information to the first virtualization device through the second driver.
905、卸载卡通过第一驱动将可用内存空间信息发送至第二虚拟化设备。905. The uninstall card sends the available memory space information to the second virtualization device through the first driver.
卸载卡通过第一虚拟化设备接收到可用内存空间信息后,可通过第一虚拟化设备将可用内存空间信息发送至协议转换模块,使得协议转换模块从存储模块中获取第一虚拟化设备与异构卡的第二虚拟化设备之间的映射关系,但不对可用内存空间信息进行数据格式的转换,基于该映射关系直接将可用内存空间信息发送至异构卡对应的第一驱动,进而通过该第一驱动将可用内存空间信息发送至异构卡的第二虚拟化设备,即异构卡成功获取服务器的云实例的可用内存空间信息。After receiving the available memory space information through the first virtualization device, the unloading card can send the available memory space information to the protocol conversion module through the first virtualization device, so that the protocol conversion module obtains the first virtualization device and the protocol conversion module from the storage module. The mapping relationship between the second virtualization devices of the card is constructed, but the data format conversion of the available memory space information is not performed. Based on the mapping relationship, the available memory space information is directly sent to the first driver corresponding to the heterogeneous card, and then through the The first driver sends the available memory space information to the second virtualization device of the heterogeneous card, that is, the heterogeneous card successfully obtains the available memory space information of the cloud instance of the server.
异构卡得到服务器的云实例的可用内存空间信息后,可基于可用内存空间信息确定要向云实例的哪个内存位置写入目标数据,从而生成第一写请求,第一写请求符合第一协议的格式要求,且用于指示异构卡需写入目标数据。然后,异构卡通过第二虚拟化设备向卸载卡发送第一写请求。After obtaining the available memory space information of the cloud instance of the server, the heterogeneous card can determine which memory location of the cloud instance to write the target data to based on the available memory space information, thereby generating the first write request, which conforms to the first protocol format requirements, and is used to indicate that the heterogeneous card needs to write the target data. Then, the heterogeneous card sends the first write request to the offload card through the second virtualization device.
906、卸载卡通过第一驱动接收来自第二虚拟化设备的第一写请求,第一写请求符合第一协议的格式要求。906. The uninstall card receives, through the first driver, the first write request from the second virtualization device, where the first write request conforms to the format requirement of the first protocol.
907、卸载卡将第一写请求转换为第二写请求,第二写请求符合第二协议的格式要求。907. The offload card converts the first write request into a second write request, where the second write request conforms to the format requirements of the second protocol.
908、卸载卡通过第一虚拟化设备将第二写请求发送至第二驱动。908. The uninstall card sends the second write request to the second driver through the first virtualization device.
909、服务器的云实例基于第二写请求,向服务器的云实例的内存写入目标数据。909. The cloud instance of the server writes the target data to the memory of the cloud instance of the server based on the second write request.
关于步骤906至步骤909的说明,可参考上述步骤704和步骤707的相关说明部分,此处不再赘述。至此,服务器的云实例成功写入目标数据,RX方向的数据传输过程完成。For the description of steps 906 to 909, reference may be made to the relevant descriptions of the above-mentioned steps 704 and 707, which will not be repeated here. So far, the cloud instance of the server has successfully written the target data, and the data transmission process in the RX direction is completed.
本申请实施例提供的服务器系统中,卸载卡连接于服务器和异构卡之间。当服务器系统工作于非直通场景下时,服务器的云实例加载有服务器所支持的第二协议对应的第二驱动,卸载卡加载有异构卡所支持的第一协议对应的第一驱动。具体地,卸载卡通过第一驱动接收来自异构卡的第二虚拟化设备的第一操作请求后,可将第一操作请求转换为第二操作请求,第一操作请求符合第一协议的格式要求,第二操作请求符合第二协议的格式要求。然后,卸载卡通过第一虚拟化设备将第一操作请求发送至服务器的云实例的第二驱动,使得服务器的云实例基于第一操作请求完成相应的操作。因此,在本申请实施例提供的服务器系统中,即使服务器的云实例仅加载第二驱动,也可以实现服务器的云实例与异构卡之间的通信。In the server system provided by the embodiment of the present application, the offload card is connected between the server and the heterogeneous card. When the server system works in a non-passthrough scenario, the cloud instance of the server is loaded with the second driver corresponding to the second protocol supported by the server, and the unloading card is loaded with the first driver corresponding to the first protocol supported by the heterogeneous card. Specifically, after receiving the first operation request from the second virtualization device of the heterogeneous card through the first driver, the uninstall card can convert the first operation request into a second operation request, and the first operation request conforms to the format of the first protocol requirements, the second operation request conforms to the format requirements of the second protocol. Then, the uninstall card sends the first operation request to the second driver of the cloud instance of the server through the first virtualization device, so that the cloud instance of the server completes the corresponding operation based on the first operation request. Therefore, in the server system provided by the embodiments of the present application, even if the cloud instance of the server only loads the second driver, the communication between the cloud instance of the server and the heterogeneous card can be realized.
进一步地,由于卸载卡直接对接异构卡的扩展,故可由卸载卡负责处理异构卡的第二虚拟化设备的管控面,不占用前端服务器的任何额外的资源,能够节省服务器的资源,有利于促进服务器的轻量化。Further, since the offload card directly connects to the expansion of the heterogeneous card, the offload card can be responsible for processing the management and control plane of the second virtualization device of the heterogeneous card, does not occupy any additional resources of the front-end server, and can save the resources of the server. Conducive to promoting the lightweight of the server.
更进一步地,针对安全问题同样能够很好的解决,比如出现虚拟机安全逃逸的异常情况,卸载卡的管理面通过对异常队列通道进行隔离屏蔽,不会对其他虚拟机产生影响,并将异常出错的信息保存在本地内存,在故障恢复后也能立即启动新的工作流程。Furthermore, security problems can also be solved very well. For example, if an abnormal situation occurs when a virtual machine escapes safely, the management plane of the uninstall card isolates and shields the abnormal queue channel, so that it will not affect other virtual machines, and will cause exceptions. Error information is saved in local memory, and a new workflow can be started immediately after failure recovery.
更进一步地,支持软硬协同的卸载卡,可以是以FPGA+CPU的形态存在,充分利用FPGA的动态可重构能力,将引擎模块设计的更加灵活,不仅支持当前所有的虚拟化I/O协议处理,通过修改设计并重加载部分模块的镜像文件,就可以在不改变硬件架构的情况下,支持未来多样化的场景需求。Further, the unloading card that supports software and hardware collaboration can exist in the form of FPGA+CPU, making full use of the dynamic reconfigurability of FPGA, and designing the engine module to be more flexible, not only supporting all current virtualized I/Os For protocol processing, by modifying the design and reloading the image files of some modules, it is possible to support diverse scenarios in the future without changing the hardware architecture.
以上是对非直通场景所进行的具体说明,以下将对直通场景进行介绍。在直通场景中,同样也包含初始化过程和数据传输过程。下面先对直通场景的初始化过程进行介绍。图10为本申请实施例提供的数据处理的方法的另一个流程示意图,如图10所示,该方法包括:The above is a specific description of the non-pass-through scenario, and the pass-through scenario will be introduced below. In the pass-through scenario, the initialization process and the data transmission process are also included. The initialization process of the pass-through scenario is described below. FIG. 10 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 10 , the method includes:
本实施例中,由于服务器与卸载卡的一侧连接,故卸载卡与服务器可同步启动也可异步启动。例如,若卸载卡并未自带电源,则只能在服务器开机启动后,由服务器控制卸载卡启动。又如,若卸载卡自带电源,则服务器和卸载卡同分别通过自身的电源实现同步启动等等,此处不做限制。In this embodiment, since the server is connected to one side of the uninstall card, the uninstall card and the server can be started synchronously or asynchronously. For example, if the unloading card does not have its own power supply, the server can only control the unloading card to start after the server is powered on. For another example, if the unloading card has its own power supply, the server and the unloading card can be started synchronously through their own power supplies, etc., which is not limited here.
1000、服务器和卸载卡在确定异构卡启动后,均加载第一驱动。1000. After determining that the heterogeneous card is activated, the server and the unloading card both load the first driver.
当服务器和卸载卡均确定异构卡启动后,服务器和服务器的云实例均可加载异构 卡所支持的第一协议对应的第一驱动,同理,卸载卡也可通过初始化模块加载异构卡所支持的第一协议对应的第一驱动。When both the server and the unloading card determine that the heterogeneous card is started, both the server and the cloud instance of the server can load the first driver corresponding to the first protocol supported by the heterogeneous card. Similarly, the unloading card can also load the heterogeneous card through the initialization module. The first driver corresponding to the first protocol supported by the card.
1001、卸载卡通过直通通道接收来自服务器的云实例的第一驱动的初始化请求。1001. The uninstall card receives an initialization request of the first driver of the cloud instance from the server through the pass-through channel.
当卸载卡工作在直通场景下时,卸载卡的直通通道(即图5中的PF bypass)的一端直通至服务器的云实例,另一端直通至异构卡,即卸载卡可通过直通通道,将来自服务器的云实例的信息直接透传至异构卡,或将来自异构卡的信息直接透传至服务器的云实例。When the offload card works in the pass-through scenario, one end of the pass-through channel of the off-load card (that is, the PF bypass in Figure 5) is directly connected to the cloud instance of the server, and the other end is directly connected to the heterogeneous card. The information from the cloud instance of the server is directly transparently transmitted to the heterogeneous card, or the information from the heterogeneous card is directly transparently transmitted to the cloud instance of the server.
具体地,在服务器的云实例加载第一驱动后,可向卸载卡的直通通道发送初始化请求。Specifically, after the cloud instance of the server loads the first driver, an initialization request may be sent to the pass-through channel of the unload card.
1002、卸载卡通过卸载卡的第一驱动将初始化请求发送至异构卡。1002. The uninstall card sends an initialization request to the heterogeneous card through the first driver of the uninstall card.
卸载卡通过直通通道接收到初始化请求后,可通过直通通道将初始化请求发送至卸载卡的第一驱动,以使得卸载卡的第一驱动将初始化请求发送至异构卡。After receiving the initialization request through the pass-through channel, the unload card can send the initialization request to the first driver of the unload card through the pass-through channel, so that the first driver of the unload card sends the initialization request to the heterogeneous card.
1003、异构卡基于初始化请求,向卸载卡的第一驱动发送异构卡的设备信息。1003. Based on the initialization request, the heterogeneous card sends the device information of the heterogeneous card to the first driver that uninstalls the card.
异构卡接收到初始化请求后,可开始进行初始化。在完成初始化后,可向卸载卡的第一驱动返回异构卡的设备信息。其中,异构卡的设备信息包含异构卡的ID、设备类型等等信息。After receiving the initialization request, the heterogeneous card can start to initialize. After the initialization is completed, the device information of the heterogeneous card may be returned to the first driver that uninstalls the card. The device information of the heterogeneous card includes information such as ID, device type and the like of the heterogeneous card.
1004、卸载卡在通过卸载卡的第一驱动接收异构卡的设备信息后,通过直通通道将异构卡的设备信息发送至服务器的云实例的第一驱动。1004. After receiving the device information of the heterogeneous card through the first driver of the uninstall card, the uninstall card sends the device information of the heterogeneous card to the first driver of the cloud instance of the server through the pass-through channel.
卸载卡通过卸载卡的第一驱动接收异构卡的设备信息后,可通过卸载卡的第一驱动将异构卡的设备信息发送至直通通道,使得直通通道将异构卡的设备信息返回至服务器的云实例的第一驱动,即服务器的云实例得到异构卡的设备信息。至此,则完成直通场景下的初始化过程。After the unloading card receives the device information of the heterogeneous card through the first driver of the unloading card, it can send the device information of the heterogeneous card to the pass-through channel through the first driver of the unloading card, so that the pass-through channel returns the device information of the heterogeneous card to the The first driver of the cloud instance of the server, that is, the cloud instance of the server obtains the device information of the heterogeneous card. So far, the initialization process in the pass-through scenario is completed.
在直通场景中,数据传输过程同样也包含TX方向的数据传输过程和RX方向的数据传输过程。TX方向的数据传输过程包含两种模式,下文先对第一种模式进行介绍。图11为本申请实施例提供的数据处理的方法的另一流程示意图,如图11所示,该方法包括:In the cut-through scenario, the data transmission process also includes a data transmission process in the TX direction and a data transmission process in the RX direction. The data transmission process in the TX direction includes two modes, and the first mode is introduced first. FIG. 11 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 11 , the method includes:
1101、卸载卡通过直通通道接收来自服务器的云实例的第一驱动的发送请求,发送请求符合第一协议的格式要求,且发送请求用于指示服务器的云实例即将发送目标数据。1101. The offload card receives a sending request from the first driver of the cloud instance of the server through the pass-through channel, the sending request conforms to the format requirements of the first protocol, and the sending request is used to indicate that the cloud instance of the server is about to send the target data.
经过初始化后,由于异构卡通过卸载卡内部的直通通道直通至服务器的云实例,故对服务器一侧而言,服务器的云实例可直接看到异构卡。当服务器的云实例需要向异构卡发送目标数据时,可生成发送请求,该发送请求符合第一协议的格式,且用于指示服务器的云实例即将发送目标数据。然后,服务器的云实例通过自身的第一驱动将发送请求发送至卸载卡的直通通道。After initialization, since the heterogeneous card is directly connected to the cloud instance of the server through the pass-through channel inside the unloading card, on the server side, the cloud instance of the server can directly see the heterogeneous card. When the cloud instance of the server needs to send the target data to the heterogeneous card, a sending request can be generated, and the sending request conforms to the format of the first protocol and is used to indicate that the cloud instance of the server is about to send the target data. Then, the cloud instance of the server sends the sending request to the pass-through channel of the offload card through its own first driver.
1102、卸载卡通过卸载卡的第一驱动将发送请求发送至异构卡。1102. The uninstall card sends a sending request to the heterogeneous card through the first driver of the uninstall card.
卸载卡通过直通通道接收到发送请求后,可通过直通通道将发送请求发送至卸载卡的第一驱动,以使得卸载卡的第一驱动将发送请求发送至异构卡。After receiving the sending request through the pass-through channel, the unloading card can send the sending request to the first driver of the unloading card through the pass-through channel, so that the first driver of the unloading card sends the sending request to the heterogeneous card.
1103、异构卡基于发送请求,向卸载卡的第一驱动发送读请求,读请求符合第一协议的格式要求。1103. Based on the sending request, the heterogeneous card sends a read request to the first driver for unloading the card, where the read request conforms to the format requirements of the first protocol.
异构卡接收到发送请求后,可基于发送请求确定服务器的云实例即将发送目标数据,故异构卡生成读请求,该读请求符合第一协议的格式要求,且用于指示异构卡需读取目标数据。然后,异构卡将读请求发送至卸载卡的第一驱动。After the heterogeneous card receives the sending request, it can determine based on the sending request that the cloud instance of the server is about to send the target data, so the heterogeneous card generates a read request, which conforms to the format requirements of the first protocol and is used to indicate that the heterogeneous card needs to send the target data. Read target data. Then, the heterogeneous card sends a read request to the first driver of the offload card.
1104、卸载卡通过直通通道,将读请求发送至服务器的云实例的第一驱动。1104. The uninstall card sends the read request to the first driver of the cloud instance of the server through the pass-through channel.
卸载卡通过卸载卡的第一驱动接收异构卡的读请求后,可通过卸载卡的第一驱动将读请求发送至直通通道,使得直通通道将读请求发送至服务器的云实例的第一驱动。After the uninstall card receives the read request of the heterogeneous card through the first driver of the uninstall card, it can send the read request to the pass-through channel through the first driver of the unload card, so that the pass-through channel sends the read request to the first driver of the cloud instance of the server .
1105、服务器的云实例基于读请求,从服务器的云实例的内存读取目标数据。1105. The cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the read request.
服务器的云实例得到读请求后,基于读请求从自身的内存读取目标数据。After the cloud instance of the server receives the read request, it reads the target data from its own memory based on the read request.
1106、卸载卡通过直通通道接收来自服务器的云实例的第一驱动的目标数据。1106. The offload card receives the target data of the first driver of the cloud instance from the server through the pass-through channel.
服务器的云实例得到目标数据后,可通过自身的第一驱动将目标数据发送至卸载卡的直通通道。After the cloud instance of the server obtains the target data, it can send the target data to the direct channel of the offload card through its own first driver.
1107、卸载卡通过卸载卡的第一驱动将目标数据发送至异构卡。1107. The uninstall card sends the target data to the heterogeneous card through the first driver of the uninstall card.
卸载卡通过直通通道接收到目标数据后,可通过直通通道将目标数据发送至卸载卡的第一驱动,以使得卸载卡的第一驱动将目标数据发送至异构卡,即异构卡成功读取目标数据。至此,TX方向的数据传输过程完成。After the unloading card receives the target data through the pass-through channel, it can send the target data to the first driver of the unloading card through the pass-through channel, so that the first driver of the unloading card sends the target data to the heterogeneous card, that is, the heterogeneous card is successfully read. Get the target data. So far, the data transmission process in the TX direction is completed.
以上是对TX方向的数据传输过程的第一种模式进行的说明,下文将对第二种模式进行介绍。图12为本申请实施例提供的数据处理的方法的另一流程示意图,如图12所示,该方法包括:The above is the description of the first mode of the data transmission process in the TX direction, and the second mode will be introduced below. FIG. 12 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 12 , the method includes:
1201、卸载卡通过直通通道接收来自服务器的云实例的第一驱动的发送请求,发送请求符合第一协议的格式要求,且发送请求用于指示服务器的云实例即将发送目标数据。1201. The uninstall card receives a sending request from the first driver of the cloud instance of the server through the pass-through channel, the sending request conforms to the format requirements of the first protocol, and the sending request is used to indicate that the cloud instance of the server is about to send the target data.
1202、卸载卡通过卸载卡的第一驱动将发送请求发送至异构卡。1202. The uninstall card sends a sending request to the heterogeneous card through the first driver of the uninstall card.
关于步骤1201至步骤1202的说明,可参考上述步骤1101和步骤1102的相关说明部分,此处不再赘述。For the description of steps 1201 to 1202, reference may be made to the relevant descriptions of the above-mentioned steps 1101 and 1102, which will not be repeated here.
1203、卸载卡还用于通过直通通道将读请求发送至服务器的云实例的第一驱动。1203. The offload card is further configured to send the read request to the first driver of the cloud instance of the server through the pass-through channel.
卸载卡将发送请求发送至异构卡后,可先生成读请求,读请求符合第一协议的格式要求,且用于指示卸载卡需读取目标数据。然后,卸载卡通过直通通道将读请求发送至服务器的云实例的第一驱动。After the unloading card sends the sending request to the heterogeneous card, a read request can be generated first, and the read request conforms to the format requirements of the first protocol and is used to instruct the unloading card to read target data. Then, the offload card sends the read request to the first driver of the cloud instance of the server through the pass-through channel.
1204、服务器的云实例基于来自卸载卡的读请求从服务器的云实例的内存中读取目标数据。1204. The cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the read request from the offload card.
1205、卸载卡通过直通通道接收来自服务器的云实例的第一驱动的目标数据。1205. The offload card receives the target data of the first driver of the cloud instance from the server through the pass-through channel.
关于步骤1204至步骤1205的说明,可参考上述步骤1105和步骤1106的相关说明部分,此处不再赘述。For the description of steps 1204 to 1205, reference may be made to the relevant descriptions of the above-mentioned steps 1105 and 1106, which will not be repeated here.
1206、卸载卡将目标数据存储至卸载卡的内存中。1206. The uninstall card stores the target data in the memory of the uninstall card.
卸载卡通过直通通道接收到目标数据后,可通过直通通道将目标数据发送至卸载卡的操作模块,使得操作模块将目标数据存储至卸载卡的内存中。After the unloading card receives the target data through the pass-through channel, it can send the target data to the operation module of the unloading card through the pass-through channel, so that the operation module stores the target data in the memory of the unloading card.
1207、卸载卡通过卸载卡的第一驱动接收来自异构卡的读请求。1207. The uninstall card receives a read request from the heterogeneous card through the first driver of the uninstall card.
异构卡接收到发送请求后,可基于发送请求确定服务器的云实例即将发送目标数据,故异构卡生成读请求,该读请求符合第一协议的格式要求,且用于指示异构卡需 读取目标数据。然后,异构卡将读请求发送至卸载卡的第一驱动。After the heterogeneous card receives the sending request, it can determine based on the sending request that the cloud instance of the server is about to send the target data, so the heterogeneous card generates a read request, which conforms to the format requirements of the first protocol and is used to indicate that the heterogeneous card needs to send the target data. Read target data. Then, the heterogeneous card sends a read request to the first driver of the offload card.
1208、卸载卡基于来自异构卡的读请求从卸载卡的内存中读取目标数据。1208. The offload card reads the target data from the memory of the offload card based on the read request from the heterogeneous card.
卸载卡通过卸载卡的第一驱动接收来自异构卡的读请求后,由于卸载卡的内存存储有目标数据,故可通过第一驱动将该读请求发送至操作模块,使得操作模块基于该读请求从卸载卡的内存中读取目标数据。After the unloading card receives the read request from the heterogeneous card through the first driver of the unloading card, since the target data is stored in the memory of the unloading card, the read request can be sent to the operation module through the first driver, so that the operation module is based on the read request. Request to read target data from the memory of the offload card.
1209、卸载卡通过卸载卡的第一驱动将目标数据发送至异构卡。1209. The uninstall card sends the target data to the heterogeneous card through the first driver of the uninstall card.
卸载卡的操作模块得到目标数据后,则将目标数据发送至卸载卡的第一驱动,使得第一驱动将目标数据发送至异构卡,即异构卡成功读取目标数据。至此,TX方向的数据传输过程完成。After the operation module of the uninstall card obtains the target data, it sends the target data to the first driver of the uninstall card, so that the first driver sends the target data to the heterogeneous card, that is, the heterogeneous card successfully reads the target data. So far, the data transmission process in the TX direction is completed.
以上是对TX方向的数据传输过程所进行的说明,以下将对RX方向的数据传输过程进行介绍。图13为本申请实施例提供的数据处理的方法的另一流程示意图,如图13所示,该方法包括:The above is the description of the data transmission process in the TX direction, and the following describes the data transmission process in the RX direction. FIG. 13 is another schematic flowchart of a data processing method provided by an embodiment of the present application. As shown in FIG. 13 , the method includes:
1301、卸载卡通过卸载卡的第一驱动接收来自异构卡的接收请求,接收请求符合第一协议的格式要求,且接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息。1301. The uninstall card receives a reception request from the heterogeneous card through the first driver of the uninstall card, the reception request conforms to the format requirements of the first protocol, and the reception request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server .
经过初始化后,异构卡可主动向服务器的云实例索取可用内存空间信息,从而确定服务器的云实例中的哪一部分内存可用于写入目标数据。具体地,异构卡可先生成接收请求,接收请求符合第一协议的格式要求,且用于指示异构卡请求获取服务器的云实例的可用内存空间信息。然后,异构卡将第一接收请求发送至卸载卡。After initialization, the heterogeneous card can actively request available memory space information from the cloud instance of the server, so as to determine which part of the memory in the cloud instance of the server can be used for writing target data. Specifically, the heterogeneous card may first generate a receiving request, the receiving request conforms to the format requirements of the first protocol, and is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server. Then, the heterogeneous card sends the first reception request to the offload card.
1302、卸载卡通过直通通道将接收请求发送至服务器的云实例的第一驱动。1302. The uninstall card sends the receiving request to the first driver of the cloud instance of the server through the pass-through channel.
卸载卡通过卸载卡的第一驱动接收来异构卡的接收请求后,可通过卸载卡的第一驱动将接收请求发送至直通通道,使得直通通道将接收请求发送至服务器的云实例的第一驱动。After the unloading card receives the receiving request of the heterogeneous card through the first driver of the unloading card, it can send the receiving request to the pass-through channel through the first driver of the unloading card, so that the pass-through channel sends the receiving request to the first server of the cloud instance of the server. drive.
1303、卸载卡通过直通通道接收来自服务器的云实例的第一驱动的可用内存空间信息。1303. The uninstall card receives the information about the available memory space of the first driver of the cloud instance from the server through the pass-through channel.
服务器的云实例得到接收请求后,可基于接收请求获取自身的可用内存空间信息。然后,服务器的云实例通过自身的第一驱动将可用内存空间信息发送至卸载卡的直通通道。After the cloud instance of the server receives the receiving request, it can obtain its own available memory space information based on the receiving request. Then, the cloud instance of the server sends the available memory space information to the pass-through channel of the offload card through its own first driver.
1304、卸载卡通过卸载卡的第一驱动将可用内存空间信息发送至异构卡。1304. The uninstall card sends the available memory space information to the heterogeneous card through the first driver of the uninstall card.
卸载卡通过直通通道接收到可用内存空间信息后,可通过直通通道将可用内存空间信息发送至卸载卡的第一驱动,以使得卸载卡的第一驱动将可用内存空间信息发送至异构卡。After receiving the available memory space information through the pass-through channel, the unloading card can send the available memory space information to the first driver of the unloading card through the pass-through channel, so that the first driver of the unloading card sends the available memory space information to the heterogeneous card.
1305、异构卡基于可用内存空间信息,向卸载卡发送写请求,写请求符合第一协议的格式要求。1305. The heterogeneous card sends a write request to the unloading card based on the available memory space information, and the write request meets the format requirements of the first protocol.
异构卡得到可用内存空间信息后,可基于可用内存空间信息确定要向云实例的哪个内存位置写入目标数据,从而生成写请求,写请求符合第一协议的格式要求,且用于指示异构卡需写入目标数据。然后,异构卡向卸载卡发送写请求。After obtaining the available memory space information, the heterogeneous card can determine which memory location of the cloud instance to write the target data to based on the available memory space information, thereby generating a write request. The write request conforms to the format requirements of the first protocol and is used to indicate the The composition card needs to write the target data. Then, the heterogeneous card sends a write request to the offload card.
1306、卸载卡通过直通通道,将写请求发送至服务器的云实例的第一驱动。1306. The uninstall card sends the write request to the first driver of the cloud instance of the server through the pass-through channel.
1307、服务器的云实例基于写请求,向服务器的云实例的内存写入目标数据。1307. Based on the write request, the cloud instance of the server writes the target data to the memory of the cloud instance of the server.
关于步骤1306至步骤1307的说明,可参考上述步骤1104和步骤1105的相关说明部分,此处不再赘述。至此,服务器的云实例成功写入目标数据,RX方向的数据传输过程完成。For the description of steps 1306 to 1307, reference may be made to the relevant descriptions of the above-mentioned steps 1104 and 1105, which will not be repeated here. So far, the cloud instance of the server has successfully written the target data, and the data transmission process in the RX direction is completed.
本申请实施例提供的服务器系统中,卸载卡连接于服务器和异构卡之间。当服务器系统工作于直通场景下时,服务器的云实例和卸载卡均加载有异构卡所支持的第一协议对应的第一驱动。具体地,卸载卡在通过第一驱动接收来自异构卡的操作请求后,卸载卡通过直通通道将操作请求发送至服务器的云实例的第一驱动,使得服务器的云实例基于操作请求完成相应的操作。因此,卸载卡可作为服务器的云实例以及异构卡之间的桥梁,提供两者之间的直通通道,从而实现服务器的云实例与异构卡之间的通信。In the server system provided by the embodiment of the present application, the offload card is connected between the server and the heterogeneous card. When the server system works in the pass-through scenario, both the cloud instance of the server and the offload card are loaded with the first driver corresponding to the first protocol supported by the heterogeneous card. Specifically, after the uninstall card receives the operation request from the heterogeneous card through the first driver, the uninstall card sends the operation request to the first driver of the cloud instance of the server through the pass-through channel, so that the cloud instance of the server completes the corresponding operation request based on the operation request. operate. Therefore, the offload card can be used as a bridge between the cloud instance of the server and the heterogeneous card, providing a direct channel between the two, so as to realize the communication between the cloud instance of the server and the heterogeneous card.
图14为本申请实施例提供的卸载卡的另一个结构示意图,如图14所示,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接,卸载卡包括:记录模块1401,用于记录卸载卡的第一虚拟化设备与异构卡的第二虚拟化设备的映射关系,通信模块1402,用于根据映射关系实现服务器的云实例与异构卡的第二虚拟化设备之间的通信,其中,卸载卡的第一虚拟化设备直通至服务器的云实例,异构卡的第二虚拟设备直通至卸载卡。FIG. 14 is another schematic structural diagram of the unloading card provided by the embodiment of the application. As shown in FIG. 14 , one end of the unloading card is connected to the server, and the other end of the unloading card is connected to the heterogeneous card. The unloading card includes: a recording module 1401, For recording the mapping relationship between the first virtualization device of the uninstall card and the second virtualization device of the heterogeneous card, the communication module 1402 is used to realize the relationship between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship. Communication between the two, wherein the first virtual device of the offload card is directly connected to the cloud instance of the server, and the second virtual device of the heterogeneous card is directly connected to the offload card.
在一种可能的实现方式中,服务器包括第一接口,卸载卡包括第二接口和第三接口,异构卡包括第四接口;第一接口与第二接口连接,第三接口和第四接口连接。In a possible implementation manner, the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface; the first interface is connected to the second interface, and the third interface and the fourth interface connect.
在一种可能的实现方式中,服务器系统还包括扩展卡,服务器包括第一接口,扩展卡包括第二接口、第三接口、第四接口和第五接口,卸载卡包括第六接口和第七接口,异构卡包括第八接口;第一接口和第二接口连接,第二接口和第三接口连接,第四接口和第五接口连接,第六接口和第三接口连接,第七接口和第四接口连接,第八接口和第五接口连接。In a possible implementation manner, the server system further includes an expansion card, the server includes a first interface, the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface, and the uninstall card includes a sixth interface and a seventh interface Interface, the heterogeneous card includes an eighth interface; the first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, the sixth interface is connected to the third interface, and the seventh interface is connected to The fourth interface is connected, and the eighth interface is connected with the fifth interface.
在一种可能的实现方式中,异构卡支持第一协议,卸载卡加载有与第一协议对应的第一驱动,服务器支持第二协议,且服务器的云实例加载有与第二协议对应的第二驱动;通信模块1402具体用于:通过第一驱动接收来自第二虚拟化设备的第一操作请求,第一操作请求符合第一协议的格式要求;将第一操作请求转换为第二操作请求,第二操作请求符合第二协议的格式要求;通过第一虚拟化设备将第二操作请求发送至第二驱动,以使得服务器的云实例基于第二操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。In a possible implementation manner, the heterogeneous card supports the first protocol, the unloading card is loaded with the first driver corresponding to the first protocol, the server supports the second protocol, and the cloud instance of the server is loaded with the first driver corresponding to the second protocol The second driver; the communication module 1402 is specifically configured to: receive the first operation request from the second virtualization device through the first driver, the first operation request conforms to the format requirements of the first protocol; convert the first operation request into the second operation request, the second operation request conforms to the format requirements of the second protocol; the second operation request is sent to the second driver through the first virtualization device, so that the cloud instance of the server based on the second operation request, from the memory of the cloud instance of the server Read target data or write target data to the server's cloud instance's memory.
在一种可能的实现方式中,卸载卡包括支持第二协议的引擎模块;记录模块1401具体用于:在确定异构卡启动后,加载第一驱动;通过第一驱动获取异构卡的设备信息;基于配置信息将引擎模块配置为第一虚拟化设备,配置信息为预置的信息;通过第一虚拟化设备接收来自第二驱动的枚举结果,枚举结果用于指示服务器的云实例已检测到第一虚拟化设备;基于设备信息和枚举结果构建异构卡的第二虚拟化设备与卸载卡的第一虚拟化设备之间的映射关系。In a possible implementation manner, the unloading card includes an engine module supporting the second protocol; the recording module 1401 is specifically configured to: load the first driver after determining that the heterogeneous card is started; obtain the device of the heterogeneous card through the first driver information; configure the engine module as the first virtualization device based on the configuration information, and the configuration information is preset information; receive the enumeration result from the second driver through the first virtualization device, and the enumeration result is used to indicate the cloud instance of the server The first virtualized device has been detected; the mapping relationship between the second virtualized device of the heterogeneous card and the first virtualized device of the unloaded card is constructed based on the device information and the enumeration result.
在一种可能的实现方式中,若第一操作请求为第一读请求,则通信模块1402具体用于:通过第一虚拟化设备,接收来自第二驱动的第二发送请求,第二发送请求符合第二协议的格式要求,且第二发送请求用于指示服务器的云实例即将发送目标数据; 将第二发送请求转换为第一发送请求,第一发送请求符合第一协议的格式要求;通过第一驱动将第一发送请求发送至第二虚拟化设备,以使得异构卡基于第一发送请求,通过第二虚拟化设备向卸载卡发送第一读请求。In a possible implementation manner, if the first operation request is the first read request, the communication module 1402 is specifically configured to: receive, through the first virtualization device, a second sending request from the second driver, and the second sending request The format requirements of the second protocol are met, and the second sending request is used to indicate that the cloud instance of the server is about to send the target data; the second sending request is converted into a first sending request, and the first sending request meets the format requirements of the first protocol; The first driver sends the first sending request to the second virtualization device, so that the heterogeneous card sends the first read request to the offload card through the second virtualization device based on the first sending request.
在一种可能的实现方式中,通信模块1402具体用于:通过第一虚拟化设备接收来自第二驱动的目标数据;通过第一驱动将目标数据发送至第二虚拟化设备。In a possible implementation manner, the communication module 1402 is specifically configured to: receive the target data from the second driver through the first virtualization device; and send the target data to the second virtualization device through the first driver.
在一种可能的实现方式中,若第一操作请求为第一读请求,第二操作请求为第二读请求,则通信模块1402还用于:通过第一虚拟化设备将第二读请求发送至第二驱动,以使得服务器的云实例基于第二读请求从服务器的云实例的内存中读取目标数据,并传输至第一虚拟化设备;将目标数据存储至卸载卡的内存中;通过第一驱动接收来自第二虚拟化设备的第一读请求;基于第一读请求从卸载卡的内存中读取目标数据;通过第一驱动将目标数据发送至第二虚拟化设备。In a possible implementation manner, if the first operation request is a first read request and the second operation request is a second read request, the communication module 1402 is further configured to: send the second read request through the first virtualization device to the second driver, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server based on the second read request, and transmits it to the first virtualization device; stores the target data in the memory of the offload card; The first driver receives the first read request from the second virtualization device; reads the target data from the memory of the offload card based on the first read request; sends the target data to the second virtualization device through the first driver.
在一种可能的实现方式中,若第一操作请求为第一写请求,则通信模块1402具体用于:通过第一驱动接收来自第二虚拟化设备的第一接收请求,第一接收请求符合第一协议的格式要求,且第一接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;将第一接收请求转换为第二接收请求,第二接收请求符合第二协议的格式要求;通过第一虚拟化设备将第二接收请求发送至第二驱动;通过第一虚拟化设备接收来自第二驱动的可用内存空间信息;通过第一驱动将可用内存空间信息发送至第二虚拟化设备,以使得异构卡基于可用内存空间信息,通过第二虚拟化设备向卸载卡发送第一写请求。In a possible implementation manner, if the first operation request is the first write request, the communication module 1402 is specifically configured to: receive the first receive request from the second virtualization device through the first driver, and the first receive request conforms to the The format requirements of the first protocol, and the first receiving request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; the first receiving request is converted into a second receiving request, and the second receiving request conforms to the second protocol. send the second receiving request to the second driver through the first virtualization device; receive the available memory space information from the second driver through the first virtualization device; send the available memory space information to the second driver through the first virtual device The second virtualization device enables the heterogeneous card to send a first write request to the offload card through the second virtualization device based on the available memory space information.
图15为本申请实施例提供的卸载卡的另一个结构示意图,如图15所示,卸载卡的一端与服务器连接,卸载卡的另一端与异构卡连接,异构卡支持第一协议,服务器和卸载卡均加载有与第一协议对应的第一驱动;卸载卡包括:通信模块1501,用于通过卸载卡的第一驱动接收来自异构卡的操作请求,操作请求符合第一协议的格式要求;通信模块1501还用于通过直通通道将操作请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于操作请求,从服务器的云实例的内存读取目标数据或向服务器的云实例的内存写入目标数据。FIG. 15 is another schematic structural diagram of the uninstall card provided by the embodiment of the application. As shown in FIG. 15 , one end of the uninstall card is connected to the server, the other end of the uninstall card is connected to the heterogeneous card, and the heterogeneous card supports the first protocol. Both the server and the unloading card are loaded with a first driver corresponding to the first protocol; the unloading card includes: a communication module 1501 for receiving an operation request from the heterogeneous card through the first driver of the unloading card, the operation request conforming to the first protocol Format requirements; the communication module 1501 is further configured to send the operation request to the first driver of the cloud instance of the server through the pass-through channel, so that the cloud instance of the server reads the target data from the memory of the cloud instance of the server or sends the target data to the server based on the operation request. The memory of the cloud instance writes the target data.
在一种可能的实现方式中,服务器包括第一接口,卸载卡包括第二接口和第三接口,异构卡包括第四接口;第一接口与第二接口连接,第三接口和第四接口连接。In a possible implementation manner, the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface; the first interface is connected to the second interface, and the third interface and the fourth interface connect.
在一种可能的实现方式中,服务器系统还包括扩展卡,服务器包括第一接口,扩展卡包括第二接口、第三接口、第四接口和第五接口,卸载卡包括第六接口和第七接口,异构卡包括第八接口;第一接口和第二接口连接,第二接口和第三接口连接,第四接口和第五接口连接,第六接口和第三接口连接,第七接口和第四接口连接,第八接口和第五接口连接。In a possible implementation manner, the server system further includes an expansion card, the server includes a first interface, the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface, and the uninstall card includes a sixth interface and a seventh interface Interface, the heterogeneous card includes an eighth interface; the first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, the sixth interface is connected to the third interface, and the seventh interface is connected to The fourth interface is connected, and the eighth interface is connected with the fifth interface.
在一种可能的实现方式中,通信模块1501还用于:通过直通通道接收来自服务器的云实例的第一驱动的初始化请求;通过卸载卡的第一驱动将初始化请求发送至异构卡,以使得异构卡基于初始化请求,向卸载卡的第一驱动发送异构卡的设备信息;在通过卸载卡的第一驱动接收异构卡的设备信息后,通过直通通道将异构卡的设备信息发送至服务器的云实例的第一驱动。In a possible implementation manner, the communication module 1501 is further configured to: receive an initialization request from the first driver of the cloud instance of the server through the direct channel; send the initialization request to the heterogeneous card by uninstalling the first driver of the card to Make the heterogeneous card send the device information of the heterogeneous card to the first driver of the unload card based on the initialization request; after receiving the device information of the heterogeneous card through the first driver of the unload card, send the device information of the heterogeneous card through the pass-through channel The first driver of the cloud instance sent to the server.
在一种可能的实现方式中,若操作请求为读请求,则通信模块1501还用于:通过 直通通道,接收来自服务器的云实例的第一驱动的发送请求,发送请求符合第一协议的格式要求,且发送请求用于指示服务器的云实例即将发送目标数据;通过卸载卡的第一驱动将发送请求发送至异构卡,以使得异构卡基于发送请求,向卸载卡的第一驱动发送读请求。In a possible implementation manner, if the operation request is a read request, the communication module 1501 is further configured to: receive a sending request from the first driver of the cloud instance of the server through the pass-through channel, and send the request in a format that conforms to the first protocol request, and the sending request is used to indicate that the cloud instance of the server is about to send the target data; the sending request is sent to the heterogeneous card through the first driver of the offload card, so that the heterogeneous card sends the request to the first driver of the offload card based on the sending request read request.
在一种可能的实现方式中,通信模块1501还用于:通过直通通道接收来自服务器的云实例的第一驱动的目标数据;通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, the communication module 1501 is further configured to: receive target data from the first driver of the cloud instance of the server through the pass-through channel; and send the target data to the heterogeneous card by uninstalling the first driver of the card.
在一种可能的实现方式中,通信模块1501还用于:通过直通通道将读请求发送至服务器的云实例的第一驱动,以使得服务器的云实例基于卸载卡的读请求从服务器的云实例的内存中读取目标数据,并通过服务器的云实例的第一驱动将目标数据发送至直通通道;将目标数据存储至卸载卡的内存中;通过卸载卡的第一驱动接收来自异构卡的读请求;基于异构卡的读请求从卸载卡的内存中读取目标数据;通过卸载卡的第一驱动将目标数据发送至异构卡。In a possible implementation manner, the communication module 1501 is further configured to: send the read request to the first driver of the cloud instance of the server through the pass-through channel, so that the cloud instance of the server can download the read request from the cloud instance of the server based on the read request of the offload card. Read the target data in the memory of the server, and send the target data to the pass-through channel through the first driver of the cloud instance of the server; store the target data in the memory of the offload card; receive the data from the heterogeneous card through the first driver of the offload card read request; read target data from the memory of the unloaded card based on the read request of the heterogeneous card; send the target data to the heterogeneous card through the first driver of the unloaded card.
在一种可能的实现方式中,若操作请求为写请求,则通信模块1501还用于:通过卸载卡的第一驱动接收来自异构卡的接收请求,接收请求符合第一协议的格式要求,且接收请求用于指示异构卡请求获取服务器的云实例的可用内存空间信息;通过直通通道将接收请求发送至服务器的云实例的第一驱动;通过直通通道接收来自服务器的云实例的第一驱动的可用内存空间信息;通过卸载卡的第一驱动将可用内存空间信息发送至异构卡,以使得异构卡基于可用内存空间信息,向卸载卡发送写请求。In a possible implementation manner, if the operation request is a write request, the communication module 1501 is further configured to: receive a reception request from the heterogeneous card through the first driver of the uninstall card, and the reception request conforms to the format requirements of the first protocol, And the receiving request is used to instruct the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server; send the receiving request to the first driver of the cloud instance of the server through the pass-through channel; receive the first driver of the cloud instance from the server through the pass-through channel. The information of the available memory space of the driver; the information of the available memory space is sent to the heterogeneous card through the first driver of the unloading card, so that the heterogeneous card sends a write request to the unloading card based on the information of the available memory space.
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其带来的技术效果与本申请方法实施例相同,具体内容可参考本申请实施例前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that the information exchange, execution process and other contents among the modules/units of the above-mentioned apparatus are based on the same concept as the method embodiments of the present application, and the technical effects brought by them are the same as those of the method embodiments of the present application, and the specific contents can be Reference is made to the descriptions in the method embodiments shown in the foregoing embodiments of the present application, which will not be repeated here.
图16为本申请实施例提供的卸载卡的一个结构示意图。如图16所示,本申请实施例中卸载卡一个实施例可以包括一个或一个以上中央处理器1601,存储器1602,输入输出接口1603,有线或无线网络接口1604,电源1605。FIG. 16 is a schematic structural diagram of an unloading card provided by an embodiment of the present application. As shown in FIG. 16 , one embodiment of the offload card in this embodiment of the present application may include one or more central processing units 1601 , a memory 1602 , an input/output interface 1603 , a wired or wireless network interface 1604 , and a power supply 1605 .
存储器1602可以是短暂存储或持久存储。更进一步地,中央处理器1601可以配置为与存储器1602通信,在卸载卡上执行存储器1602中的一系列指令操作。The memory 1602 may be ephemeral storage or persistent storage. Furthermore, the central processing unit 1601 may be configured to communicate with the memory 1602 to execute a series of instruction operations in the memory 1602 on the offload card.
本实施例中,中央处理器1601可以执行前述图6至图13所示实施例中卸载卡所执行的操作,具体此处不再赘述。In this embodiment, the central processing unit 1601 may perform the operations performed by the unloading card in the foregoing embodiments shown in FIG. 6 to FIG. 13 , and details are not repeated here.
本实施例中,中央处理器1601中的具体功能模块划分可以与前述图14中所描述的记录模块和通信模块等模块的划分方式类似,此处不再赘述。In this embodiment, the division of specific functional modules in the central processing unit 1601 may be similar to the division of modules such as the recording module and the communication module described above in FIG. 14 , which will not be repeated here.
本实施例中,中央处理器1601中的具体功能模块划分也可以与前述图6中所描述的通信模块等模块的划分方式类似,此处不再赘述。In this embodiment, the division of specific functional modules in the central processing unit 1601 may also be similar to the division of modules such as the communication module described in FIG. 6 , which is not repeated here.
本申请实施例还涉及一种计算机存储介质,包括计算机可读指令,当所述计算机可读指令被执行时,实现如图6至图13所述的方法。The embodiments of the present application also relate to a computer storage medium, including computer-readable instructions, when the computer-readable instructions are executed, the methods described in FIG. 6 to FIG. 13 are implemented.
本申请实施例还涉及提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如图6至图13所述的方法。Embodiments of the present application also relate to providing a computer program product containing instructions, which, when executed on a computer, cause the computer to execute the methods described in FIGS. 6 to 13 .
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可 以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Claims (20)

  1. 一种服务器系统,其特征在于,所述服务器系统包括:服务器、卸载卡和异构卡,所述卸载卡与所述服务器连接,所述异构卡与所述卸载卡连接;A server system, characterized in that the server system comprises: a server, an uninstall card and a heterogeneous card, the uninstall card is connected to the server, and the heterogeneous card is connected to the uninstall card;
    所述卸载卡,用于记录所述卸载卡的第一虚拟化设备与所述异构卡的第二虚拟化设备的映射关系,根据所述映射关系实现服务器的云实例与所述异构卡的第二虚拟化设备之间的通信,其中,所述卸载卡的第一虚拟化设备直通至所述服务器的云实例,所述异构卡的第二虚拟设备直通至所述卸载卡。The offload card is used to record the mapping relationship between the first virtualization device of the offload card and the second virtual device of the heterogeneous card, and realize the cloud instance of the server and the heterogeneous card according to the mapping relationship The communication between the second virtualization devices of the offload card, wherein the first virtualization device of the offload card is directly connected to the cloud instance of the server, and the second virtual device of the heterogeneous card is directly connected to the offload card.
  2. 根据权利要求1所述的服务器系统,其特征在于,所述服务器包括第一接口,所述卸载卡包括第二接口和第三接口,所述异构卡包括第四接口;The server system according to claim 1, wherein the server includes a first interface, the uninstall card includes a second interface and a third interface, and the heterogeneous card includes a fourth interface;
    所述第一接口与所述第二接口连接,所述第三接口和所述第四接口连接。The first interface is connected to the second interface, and the third interface is connected to the fourth interface.
  3. 根据权利要求1所述的服务器系统,其特征在于,所述服务器系统还包括扩展卡,所述服务器包括第一接口,所述扩展卡包括第二接口、第三接口、第四接口和第五接口,所述卸载卡包括第六接口和第七接口,所述异构卡包括第八接口;The server system according to claim 1, wherein the server system further comprises an expansion card, the server includes a first interface, and the expansion card includes a second interface, a third interface, a fourth interface and a fifth interface an interface, the unloading card includes a sixth interface and a seventh interface, and the heterogeneous card includes an eighth interface;
    所述第一接口和所述第二接口连接,所述第二接口和所述第三接口连接,所述第四接口和所述第五接口连接,所述第六接口和所述第三接口连接,所述第七接口和所述第四接口连接,所述第八接口和所述第五接口连接。The first interface is connected to the second interface, the second interface is connected to the third interface, the fourth interface is connected to the fifth interface, and the sixth interface is connected to the third interface connected, the seventh interface is connected with the fourth interface, and the eighth interface is connected with the fifth interface.
  4. 根据权利要求1至3任意一项所述的服务器系统,其特征在于,所述异构卡支持第一协议,所述卸载卡加载有与所述第一协议对应的第一驱动,所述服务器支持第二协议,且所述服务器的云实例加载有与所述第二协议对应的第二驱动;The server system according to any one of claims 1 to 3, wherein the heterogeneous card supports a first protocol, the unloading card is loaded with a first driver corresponding to the first protocol, and the server A second protocol is supported, and the cloud instance of the server is loaded with a second driver corresponding to the second protocol;
    所述卸载卡具体用于通过所述第一驱动接收来自所述第二虚拟化设备的第一操作请求,所述第一操作请求符合所述第一协议的格式要求;The uninstall card is specifically configured to receive, through the first driver, a first operation request from the second virtualization device, where the first operation request conforms to a format requirement of the first protocol;
    所述卸载卡具体用于将所述第一操作请求转换为第二操作请求,所述第二操作请求符合所述第二协议的格式要求;The uninstall card is specifically configured to convert the first operation request into a second operation request, and the second operation request conforms to the format requirements of the second protocol;
    所述卸载卡具体用于通过所述第一虚拟化设备将所述第二操作请求发送至所述第二驱动,以使得所述服务器的云实例基于所述第二操作请求,从所述服务器的云实例的内存读取目标数据或向所述服务器的云实例的内存写入所述目标数据。The offload card is specifically configured to send the second operation request to the second driver through the first virtualization device, so that the cloud instance of the server, based on the second operation request, downloads the server from the server. The memory of the cloud instance of the server reads the target data or writes the target data to the memory of the cloud instance of the server.
  5. 根据权利要求4所述的云计算系统,其特征在于,所述卸载卡包括支持所述第二协议的引擎模块;The cloud computing system according to claim 4, wherein the offload card comprises an engine module supporting the second protocol;
    所述卸载卡具体用于在确定所述异构卡启动后,加载所述第一驱动;The unloading card is specifically configured to load the first driver after determining that the heterogeneous card is activated;
    所述卸载卡具体用于通过所述第一驱动获取所述异构卡的设备信息;The uninstall card is specifically used to obtain the device information of the heterogeneous card through the first driver;
    所述卸载卡具体用于基于配置信息将所述引擎模块配置为所述第一虚拟化设备,所述配置信息为预置的信息;The offload card is specifically configured to configure the engine module as the first virtualization device based on configuration information, where the configuration information is preset information;
    所述卸载卡具体用于通过所述第一虚拟化设备接收来自所述第二驱动的枚举结果,所述枚举结果用于指示所述服务器的云实例已检测到所述第一虚拟化设备;The uninstall card is specifically configured to receive an enumeration result from the second driver through the first virtualization device, where the enumeration result is used to indicate that the cloud instance of the server has detected the first virtualization equipment;
    所述卸载卡具体用于基于所述设备信息和所述枚举结果构建所述异构卡的第二虚拟化设备与所述卸载卡的所述第一虚拟化设备之间的映射关系。The offload card is specifically configured to construct a mapping relationship between the second virtualization device of the heterogeneous card and the first virtualization device of the offload card based on the device information and the enumeration result.
  6. 根据权利要求1至5任意一项所述的云计算系统,其特征在于,若所述第一操作请求为第一读请求,则所述卸载卡具体用于通过所述第一虚拟化设备,接收来自所述第二驱动的第二发送请求,所述第二发送请求符合所述第二协议的格式要求,且所 述第二发送请求用于指示所述服务器的云实例即将发送所述目标数据;The cloud computing system according to any one of claims 1 to 5, wherein if the first operation request is a first read request, the uninstall card is specifically used to pass the first virtualization device, receiving a second sending request from the second driver, the second sending request conforming to the format requirements of the second protocol, and the second sending request is used to indicate that the cloud instance of the server is about to send the target data;
    所述卸载卡具体用于将所述第二发送请求转换为第一发送请求,所述第一发送请求符合所述第一协议的格式要求;The unloading card is specifically configured to convert the second sending request into a first sending request, where the first sending request conforms to the format requirements of the first protocol;
    所述卸载卡具体用于通过所述第一驱动将所述第一发送请求发送至所述第二虚拟化设备,以使得所述异构卡基于所述第一发送请求,通过所述第二虚拟化设备向所述卸载卡发送所述第一读请求。The offload card is specifically configured to send the first sending request to the second virtualization device through the first driver, so that the heterogeneous card sends the request through the second virtual device based on the first sending request. The virtualization device sends the first read request to the offload card.
  7. 根据权利要求1至6任意一项所述的云计算系统,其特征在于,所述卸载卡具体用于通过所述第一虚拟化设备接收来自所述第二驱动的目标数据;The cloud computing system according to any one of claims 1 to 6, wherein the uninstall card is specifically configured to receive target data from the second driver through the first virtualization device;
    所述卸载卡具体用于通过所述第一驱动将所述目标数据发送至所述第二虚拟化设备。The offload card is specifically configured to send the target data to the second virtualization device through the first driver.
  8. 根据权利要求6所述的云计算系统,其特征在于,若所述第一操作请求为第一读请求,所述第二操作请求为第二读请求,则所述卸载卡还用于通过所述第一虚拟化设备将所述第二读请求发送至所述第二驱动,以使得所述服务器的云实例基于所述第二读请求从所述服务器的云实例的内存中读取所述目标数据,并传输至所述第一虚拟化设备;The cloud computing system according to claim 6, wherein, if the first operation request is a first read request and the second operation request is a second read request, the uninstall card is further used to pass the The first virtualization device sends the second read request to the second driver, so that the cloud instance of the server reads the data from the memory of the cloud instance of the server based on the second read request target data, and transmit it to the first virtualization device;
    所述卸载卡还用于将所述目标数据存储至所述卸载卡的内存中;The unloading card is also used to store the target data in the memory of the unloading card;
    所述卸载卡还用于通过所述第一驱动接收来自所述第二虚拟化设备的所述第一读请求;The offload card is further configured to receive the first read request from the second virtualization device through the first driver;
    所述卸载卡还用于基于所述第一读请求从所述卸载卡的内存中读取所述目标数据;The offload card is further configured to read the target data from the memory of the offload card based on the first read request;
    所述卸载卡还用于通过所述第一驱动将所述目标数据发送至所述第二虚拟化设备。The offload card is further configured to send the target data to the second virtualization device through the first driver.
  9. 根据权利要求1至5任意一项所述的云计算系统,其特征在于,若所述第一操作请求为第一写请求,则所述卸载卡具体用于通过所述第一驱动接收来自所述第二虚拟化设备的第一接收请求,所述第一接收请求符合所述第一协议的格式要求,且所述第一接收请求用于指示所述异构卡请求获取所述服务器的云实例的可用内存空间信息;The cloud computing system according to any one of claims 1 to 5, wherein if the first operation request is a first write request, the uninstall card is specifically configured to receive data from the the first receiving request of the second virtualization device, the first receiving request complies with the format requirements of the first protocol, and the first receiving request is used to instruct the heterogeneous card to request to obtain the cloud of the server Information about the available memory space of the instance;
    所述卸载卡具体用于将所述第一接收请求转换为第二接收请求,所述第二接收请求符合所述第二协议的格式要求;The unloading card is specifically configured to convert the first receiving request into a second receiving request, where the second receiving request conforms to the format requirements of the second protocol;
    所述卸载卡具体用于通过所述第一虚拟化设备将所述第二接收请求发送至所述第二驱动;The uninstall card is specifically configured to send the second receiving request to the second driver through the first virtualization device;
    所述卸载卡具体用于通过所述第一虚拟化设备接收来自所述第二驱动的所述可用内存空间信息;The uninstall card is specifically configured to receive the available memory space information from the second driver through the first virtualization device;
    所述卸载卡具体用于通过所述第一驱动将可用内存空间信息发送至所述第二虚拟化设备,以使得所述异构卡基于所述可用内存空间信息,通过所述第二虚拟化设备向所述卸载卡发送所述第一写请求。The offload card is specifically configured to send the available memory space information to the second virtualization device through the first driver, so that the heterogeneous card uses the second virtualization device based on the available memory space information The device sends the first write request to the offload card.
  10. 一种数据处理的方法,其特征在于,所述方法应用于所述服务器系统,所述服务器系统包括:服务器、卸载卡和异构卡,所述卸载卡与所述服务器连接,所述异构卡与所述卸载卡连接;A data processing method, wherein the method is applied to the server system, the server system includes: a server, an offload card and a heterogeneous card, the offload card is connected to the server, the heterogeneous card the card is connected to the unloading card;
    所述卸载卡记录所述卸载卡的第一虚拟化设备与所述异构卡的第二虚拟化设备的映射关系;The uninstall card records the mapping relationship between the first virtualization device of the uninstall card and the second virtualization device of the heterogeneous card;
    所述卸载卡根据所述映射关系实现服务器的云实例与所述异构卡的第二虚拟化设 备之间的通信,其中,所述卸载卡的第一虚拟化设备直通至所述服务器的云实例,所述异构卡的第二虚拟设备直通至所述卸载卡。The offload card implements communication between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship, wherein the first virtualization device of the offload card is directly connected to the cloud of the server For example, the second virtual device of the heterogeneous card is directly connected to the offload card.
  11. 根据权利要求10所述的方法,其特征在于,所述异构卡支持第一协议,所述卸载卡加载有与所述第一协议对应的第一驱动,所述服务器支持第二协议,且所述服务器的云实例加载有与所述第二协议对应的第二驱动,所述卸载卡根据所述映射关系实现服务器的云实例与所述异构卡的第二虚拟化设备之间的通信包括:The method according to claim 10, wherein the heterogeneous card supports a first protocol, the unloading card is loaded with a first driver corresponding to the first protocol, the server supports a second protocol, and The cloud instance of the server is loaded with a second driver corresponding to the second protocol, and the offload card implements communication between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship include:
    所述卸载卡通过所述第一驱动接收来自所述第二虚拟化设备的第一操作请求,所述第一操作请求符合所述第一协议的格式要求;receiving, by the uninstall card, a first operation request from the second virtualization device through the first driver, where the first operation request conforms to a format requirement of the first protocol;
    所述卸载卡将所述第一操作请求转换为第二操作请求,所述第二操作请求符合所述第二协议的格式要求;The uninstall card converts the first operation request into a second operation request, and the second operation request conforms to the format requirements of the second protocol;
    所述卸载卡通过所述第一虚拟化设备将所述第二操作请求发送至所述第二驱动,以使得所述服务器的云实例基于所述第二操作请求,从所述服务器的云实例的内存读取目标数据或向所述服务器的云实例的内存写入所述目标数据。The offload card sends the second operation request to the second driver through the first virtualization device, so that based on the second operation request, the cloud instance of the server downloads the request from the cloud instance of the server. The memory of the server reads the target data or writes the target data to the memory of the cloud instance of the server.
  12. 根据权利要求11所述的方法,其特征在于,所述卸载卡包括支持所述第二协议的引擎模块,所述卸载卡记录所述卸载卡的第一虚拟化设备与所述异构卡的第二虚拟化设备的映射关系包括:The method according to claim 11, wherein the offload card includes an engine module supporting the second protocol, and the offload card records the difference between the first virtualization device of the offload card and the heterogeneous card. The mapping relationship of the second virtualized device includes:
    所述卸载卡在确定所述异构卡启动后,加载所述第一驱动;After determining that the heterogeneous card is activated, the unloading card loads the first driver;
    所述卸载卡通过所述第一驱动获取所述异构卡的设备信息;The uninstall card obtains the device information of the heterogeneous card through the first driver;
    所述卸载卡基于配置信息将所述引擎模块配置为所述第一虚拟化设备,所述配置信息为预置的信息;The offload card configures the engine module as the first virtualization device based on configuration information, where the configuration information is preset information;
    所述卸载卡通过所述第一虚拟化设备接收来自所述第二驱动的枚举结果,所述枚举结果用于指示所述服务器的云实例已检测到所述第一虚拟化设备;receiving, by the uninstall card, an enumeration result from the second driver through the first virtualization device, where the enumeration result is used to indicate that the cloud instance of the server has detected the first virtualization device;
    所述卸载卡基于所述设备信息和所述枚举结果构建所述异构卡的第二虚拟化设备与所述卸载卡的所述第一虚拟化设备之间的映射关系。The offload card constructs a mapping relationship between the second virtualization device of the heterogeneous card and the first virtualization device of the offload card based on the device information and the enumeration result.
  13. 根据权利要求10至12任意一项所述的方法,其特征在于,若所述第一操作请求为第一读请求,则所述卸载卡通过所述第一驱动接收来自所述第二虚拟化设备的第一操作请求之前,所述方法还包括:The method according to any one of claims 10 to 12, characterized in that, if the first operation request is a first read request, the uninstall card receives data from the second virtualization through the first driver. Before the first operation request of the device, the method further includes:
    所述卸载卡通过所述第一虚拟化设备,接收来自所述第二驱动的第二发送请求,所述第二发送请求符合所述第二协议的格式要求,且所述第二发送请求用于指示所述服务器的云实例即将发送所述目标数据;The offload card receives a second sending request from the second driver through the first virtualization device, the second sending request conforms to the format requirements of the second protocol, and the second sending request uses to indicate that the cloud instance of the server is about to send the target data;
    所述卸载卡将所述第二发送请求转换为第一发送请求,所述第一发送请求符合所述第一协议的格式要求;The offload card converts the second sending request into a first sending request, where the first sending request conforms to the format requirements of the first protocol;
    所述卸载卡通过所述第一驱动将所述第一发送请求发送至所述第二虚拟化设备,以使得所述异构卡基于所述第一发送请求,通过所述第二虚拟化设备向所述卸载卡发送所述第一读请求。The offload card sends the first sending request to the second virtualization device through the first driver, so that the heterogeneous card sends the request through the second virtualization device based on the first sending request The first read request is sent to the offload card.
  14. 根据权利要求10至13任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 10 to 13, wherein the method further comprises:
    所述卸载卡通过所述第一虚拟化设备接收来自所述第二驱动的目标数据;receiving, by the uninstall card, target data from the second driver through the first virtualization device;
    所述卸载卡通过所述第一驱动将所述目标数据发送至所述第二虚拟化设备。The offload card sends the target data to the second virtualization device through the first driver.
  15. 根据权利要求13所述的方法,其特征在于,若所述第一操作请求为第一读请 求,所述第二操作请求为第二读请求,则所述卸载卡通过所述第一驱动将所述第一发送请求发送至所述第二虚拟化设备之后,所述方法还包括:The method according to claim 13, wherein if the first operation request is a first read request and the second operation request is a second read request, the uninstall card uses the first driver to After the first sending request is sent to the second virtualization device, the method further includes:
    所述卸载卡通过所述第一虚拟化设备将所述第二读请求发送至所述第二驱动,以使得所述服务器的云实例基于所述第二读请求从所述服务器的云实例的内存中读取所述目标数据,并传输至所述第一虚拟化设备;The offload card sends the second read request to the second driver through the first virtualization device, so that the cloud instance of the server reads the data from the cloud instance of the server based on the second read request. reading the target data in the memory and transmitting it to the first virtualization device;
    所述卸载卡将所述目标数据存储至所述卸载卡的内存中;The unloading card stores the target data in the memory of the unloading card;
    所述卸载卡通过所述第一驱动接收来自所述第二虚拟化设备的所述第一读请求;The offload card receives the first read request from the second virtualization device through the first driver;
    所述卸载卡基于所述第一读请求从所述卸载卡的内存中读取所述目标数据;The offload card reads the target data from the memory of the offload card based on the first read request;
    所述卸载卡通过所述第一驱动将所述目标数据发送至所述第二虚拟化设备。The offload card sends the target data to the second virtualization device through the first driver.
  16. 根据权利要求10至12任意一项所述的方法,其特征在于,若所述第一操作请求为第一写请求,则所述卸载卡通过所述第一驱动接收来自所述第二虚拟化设备的第一操作请求之前,所述方法还包括:The method according to any one of claims 10 to 12, characterized in that, if the first operation request is a first write request, the offload card receives data from the second virtualization through the first driver. Before the first operation request of the device, the method further includes:
    所述卸载卡通过所述第一驱动接收来自所述第二虚拟化设备的第一接收请求,所述第一接收请求符合所述第一协议的格式要求,且所述第一接收请求用于指示所述异构卡请求获取所述服务器的云实例的可用内存空间信息;The offload card receives a first receive request from the second virtualization device through the first driver, the first receive request conforms to the format requirements of the first protocol, and the first receive request is used for Instructing the heterogeneous card to request to obtain the available memory space information of the cloud instance of the server;
    所述卸载卡将所述第一接收请求转换为第二接收请求,所述第二接收请求符合所述第二协议的格式要求;The offload card converts the first receiving request into a second receiving request, where the second receiving request conforms to the format requirements of the second protocol;
    所述卸载卡通过所述第一虚拟化设备将所述第二接收请求发送至所述第二驱动;sending, by the uninstall card, the second receiving request to the second driver through the first virtualization device;
    所述卸载卡通过所述第一虚拟化设备接收来自所述第二驱动的所述可用内存空间信息;receiving, by the uninstall card, the available memory space information from the second driver through the first virtualization device;
    所述卸载卡通过所述第一驱动将可用内存空间信息发送至所述第二虚拟化设备,以使得所述异构卡基于所述可用内存空间信息,通过所述第二虚拟化设备向所述卸载卡发送所述第一写请求。The offload card sends the available memory space information to the second virtualization device through the first driver, so that the heterogeneous card sends information to the second virtualization device through the second virtualization device based on the available memory space information. The offload card sends the first write request.
  17. 一种卸载卡,其特征在于,所述卸载卡的一端与服务器连接,所述卸载卡的另一端与异构卡连接,所述卸载卡包括:An unloading card, characterized in that one end of the unloading card is connected to a server, the other end of the unloading card is connected to a heterogeneous card, and the unloading card comprises:
    记录模块,用于记录所述卸载卡的第一虚拟化设备与所述异构卡的第二虚拟化设备的映射关系;a recording module, configured to record the mapping relationship between the first virtualization device of the uninstall card and the second virtualization device of the heterogeneous card;
    通信模块,用于根据所述映射关系实现服务器的云实例与所述异构卡的第二虚拟化设备之间的通信,其中,所述卸载卡的第一虚拟化设备直通至所述服务器的云实例,所述异构卡的第二虚拟设备直通至所述卸载卡。A communication module, configured to implement communication between the cloud instance of the server and the second virtualization device of the heterogeneous card according to the mapping relationship, wherein the first virtualization device of the offload card is directly connected to the server's Cloud instance, the second virtual device of the heterogeneous card is directly connected to the offload card.
  18. 一种卸载卡,其特征在于,所述卸载卡包括:处理器和存储器;An unloading card, characterized in that the unloading card comprises: a processor and a memory;
    所述存储器用于存储计算机执行指令;the memory is used to store computer-executable instructions;
    所述处理器用于执行所述存储器所存储的计算机执行指令,以使所述卸载卡实现如所述权利要求10至16任一项所述的方法。The processor is configured to execute computer-executable instructions stored in the memory to cause the offload card to implement the method of any one of claims 10 to 16.
  19. 一种计算机存储介质,其特征在于,包括计算机可读指令,当所述计算机可读指令被执行时,实现如权利要求10至16任一项所述的方法。A computer storage medium, characterized by comprising computer-readable instructions, which, when executed, implement the method according to any one of claims 10 to 16.
  20. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求10至16任一项所述的方法。A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 10 to 16.
PCT/CN2021/127198 2020-10-30 2021-10-28 Server system and data processing method WO2022089551A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011193205.8 2020-10-30
CN202011193205.8A CN114528032A (en) 2020-10-30 2020-10-30 Server system and data processing method

Publications (1)

Publication Number Publication Date
WO2022089551A1 true WO2022089551A1 (en) 2022-05-05

Family

ID=81383638

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/127198 WO2022089551A1 (en) 2020-10-30 2021-10-28 Server system and data processing method

Country Status (2)

Country Link
CN (1) CN114528032A (en)
WO (1) WO2022089551A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185647A (en) * 2022-09-14 2022-10-14 珠海星云智联科技有限公司 virtio equipment direct connection method and related device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686836A (en) * 2022-10-17 2023-02-03 阿里巴巴(中国)有限公司 Unloading card provided with accelerator

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105359095A (en) * 2013-05-08 2016-02-24 康维达无线有限责任公司 Method and apparatus for the virtualization of resources using a virtualization broker and context information
US20160170784A1 (en) * 2014-12-11 2016-06-16 Amazon Technologies, Inc. Managing virtual machine instances utilizing a virtual offload device
US20160170785A1 (en) * 2014-12-11 2016-06-16 Amazon Technologies, Inc. Managing virtual machine instances utilizing an offload device
CN111143054A (en) * 2019-12-10 2020-05-12 北京计算机技术及应用研究所 Heterogeneous domestic CPU resource fusion management method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105359095A (en) * 2013-05-08 2016-02-24 康维达无线有限责任公司 Method and apparatus for the virtualization of resources using a virtualization broker and context information
US20160170784A1 (en) * 2014-12-11 2016-06-16 Amazon Technologies, Inc. Managing virtual machine instances utilizing a virtual offload device
US20160170785A1 (en) * 2014-12-11 2016-06-16 Amazon Technologies, Inc. Managing virtual machine instances utilizing an offload device
CN111143054A (en) * 2019-12-10 2020-05-12 北京计算机技术及应用研究所 Heterogeneous domestic CPU resource fusion management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185647A (en) * 2022-09-14 2022-10-14 珠海星云智联科技有限公司 virtio equipment direct connection method and related device

Also Published As

Publication number Publication date
CN114528032A (en) 2022-05-24

Similar Documents

Publication Publication Date Title
WO2022089551A1 (en) Server system and data processing method
US7752635B2 (en) System and method for configuring a virtual network interface card
JP4800413B2 (en) Information processing system
US20220191153A1 (en) Packet Forwarding Method, Computer Device, and Intermediate Device
JP6228177B2 (en) Method, computer program, and apparatus for optimizing loading and booting of an operating system over a communication network in a computer system
US8380971B2 (en) Information handling systems including network adapters and methods of booting the information handling systems using boot configuration information from remote sources
US7730221B2 (en) LAN controller with bootable host bus adapter
US10509758B1 (en) Emulated switch with hot-plugging
US20050102682A1 (en) Method, system, and program for interfacing with a network adaptor supporting a plurality of devices
US10908895B2 (en) State-preserving upgrade of an intelligent server adapter
EP2754030A1 (en) Virtual switch extensibility
US9886287B2 (en) Adaptive device driver method and system
US11829309B2 (en) Data forwarding chip and server
CN109936716B (en) Display driving realization method and system
CN115599502B (en) RTOS network sharing method based on virtual machine monitor
WO2023174146A1 (en) Offloading-card namespace management system and method, and input/output request processing system and method
CN115840620A (en) Data path construction method, device and medium
US20150186317A1 (en) Method and apparatus for detecting the initiator/target orientation of a smart bridge
US20130030568A1 (en) Robot system control method and a device therefor
US20190205156A1 (en) Container access method and apparatus
CN114691223B (en) Method and device for transmitting BIOS logs through network
US20190095359A1 (en) Peripheral device controlling device, operation method thereof, and operation method of peripheral device controlling device driver
CN115470136A (en) Equipment virtualization test platform, method and device for magnetic resonance system
KR102160014B1 (en) Method for task communication on heterogeneous network and system using thereof
US10803008B2 (en) Flexible coupling of processor modules

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21885278

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21885278

Country of ref document: EP

Kind code of ref document: A1