Method, device and equipment for configuring smart network card and storage medium
By obtaining virtual machine specification requirements, screening servers and virtual network ports, and determining configuration templates, the complex management of multi-vendor smart network cards is solved, unified configuration management is achieved, and costs are reduced.
Patent Information
- Application Number
- CN202310848688.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-07-11
AI Technical Summary
In a cloud environment, the management of smart network cards from multiple vendors is complex and has high management overhead, and configuration differences lead to duplicate code development.
By obtaining the user's virtual machine specification requirement information, filtering out servers and virtual network ports that meet the requirements, determining the target configuration template, and calling the corresponding configuration template to configure the smart network card, unified management of devices from different manufacturers.
It reduces management complexity and costs, enables the scheduling and use of devices from different hardware manufacturers in the same cloud environment, and unifies the configuration strategies on the computing node side.
Smart Images

Figure CN119316282B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart network card technology, and in particular to a configuration method, apparatus, device, and storage medium for a smart network card. Background Art
[0002] Smart NIC hardware offload combined with virtio data path offload acceleration technology (Vhost Data Path Acceleration, vDPA technology) can not only achieve high performance of application virtual networks, but also support the necessary functions required by cloud computing infrastructure, and therefore has been widely used.
[0003] However, in the current SmartNIC industry, vendors differ significantly in their implementation of vDPA technology. Furthermore, cloud environments offer a wide variety of server specifications, further increasing the diversity of server configurations. For cloud operators, using multiple vendors and types of SmartNICs presents significant management complexity and overhead. Furthermore, configuration differences can lead to duplicate code development to utilize devices from different vendors.
[0004] Therefore, there is an urgent need for an orchestration and scheduling method that can be applied to multi-vendor smart network card devices in a cloud environment to solve the above problems. Summary of the Invention
[0005] The present application provides a configuration method, apparatus, device and storage medium for a smart network card to solve the configuration management problem of the smart network card.
[0006] In a first aspect, the present application provides a method for configuring a smart network card, the method comprising:
[0007] Obtaining user specification requirement information for a target virtual machine; wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine;
[0008] Retrieving relevant information of each server, screening out a target server based on the relevant information of each server and the specification requirement information, and determining a target virtual network port; wherein the relevant information of the server includes configuration information of virtual machines that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports;
[0009] Based on the target virtual network port, a target configuration template is determined, and a preset interface of the target configuration template is called to configure the smart network card; wherein the target configuration template is a configuration template corresponding to the target virtual network port.
[0010] Optionally, the target server is screened out according to the related information of the servers and the specification requirement information, and the screening comprises:
[0011] The related information of the servers and the specification requirement information are compared, and servers meeting the specification requirement information are selected, and servers including at least one available virtual network interface are determined as the target servers.
[0012] Optionally, the target virtual network interface is determined, and the determination comprises:
[0013] Any available virtual network interface in the target servers that is not locked is locked, and the available virtual network interface after the locking is determined as the target virtual network interface.
[0014] Optionally, the target configuration template is determined based on the target virtual network interface, and the determination comprises:
[0015] Based on the target virtual network interface, manufacturer information of an intelligent network card providing the target virtual network interface is determined.
[0016] If it is determined that there is a dedicated configuration template corresponding to the manufacturer according to the manufacturer information, the dedicated configuration template corresponding to the manufacturer is determined as the target configuration template.
[0017] If it is determined that there is no dedicated configuration template corresponding to the manufacturer, a general configuration template is determined as the target configuration template.
[0018] Optionally, the specification requirement information of the user for the target virtual machine is obtained, and the obtaining comprises:
[0019] In response to a selection operation of the user on a preset virtual machine specification parameter setting table, specification parameter information indicated by the selection operation is determined as the specification requirement information of the user for the target virtual machine.
[0020] Optionally, the specification requirement information comprises requirement information of one or more indexes of a virtual processor, a memory, a disk, a network bandwidth, a small packet forwarding performance, and a network card type.
[0021] Optionally, after the configuration of the intelligent network card is completed, the method further comprises:
[0022] A preset virtual machine management interface is called to start the target virtual machine.
[0023] In a second aspect, the application provides a configuration device of an intelligent network card, and the device comprises:
[0024] An obtaining unit is configured to obtain specification requirement information of a user for a target virtual machine, wherein the specification requirement information represents a requirement for a specification attribute of the target virtual machine.
[0025] a screening unit, configured to retrieve relevant information of each server, screen out a target server based on the relevant information of each server and the specification requirement information, and determine a target virtual network port; wherein the relevant information of the server includes configuration information of virtual machines that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports;
[0026] A configuration unit is used to determine a target configuration template based on the target virtual network port, and call a preset interface of the target configuration template to configure the smart network card; wherein the target configuration template is a configuration template corresponding to the target virtual network port.
[0027] Optionally, the screening unit includes a first screening module;
[0028] The first screening module is used to compare the relevant information of each server with the specification requirement information, select the server that meets the specification requirement information, and determine that the server that meets the specification requirement information includes at least one available virtual network port as the target server.
[0029] Optionally, the screening unit further includes a second screening module;
[0030] The second screening module is configured to lock any unlocked available virtual network port in the target server, and determine the unlocked available virtual network port as the target virtual network port.
[0031] Optionally, the configuration unit includes a first determination module, a second determination module, and a third determination module;
[0032] The first determining module is configured to determine, based on the target virtual network port, the manufacturer information of the smart network card that provides the target virtual network port;
[0033] The second determining module is configured to determine, if it is determined based on the manufacturer information that there is a dedicated configuration template corresponding to the manufacturer, that the dedicated configuration template corresponding to the manufacturer is the target configuration template;
[0034] The third determining module is configured to determine a universal configuration template as the target configuration template if it is determined that no exclusive configuration template corresponding to the manufacturer exists.
[0035] Optionally, the acquiring unit is specifically configured to, in response to a selection operation performed by a user on a preset virtual machine specification parameter setting table, determine that the specification parameter information indicated by the selection operation is the user's specification requirement information for the target virtual machine.
[0036] Optionally, the specification requirement information includes requirement information for one or more of the following indicators: virtual processor, memory, disk, network bandwidth, packet forwarding performance, and network card type.
[0037] Optionally, the apparatus further includes a launching unit, configured to call a preset virtual machine management interface to launch the target virtual machine.
[0038] In a third aspect, the present application further provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0039] The memory stores computer-executable instructions;
[0040] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the preceding items.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any of the preceding items.
[0042] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which is used to implement any of the aforementioned methods when executed by a processor.
[0043] The configuration method, device, equipment and storage medium of the smart network card provided in the present application include: obtaining the user's specification requirement information for the target virtual machine; wherein the specification requirement information represents the requirement for the specification attributes of the target virtual machine; retrieving relevant information of each server, screening out the target server based on the relevant information of each server and the specification requirement information, and determining the target virtual network port; wherein the relevant information of the server includes the configuration information of the virtual machine that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports; based on the target virtual network port, determining the target configuration template, and calling the preset interface of the target configuration template to configure the smart network card; wherein the target configuration template is the configuration template corresponding to the target virtual network port. This application uses specification requirement information to screen the target virtual network port and calls the preset interface of the corresponding configuration template to implement the configuration of the smart network card. Devices from different manufacturers only need to provide corresponding specific templates, which reduces the complexity of configuration management and enables devices from different hardware manufacturers to be scheduled and used in the same cloud environment. It also enables the use of the same configuration strategy on the computing node side to complete the configuration management of multi-vendor devices and reduce management costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] Figure 1 A schematic diagram of configuration management of different smart network cards in multiple host machines provided in an embodiment of the present application;
[0046] Figure 2 A schematic diagram of a control node scheduling architecture provided in an embodiment of the present application;
[0047] Figure 3 A flowchart of a configuration method for a smart network card provided in an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the architecture of a templated configuration of multi-vendor devices provided in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of the overall process of creating a virtual machine provided in an embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of a configuration device for a smart network card provided in an embodiment of the present application;
[0051] Figure 7 A schematic diagram of the structure of another configuration device for a smart network card provided in an embodiment of the present application;
[0052] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0053] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0054] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0055] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the invention described herein, for example, can be implemented in orders other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0056] Smart NIC hardware offload combined with vDPA technology can achieve high performance for virtual networks such as application virtual machines and containers, and can also support necessary functions such as hot migration, Quality of Service (QoS), multi-tenancy, isolation, and security required by cloud computing infrastructure.
[0057] However, within the current Smart NIC industry, vendors differ significantly in their implementation of vDPA technology. Each vendor's vDPA management process application programming interface (API) or configuration method varies. For example, some vendors implement it based on ovs-dpdk, others on their own proprietary process communication protocols, others on HTTP, and still others on special command-line configuration. These differences manifest themselves in the following ways on cloud platforms: 1) Different Smart NIC device allocation strategies; 2) Different device configuration parameters; 3) Different numbers of virtual network ports (VFs) on devices; 4) Different QoS rate-limiting mechanisms and QoS configuration delivery methods; and 5) Different device performance metrics.
[0058] Furthermore, cloud environments feature a wide variety of server specifications (e.g., varying CPU models, memory sizes, and disk performance), leading to differences in available resources, resource types, and performance specifications across cloud servers. In the case of SmartNIC hardware offload, server configurations are not fixed, and the varying SmartNIC models and vendors further increase the diversity of server configurations. For cloud operators, adopting multiple types of SmartNICs from multiple vendors inevitably leads to high management complexity and overhead. Furthermore, due to these differences in server configurations, the cloud management program code within the cloud platform must be redeveloped multiple times to utilize devices from different vendors.
[0059] For example, Figure 1 This is a schematic diagram of configuration management of different smart network cards in multiple host machines provided by the embodiment of the present application. Figure 1 As shown, each host has a different Smart NIC, with different vDPA fastpath and flow offload technologies. If multiple servers contain multiple Smart NICs, each with different hardware and software configurations, the cloud platform's hypervisor would need to be redeveloped multiple times to utilize these different vendors' devices. This leads to long development cycles, complex management, and difficulty in implementation.
[0060] For example, Figure 2 A schematic diagram of a control node scheduling architecture provided in an embodiment of the present application. Figure 2 As shown in the figure, in a cloud computing virtualization scenario in a cloud environment, when the smart network cards of each host are different, the cloud scheduler in the controller host faces the following problems after receiving a specification request: 1) how to configure the virtual machine specifications to meet the scheduling requirements of different network card types; 2) how to select different types of network cards for scheduling; 3) how to manage the differentiated specifications of network cards from different manufacturers.
[0061] To address these issues, configuring a set of VM specifications for each Smart NIC type would result in an excessive number of specifications in the cloud environment, making management difficult and incurring significant management costs for cloud operations and pricing strategies. Furthermore, exposing both VM specifications and NIC types to users, allowing them to freely choose, would increase the learning and usage costs for non-expert users. In other words, the aforementioned issues facing cloud schedulers have yet to be effectively addressed.
[0062] In order to solve the above problems, the present application provides a configuration method, device, equipment and storage medium for a smart network card. The virtual machine specifications are unified and transparent to the user. The user can only see the specification attributes of the scene (such as CPU, memory, disk, virtual network card performance, etc.), and only pay attention to the common attributes of the virtual machine specifications; if there are smart network cards from different manufacturers, the smart network cards from different manufacturers that can achieve the same level of performance indicators are classified into one category. Specifically, when configuring, according to the user's specification requirements for the target virtual machine, find a server that meets the specification requirements, and select the server with an available virtual network port as the target server. After marking one of the available virtual network ports, the manufacturer of the corresponding smart network card is determined according to the virtual network port, and the corresponding configuration template is called to configure the smart network card. By weakening the focus on the specification differences of network cards from different manufacturers and configuring according to the specification requirements and their performance indicators, the management complexity is reduced, and devices from different hardware manufacturers can be scheduled and used simultaneously in the same cloud environment. It also enables the computing node side to use the same configuration strategy to complete the configuration of multi-vendor devices, and reduces management costs.
[0063] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0064] Figure 3 This is a flowchart of a configuration method for a smart network card provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be a configuration device for the smart network card, which can be located on a server or on an electronic device. The electronic device can be a mobile terminal such as a mobile phone, tablet, computer, etc., and this application does not impose any restrictions. The embodiment of the present application is described in detail using the configuration device of the smart network card as an example.
[0065] For example, the configuration device for the SmartNIC can also be deployed on an OpenStack cloud platform. OpenStack is an open-source cloud computing management platform project, a combination of a series of open-source software projects, that provides scalable and elastic cloud computing services for private and public clouds. The OpenStack cloud platform includes a control node and multiple compute nodes. The method of the present application can also be implemented by the control node and compute nodes in the OpenStack cloud platform, without limitation in this application.
[0066] like Figure 3 As shown, the configuration method of the smart network card provided in this embodiment includes:
[0067] S301. Obtain user specification requirement information for a target virtual machine; wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine.
[0068] For example, a user may have certain requirements for a target virtual machine to be created. After determining the specifications required for the target virtual machine, a target virtual machine creation request containing the specification requirements may be generated. The configuration device of the smart network card may obtain the user's specification requirements for the target virtual machine based on the target virtual machine creation request.
[0069] The specification requirement information represents the user's requirements for the specification attributes of the target virtual machine. Each user's requirements may be different, and this application does not impose any restrictions on this. In one example, the specification requirement information may include requirements for one or more of the following indicators: virtual processor vCPU, memory Memory, disk Disk, network bandwidth network_bps, packet forwarding performance network_pps, and network card type nic_type. For example, the specification requirement information may include 8-core virtual processor vCPU, 32G memory Memory, 16Gbps network bandwidth network_bps, and 4Mpps packet forwarding performance network_pps.
[0070] In one example, obtaining the user's specification requirement information for the target virtual machine may include: in response to the user's selection operation on a preset virtual machine specification parameter setting table, determining that the specification parameter information indicated by the selection operation is the user's specification requirement information for the target virtual machine.
[0071] Exemplarily, the user can select the desired specification attributes in a pre-set virtual machine specification parameter setting table. The configuration device of the smart network card responds to the user's selection operation and determines that the specification parameter information indicated by the selection operation is the user's specification requirement information for the target virtual machine.
[0072] For example, Table 1 is an exemplary preset virtual machine specification parameter setting table.
[0073] Table 1
[0074]
[0075] Table 1 shows examples of VM specifications for types 1-9. To hide the actual physical devices used, the table only includes the VM names and configuration parameters. These configuration parameters include virtual processors (vCPU), memory (memory), disk (disk), network bandwidth (network_bps), packet forwarding performance (network_pps), and network interface card (NIC_type). These VM specifications are examples only and can be adjusted based on actual needs. A wider range of VM specifications is also possible, and this application does not impose any restrictions.
[0076] For example, the user can select any virtual machine specification parameter in the preset virtual machine specification parameter setting table as the specification requirement parameter of the target virtual machine to be created. Of course, the user can also directly enter the target value according to actual needs, and this application does not limit it.
[0077] S302. Retrieve relevant information of each server, filter out a target server based on the relevant information and specification requirement information of each server, and determine a target virtual network port; wherein the relevant information of the server includes configuration information of the virtual machines that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports.
[0078] For example, after obtaining the user's specification requirement information for the target virtual machine, the configuration device of the smart network card retrieves the relevant information of each server in the database, and then selects the server that meets the specification requirement information and includes at least one available virtual network port as the target server based on the relevant information and specification requirement information of each server, and determines the target virtual network port.
[0079] Among them, the relevant information of the server includes the configuration information of the virtual machines that the server can provide, which characterizes what specifications of virtual machines it can generate and what type of configuration the virtual network card is. Each server can be configured according to the preset server parameter configuration format to facilitate the collection of relevant information on the server. For example, the relevant information of the server may include the following information: the name of the manufacturer providing the virtual network port, the PCI (Peripheral Component Interconnect) manufacturer identifier, the PCI product identifier, the device alias, the network card type, the total number of available virtual network ports in the scenario corresponding to the network card type, the used amount of available virtual network ports, the total amount of network bandwidth provided by the device for virtualization, the used amount of network bandwidth, the total amount of small packet forwarding provided by the device for virtualization, the used amount of small packet forwarding, etc.
[0080] For example, the relevant information of a server configured according to the preset server parameter configuration format may be: "vendor_name":"company1" indicates that the company name of the virtual network port VF (virtual Function) is company 1; "vendor_id":"1111" and "product_id":"2222" indicate that the device on the server has a PCI vendor identifier (PCI vendor_id) of 1111 and a PCI product identifier (PCI product_id) of 222; "name":"com1_vdpa" indicates a device alias; "vnic_type":"vdpa" indicates that these devices can be used in scenarios where the virtual network card is vdpa; "max_num_vf":127 indicates that the total number of available virtual network port VFs (virtual Functions) of the network card in the vDPA scenario is 127; and "used_num_vf":1 indicates that the number of used virtual network port VFs (virtual functions) of the network card in the vDPA scenario is 127. Function) is 1; "max_network_bps": "100Gbps" indicates that the total bandwidth capacity provided by the device for virtualization is 100Gbps; "max_network_pps": "20Mpps" indicates that the total small packet forwarding capacity provided by the device for virtualization is 20Mpps; "used_network_bps": "16Gbps" indicates that the bandwidth used by virtualization of the device is 16Gbps; "used_network_pps": "8Mpps" indicates that the small packet forwarding capacity used by virtualization of the device is 8Mpps.
[0081] For example, after retrieving the relevant information of each server in the database, the configuration device of the smart network card can filter out the target server and determine the target virtual network port. In one example, filtering out the target server based on the relevant information and specification requirements of each server can include:
[0082] The relevant information of each server is compared with the specification requirement information, and the server that meets the specification requirement information is selected, and the server that meets the specification requirement information and includes at least one available virtual network port is determined as the target server.
[0083] Exemplarily, the configuration device of the smart network card compares the relevant information and specification requirement information of each server, selects the servers that meet the specification requirement information, and then determines the number of available virtual network ports in the servers that meet the specification requirement information. The target server should include at least one available virtual network port in order to be called and used. For example, taking the specification requirement information of 8-core virtual processor vCPU, 32G memory, 16Gbps network bandwidth network_bps, and 4Mpps packet forwarding performance network_pps as an example, after selecting the servers with 8-core virtual processor vCPU, 32G memory, 16Gbps network bandwidth network_bps, and 4Mpps packet forwarding performance network_pps, it is necessary to determine the number of available virtual network ports in these servers. The number of virtual network ports that can be called must be greater than or equal to 1 before it can be determined as the target server.
[0084] In one example, determining the target virtual network port may include:
[0085] A locking process is performed on any unlocked available virtual network port in the target server, and the locked available virtual network port is determined as the target virtual network port.
[0086] Exemplarily, after determining the target server, any unlocked available virtual network port, that is, one that has not been called, can be selected and locked to determine the locked available virtual network port as the target virtual network port. Among them, when locking any unlocked available virtual network port in the target server, the corresponding device creation interface can be called to implement it. The process of locking the selected available virtual network port is single-queue in order to avoid duplicate allocation and to avoid other virtual machine creation requests occupying the same device. In addition, in addition to locking the selected available virtual network port, other processing such as marking can also be performed on it, which is not limited by this application.
[0087] In some examples, after the lock process is executed, a series of initialization and cleanup steps are required for the virtual network port. For example, this involves determining whether any applications are still active on the virtual network port or if it has been taken over by a program outside the cloud. If so, an error should be returned to notify the cloud management program. If some vendors do not require this step, it can be skipped and the creation process will be returned directly with a successful result.
[0088] In addition to creating a device interface, you can also set up a configuration device interface, an update device interface, a deletion device interface, etc., so as to configure, update, delete, etc. specific information.
[0089] For example, in some examples, the virtual network port is also configured, for example, the MAC address information of the cloud platform virtual network card is configured. If some manufacturers do not need this process, it can be skipped directly.
[0090] In some examples, the specific information of the virtual network port is also updated, for example, the MAC address information of the cloud platform virtual network card is updated.
[0091] In some examples, when the availability of the virtual network port changes, the availability of the virtual network port is changed, and the virtual network port is re-added to the pool of allocatable virtual network ports for use by other users.
[0092] S303, based on the target virtual network port, determine the target configuration template, and call the preset interface of the target configuration template to configure the intelligent network card; wherein the target configuration template is the configuration template corresponding to the target virtual network port.
[0093] For example, after determining the target virtual network port, the intelligent network card configuration device can determine the target configuration template according to the determined target virtual network port, and call the preset interface of the target configuration template to configure the intelligent network card.
[0094] In one example, based on the target virtual network port, the target configuration template can include:
[0095] S100, based on the target virtual network port, determine the manufacturer information of the intelligent network card providing the target virtual network port.
[0096] S200, if it is determined according to the manufacturer information that there is a dedicated configuration template corresponding to the manufacturer, then determine the dedicated configuration template corresponding to the manufacturer as the target configuration template.
[0097] S300, if it is determined that there is no dedicated configuration template corresponding to the manufacturer, then determine the general configuration template as the target configuration template.
[0098] For example, the manufacturer information of the intelligent network card providing the target virtual network port can be determined according to the target virtual network port, and the manufacturer information can be the manufacturer name, the PCI manufacturer identifier, the PCI product identifier, etc., which is used to uniquely determine the intelligent network card. Then, it is determined whether the platform database pre-stores a dedicated configuration template corresponding to the manufacturer according to the manufacturer information, if there is, then the dedicated configuration template corresponding to the manufacturer is determined as the target configuration template, and the preset interface of the dedicated configuration template is called to configure the intelligent network card; if there is not, then the general configuration template is determined as the target configuration template, and the preset interface of the general configuration template is called to configure the intelligent network card.
[0099] This application does not limit the specific content of each configuration template, which can be provided by manufacturers based on the specifics of their respective products. For example, a configuration template can be an openvswitch ovsdb configuration template. Since most manufacturers use openvswitch technology, it can also be used as a universal template. Configuration templates can also be vdpa program configuration templates, manufacturer-defined configuration templates, etc. Parameters in each configuration template may include: vendor_name (manufacturer name), vendor_id (manufacturer identifier), product_id (product identifier), vnic_type (network card type), manager (controller), mac_address (media access control address), etc., which can be determined based on the technology used by each manufacturer and are not limited by this application.
[0100] For example, Figure 4 This is a schematic diagram of the architecture of a templated configuration of multi-vendor equipment provided in an embodiment of the present application. Figure 4 As shown, in Figure 1 Based on the existing architecture, a configurable template program has been added. The cloud management program (nova-compute) calls a fixed interface to the configurable template program, which then determines and calls the preset interface of the target configuration template to configure the Smart NIC. This eliminates the need for multiple programming steps in the cloud management program, which can simply call the standard API of the configuration template to complete configuration. Configuring Smart NICs from different vendors only requires providing specific templates. This not only reduces the number of coding steps in the cloud management program but also reduces overall management complexity.
[0101] The configuration method of the smart network card provided by the embodiment of the present application includes: obtaining user specification requirement information for a target virtual machine; wherein the specification requirement information represents the requirement for the specification attributes of the target virtual machine; retrieving relevant information of each server, screening the target server according to the relevant information of each server and the specification requirement information, and determining the target virtual network port; wherein the relevant information of the server includes the configuration information of the virtual machines that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports; based on the target virtual network port, determining the target configuration template, and calling the preset interface of the target configuration template to configure the smart network card; wherein the target configuration template is the configuration template corresponding to the target virtual network port. The solution of the present application screens the target virtual network port by the specification requirement information, and calls the preset interface of the corresponding configuration template to implement the configuration of the smart network card. Devices of different manufacturers only need to provide corresponding specific templates, which reduces management complexity, enables devices of different hardware manufacturers to be scheduled and used in the same cloud environment, and also enables the computing node side to use the same configuration strategy to complete the configuration management of multi-vendor devices, reducing management costs.
[0102] Based on the above embodiment, in some possible embodiments, after completing the configuration of the smart network card, the following step may be further included: calling a preset virtual machine management interface to start a target virtual machine.
[0103] Exemplarily, the preset virtual machine management interface may be a Libvirt interface, and the Libvirt interface is called to pull up the target virtual machine to complete the startup of the target virtual machine, thereby facilitating the user's subsequent use of the target virtual machine.
[0104] For example, Figure 5 This is a schematic diagram of the overall process of creating a virtual machine provided by the embodiment of this application. Taking the OpenStack cloud platform as an example, Figure 5 As shown, after a user creates a virtual machine, they enter the corresponding specification requirements. During the scheduling phase, the cloud scheduler in the OpenStack cloud platform can search for matching servers based on the user's specification requirements, that is, whether there are servers that meet the specification requirements. If there are no matching servers, the user can adjust the specification requirements. If there are matching servers, the cloud scheduler checks whether there are available virtual network ports in the matching servers. If there are available virtual network ports, the virtual network ports can be allocated. If there are no available virtual network ports, the process ends directly. During the startup phase, after allocating available virtual network ports, the cloud scheduler notifies the compute node cloud management program (nova-compute) in the cloud platform that a virtual machine has been created. The compute node cloud management program determines whether there is a corresponding dedicated configuration template. If there is a dedicated configuration template, it calls the preset interface of the dedicated configuration template to configure the Smart NIC. If there is no dedicated configuration template, it calls the preset interface of the general configuration template to configure the Smart NIC. After the configuration is complete, it calls the preset virtual machine management interface (such as the Libvirt interface) to start the virtual machine, completing the configuration and startup of the virtual machine. At this point, the user can use the virtual machine. This application reduces the management complexity of devices from different manufacturers, enables devices from different hardware manufacturers to be scheduled and used in the same cloud environment, and can also use the same configuration strategy to complete configuration management of multi-vendor devices, reducing management costs.
[0105] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0106] Figure 6 This is a schematic diagram of the structure of a configuration device for an intelligent network card provided in an embodiment of the present application. Figure 6 As shown, the configuration device 60 of the smart network card provided in the embodiment of the present application includes: an acquisition unit 601, a screening unit 602 and a configuration unit 603.
[0107] The acquisition unit 601 is configured to acquire user specification requirement information for a target virtual machine, wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine.
[0108] The screening unit 602 is used to retrieve the relevant information of each server, screen out the target server based on the relevant information and specification requirement information of each server, and determine the target virtual network port; wherein the relevant information of the server includes the configuration information of the virtual machine that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports.
[0109] The configuration unit 603 is configured to determine a target configuration template based on the target virtual network port, and call a preset interface of the target configuration template to configure the smart network card; wherein the target configuration template is a configuration template corresponding to the target virtual network port.
[0110] The device provided in this embodiment can be used to execute the method of the above embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0111] Figure 7 This is a structural diagram of another configuration device for an intelligent network card provided in an embodiment of the present application. Figure 7 As shown, the configuration device 70 of the smart network card provided in the embodiment of the present application includes: an acquisition unit 701, a screening unit 702 and a configuration unit 703.
[0112] The acquiring unit 701 is configured to acquire user specification requirement information for a target virtual machine, wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine.
[0113] The screening unit 702 is used to retrieve the relevant information of each server, screen out the target server based on the relevant information and specification requirement information of each server, and determine the target virtual network port; wherein the relevant information of the server includes the configuration information of the virtual machine that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports.
[0114] The configuration unit 703 is configured to determine a target configuration template based on the target virtual network port, and call a preset interface of the target configuration template to configure the smart network card; wherein the target configuration template is a configuration template corresponding to the target virtual network port.
[0115] In one example, the screening unit 702 includes a first screening module 7021 .
[0116] The first screening module 7021 is used to compare the relevant information of each server with the specification requirement information, select the server that meets the specification requirement information, and determine the server that meets the specification requirement information and includes at least one available virtual network port as the target server.
[0117] In one example, the screening unit 702 further includes a second screening module 7022 .
[0118] The second screening module 7022 is configured to lock any unlocked available virtual network port in the target server and determine the unlocked available virtual network port as the target virtual network port.
[0119] In an example, the configuration unit 703 includes a first determination module 7031 , a second determination module 7032 , and a third determination module 7033 .
[0120] The first determining module 7031 is configured to determine, based on the target virtual network port, the manufacturer information of the smart network card that provides the target virtual network port.
[0121] The second determining module 7032 is configured to determine the exclusive configuration template corresponding to the manufacturer as the target configuration template if it is determined that there is an exclusive configuration template corresponding to the manufacturer according to the manufacturer information.
[0122] The third determining module 7033 is configured to determine the general configuration template as the target configuration template if it is determined that there is no dedicated configuration template corresponding to the manufacturer.
[0123] In one example, the acquiring unit 701 is specifically configured to respond to a selection operation performed by a user on a preset virtual machine specification parameter setting table and determine that the specification parameter information indicated by the selection operation is the user's specification requirement information for the target virtual machine.
[0124] In one example, the specification requirement information includes requirement information for one or more of the following indicators: virtual processor, memory, disk, network bandwidth, small packet forwarding performance, and network card type.
[0125] In one example, the apparatus 70 further includes a launching unit 704, which is configured to call a preset virtual machine management interface to launch a target virtual machine.
[0126] The device provided in this embodiment can be used to execute the method of the above embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0127] It should be noted that it should be understood that the division of the various modules of the above device is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. Moreover, these modules can all be implemented in the form of software called by processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, they can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can all or partly be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or by instructions in the form of software.
[0128] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 80 includes a processor 801 and a memory 802 communicatively connected to the processor.
[0129] The memory 802 stores computer-executable instructions; the processor 801 executes the computer-executable instructions stored in the memory 802 to implement any of the aforementioned methods.
[0130] In the specific implementation of the above-mentioned electronic device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The method disclosed in conjunction with the embodiments of the present application can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0131] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any of the aforementioned methods.
[0132] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by computer instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program, when executed, performs steps including the above-mentioned method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk or optical disk and various media that can store program codes.
[0133] The embodiments of the present application also provide a computer program product, comprising a computer program, which is executed by a processor to implement the method of any of the preceding.
[0134] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the application that come within the scope of the general inventive concepts described herein. The specification and examples are illustrative of the application and are not intended to be limiting. It is intended that the scope of the application be defined by the following claims.
[0135] It is to be understood that the application is not limited to the precise construction described and as shown in the attached figures, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be defined by the claims appended hereto.
Claims
1. A method for configuring a smart network card, characterized in that: The method comprises: Obtaining user specification requirement information for a target virtual machine; wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine; Retrieving relevant information of each server, screening out a target server based on the relevant information of each server and the specification requirement information, and determining a target virtual network port; wherein the relevant information of the server includes configuration information of virtual machines that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports; Based on the target virtual network port, a target configuration template is determined, and a preset interface of the target configuration template is called to configure the smart network card; wherein the target configuration template is a configuration template corresponding to the target virtual network port.
2. The method according to claim 1, characterized in that Filtering target servers based on the relevant information of each server and the specification requirement information includes: The relevant information of each server is compared with the specification requirement information to select a server that meets the specification requirement information, and the server that meets the specification requirement information and includes at least one available virtual network port is determined as the target server.
3. The method according to claim 2, characterized in that Determine the target virtual network port, including: A locking process is performed on any unlocked available virtual network port in the target server, and the locked available virtual network port is determined as the target virtual network port.
4. The method according to claim 1, wherein Determining a target configuration template based on the target virtual network port includes: Determining, based on the target virtual network port, manufacturer information of a smart network card that provides the target virtual network port; If it is determined according to the manufacturer information that there is an exclusive configuration template corresponding to the manufacturer, then the exclusive configuration template corresponding to the manufacturer is determined as the target configuration template; If it is determined that there is no exclusive configuration template corresponding to the manufacturer, a universal configuration template is determined as the target configuration template.
5. The method according to claim 1, wherein Obtain the user's specification requirements for the target virtual machine, including: In response to a selection operation performed by a user on a preset virtual machine specification parameter setting table, it is determined that the specification parameter information indicated by the selection operation is the user's specification requirement information for the target virtual machine.
6. The method according to any one of claims 1 to 5, characterized in that The specification requirement information includes requirement information for one or more of the following indicators: virtual processor, memory, disk, network bandwidth, packet forwarding performance, and network card type.
7. The method according to any one of claims 1 to 5, characterized in that After completing the configuration of the Smart NIC, the following steps are also required: Call the preset virtual machine management interface to pull up the target virtual machine.
8. A configuration device for an intelligent network card, characterized in that: The device comprises: An acquiring unit, configured to acquire user specification requirement information for a target virtual machine; wherein the specification requirement information represents requirements for specification attributes of the target virtual machine; a screening unit, configured to retrieve relevant information of each server, screen out a target server based on the relevant information of each server and the specification requirement information, and determine a target virtual network port; wherein the relevant information of the server includes configuration information of virtual machines that the server can provide; the target server is a server that meets the specification requirement information and includes at least one available virtual network port, and the target virtual network port is any one of the available virtual network ports; A configuration unit is used to determine a target configuration template based on the target virtual network port, and call a preset interface of the target configuration template to configure the smart network card; wherein the target configuration template is a configuration template corresponding to the target virtual network port.
9. An electronic device, characterized in that: The electronic device includes: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Network access method of virtual machine and related equipment
CN110198243A
Data processing method, programmable network card device, physical server, and storage medium
WO2023087938A1