Configuration method and device of intelligent network card, equipment and storage medium

By obtaining virtual machine specification requirements, filtering servers and virtual network ports, and determining configuration templates, the problem of complex configuration management of multi-vendor smart network cards is solved, achieving a unified configuration strategy and reducing management costs.

CN119316282AActive Publication Date: 2025-01-14CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310848688.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-11
Publication Date
2025-01-14
Estimated Expiration
2043-07-11

AI Technical Summary

Technical Problem

In cloud environments, the configuration management of multi-vendor smart network interface cards (NICs) is complex and costly, and the differences in configuration lead to the problem of redundant code development.

Method used

By obtaining the user's virtual machine specification requirements, the system filters out servers and virtual network ports that meet the requirements, determines the target configuration template, and calls the corresponding configuration template to configure the smart network card, thereby managing devices from different manufacturers in a unified manner.

Benefits of technology

It reduces management complexity and costs, enables the scheduling and use of devices from different hardware vendors in the same cloud environment, and unifies configuration strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316282A_ABST
    Figure CN119316282A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent network card configuration method and device, equipment and a storage medium, and relates to the technical field of intelligent network cards. The method comprises the following steps: acquiring specification demand information of a user for a target virtual machine; the specification demand information represents the demand for the specification attribute of the target virtual machine; calling related information of each server, screening out a target server according to the related information of each server and the specification demand information, and determining a target virtual network port; the related information of the server comprises configuration information of the virtual machine which can be provided by the server; the target server is a server which meets the specification demand information and comprises 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 a target configuration template, and calling a preset interface of the target configuration template to configure the intelligent network card; the target configuration template is a configuration template corresponding to the target virtual network port. According to the method, the management complexity is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart network card technology, and in particular to a configuration method, device, equipment 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 in cloud computing infrastructure requirements, and therefore has been widely used.

[0003] However, in the current smart NIC industry, there are large differences in the specific implementation of vDPA technology among various manufacturers. In addition, in cloud environments, there are also multiple server specifications, based on which the configuration differences of servers are further increased. In particular, for cloud operators, the use of smart NICs of multiple manufacturers and types has problems such as high management complexity and high management overhead. Moreover, due to configuration differences, it will also lead to repeated code development in order to use devices from different manufacturers.

[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 of 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 according to 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 a virtual machine that can be provided by the server; 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, screening out a target server according to the relevant information of each server and the specification requirement information includes:

[0011] The relevant information of each server is compared with the specification requirement information, a server that meets the specification requirement information is selected, and a server that meets the specification requirement information and includes at least one available virtual network port is determined as the target server.

[0012] Optionally, determine the target virtual network port, including:

[0013] 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.

[0014] Optionally, based on the target virtual network port, determining a target configuration template includes:

[0015] Based on the target virtual network port, determine the manufacturer information of the smart network card that provides the target virtual network port;

[0016] 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;

[0017] If it is determined that there is no exclusive configuration template corresponding to the manufacturer, a general configuration template is determined as the target configuration template.

[0018] Optionally, obtain the user's specification requirement information for the target virtual machine, including:

[0019] 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.

[0020] 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.

[0021] Optionally, after completing the configuration of the smart network card, the following steps are also included:

[0022] The preset virtual machine management interface is called to start the target virtual machine.

[0023] In a second aspect, the present application provides a configuration device for a smart network card, the device comprising:

[0024] An acquisition unit, configured to acquire specification requirement information of a user for a target virtual machine; wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine;

[0025] A screening unit, used to retrieve relevant information of each server, screen out a target server according to 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 a virtual machine that can be provided by the server; 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 used to lock any unlocked available virtual network port in the target server, and determine the locked 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 determination module is used 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 determination module 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;

[0034] The third determination module is configured to determine a common configuration template as the target configuration template if it is determined that there is no dedicated configuration template corresponding to the manufacturer.

[0035] Optionally, the acquisition unit 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.

[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 device further includes a starting unit, and the starting unit is used to call a preset virtual machine management interface to start the target virtual machine.

[0038] In a third aspect, the present application further provides an electronic device, the 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 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 described in any of the preceding items.

[0042] In a fifth aspect, the present application also provides a computer program product, including a computer program, which is used to implement any of the methods described above 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 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 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 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 a target configuration template, and calling 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. This application uses specification requirement information to filter 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, enables devices from different hardware manufacturers to be scheduled and used in the same cloud environment, and 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 of 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 of 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 have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0055] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can, for example, be implemented in an order 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, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] Smart NIC hardware offload combined with vDPA technology can achieve high performance of 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 in cloud computing infrastructure requirements.

[0057] However, in the current smart NIC industry, there are large differences among vendors in the specific implementation of vDPA technology. The application programming interface (API) or configuration method of the vDPA management process of each vendor is different. For example, some vendors implement it based on ovs-dpdk, some vendors implement it based on their own process communication protocol, some vendors implement it based on HTTP, and some vendors implement it based on special command line configuration, etc. These differences are manifested in the cloud platform as follows: 1) Different allocation strategies for smart NIC devices; 2) Different configuration parameters of devices; 3) Different numbers of virtual network ports (virtual function, VF) of devices; 4) Different QoS speed limit implementation mechanisms and QoS configuration delivery methods of devices; 5) Different performance indicators of devices.

[0058] In addition, in the cloud environment, there are also a variety of server specifications (such as different CPU models, memory sizes, disk performance, etc.), which differentiates the available resources, resource types, performance specifications, etc. of the cloud servers. In the scenario of smart NIC hardware offloading, the server configuration is not fixed, and the different models and manufacturers of smart NICs further increase the dimension of server configuration differences. For cloud operators, if they want to use smart NICs of multiple manufacturers and types, it will inevitably lead to problems such as high management complexity and high management overhead. Moreover, due to differences in server configurations, the cloud management program code in the cloud platform needs to be repeatedly developed multiple times before using equipment from different manufacturers.

[0059] For example, Figure 1 The present invention provides a schematic diagram of configuration management of different smart network cards in multiple host machines. Figure 1 As shown in the figure, the smart NICs in each host are different, and the data path acceleration technology (vDPA fastpath) and flow offload are also different. If there are multiple smart NICs in multiple servers, and the software and hardware configurations of each NIC are different, the cloud management program in the cloud platform needs to be developed multiple times before these different manufacturers' devices can be used. The development cycle of the cloud management program is long, the management is complex, and it is not easy to implement.

[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 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 perform differentiated management of specifications of network cards from different manufacturers.

[0061] In solving the above problems, if a set of virtual machine specifications is configured for each smart network card, it may lead to too many specifications in the cloud environment, which is difficult to manage and will lead to huge management costs for cloud operations and pricing strategies; and if the virtual machine specifications and network card types are exposed to users at the same time and users can choose freely, it will increase the learning and usage costs for non-professional users. In other words, the problems faced by the above cloud scheduler have not been effectively solved yet.

[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 users. Users 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 requirement information for the target virtual machine, find a server that meets the specification requirement information, and select a server with an available virtual network port as the target server. After marking one of the available virtual network ports, determine the manufacturer of the corresponding smart network card according to the virtual network port, and call its corresponding configuration template to configure the smart network card. By weakening the focus on the specification differentiation of network cards from different manufacturers, configuration is performed according to specification requirements and their performance indicators, reducing management complexity, enabling devices from different hardware manufacturers to be scheduled and used simultaneously in the same cloud environment, and also enabling the use of the same configuration strategy on the computing node side to complete the configuration of multi-vendor devices, and reducing management costs.

[0063] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. 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 A flowchart of a configuration method of a smart network card provided in an embodiment of the present application. The execution subject of the embodiment of the present application may be a configuration device of the smart network card, which may be located on a server or on an electronic device, and the electronic device may be a mobile terminal, such as a mobile phone, a tablet, a computer, etc., which is not limited in the present application. The embodiment of the present application is described in detail by taking the execution subject as a configuration device of a smart network card as an example.

[0065] Exemplarily, the configuration device of the smart network card can also be deployed in the OpenStack cloud platform, wherein OpenStack is an open source cloud computing management platform project, which is a combination of a series of software open source projects, and can provide scalable and elastic cloud computing services for private clouds and public clouds. The OpenStack cloud platform includes a control node and multiple computing nodes, and the method of the present application can also be implemented by the control node and computing node in the OpenStack cloud platform, and the present application does not make any limitation.

[0066] like Figure 3 As shown, the configuration method of the smart network card provided in this embodiment includes:

[0067] S301. Obtain specification requirement information of a user for a target virtual machine; wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine.

[0068] For example, the user may have certain requirements for the target virtual machine to be created, and after determining the specification requirements for the target virtual machine, a target virtual machine creation request including specification requirement information may be generated. The configuration device of the smart network card may obtain the user's specification requirement information for the target virtual machine according to the target virtual machine creation request.

[0069] Among them, 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 limit this. In an example, the specification requirement information may include the requirement information for one or more of the following indicators: virtual processor vCPU, memory Memory, disk Disk, network bandwidth network_bps, packet forwarding performance network_pps, network card type nic_type. For example, the specification requirement information can be 8-core virtual processor vCPU, 32G memory Memory, 16Gbps network bandwidth network_bps, 4Mpps packet forwarding performance network_pps.

[0070] In one example, obtaining user specification requirement information for a target virtual machine may include: in response to a user selecting operation on a preset virtual machine specification parameter setting table, determining that the specification parameter information indicated by the selection operation is the user specification requirement information for the target virtual machine.

[0071] Exemplarily, the user can select desired specification attributes in a preset virtual machine specification parameter setting table, and 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] As shown in Table 1, examples of 1-9 virtual machine specification parameters are given. In order to hide the actual physical devices used, the table only includes the name and parameter configuration of the virtual machine. The parameter configuration only includes the virtual processor vCPU, memory Memory, disk Disk, network bandwidth network_bps, packet forwarding performance network_pps, and network card type nic_type. Among them, each virtual machine specification parameter is only used as an example and can be adjusted according to actual needs. More specifications of virtual machine specification parameters can also be set, and this application does not limit it.

[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 a 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.

[0078] Exemplarily, 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 screens out 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 machine that the server can provide, which characterizes what specifications of virtual machines it can generate and what configuration the type of 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. Exemplarily, 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 identification, the PCI product identification, the device alias, the network card type, the total amount 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 ports VF (virtual Function) of the network card in the vDPA scenario is 127; "used_num_vf":1 indicates that the used virtual network ports VF (virtual 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 the device for virtualization is 16Gbps; "used_network_pps":"8Mpps" indicates that the small packet forwarding capacity used by the device for virtualization is 8Mpps.

[0081] Exemplarily, after the configuration device of the smart network card retrieves the relevant information of the above-mentioned servers from the database, it 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 requirement information of each server can include:

[0082] The relevant information of each server and the specification requirement information are compared and processed, a server that meets the specification requirement information is selected, and a server that includes at least one available virtual network port among the servers that meet the specification requirement information is determined as a 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 to be called and used. For example, taking the specification requirement information of 8-core virtual processor vCPU, 32G memory 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 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 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 processes such as marking can also be performed on it, which is not limited by this application.

[0087] In some examples, after executing the lock processing process, a series of initialization and cleanup work is required for the virtual network port. For example, determine whether there are any residual applications on the virtual network port, whether it has been taken over by programs outside the cloud, etc. If so, it should return to notify the cloud management program of the relevant error. If some manufacturers do not need this process, it can be skipped and the creation is returned directly.

[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, specific configurations are also performed on the virtual network port, such as configuring the MAC address information of the cloud platform virtual network card. If some manufacturers do not need this process, it can be skipped and a success is returned directly.

[0090] In some examples, 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 status of the virtual network port changes, the availability status of the virtual network port is also changed, and the virtual network port is added back to the allocatable virtual network port pool so that it can be selected by other users.

[0092] S303. 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.

[0093] Exemplarily, after determining the target virtual network port, the configuration device of the smart network card 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 smart network card.

[0094] In one example, determining a target configuration template based on a target virtual network port may include:

[0095] S100: Based on the target virtual network port, determine the manufacturer information of the smart network card that provides the target virtual network port.

[0096] S200: If it is determined according to the manufacturer information that there is an exclusive configuration template corresponding to the manufacturer, the exclusive configuration template corresponding to the manufacturer is determined as a target configuration template.

[0097] S300: If it is determined that there is no exclusive configuration template corresponding to the manufacturer, determine the general configuration template as the target configuration template.

[0098] Exemplarily, the manufacturer information of the smart network card providing the target virtual network port can be determined based on the target virtual network port. The manufacturer information can be the manufacturer name, PCI manufacturer identifier, PCI product identifier, etc., which is used to uniquely identify the smart network card. Then, based on the manufacturer information, it is determined whether there is a dedicated configuration template corresponding to the manufacturer pre-stored in the platform database. If so, 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 smart network card; if not, 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 smart network card.

[0099] Among them, this application does not limit the specific content of each configuration template, which can be provided by the manufacturer according to the specifics of their respective products. For example, the configuration template can be an openvswitch ovsdb configuration template. Since most manufacturers use openvswitch technology, it can also be used as a general template; the configuration template can also be a vdpa program configuration template, a manufacturer-defined configuration template, etc. The 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 according to the technology used by each, and this application does not limit it.

[0100] For example, Figure 4 This is a schematic diagram of a templated configuration architecture of a multi-vendor device provided in an embodiment of the present application. Figure 4 As shown, in Figure 1 Based on the configurable template program, the cloud management program (nova-compute) calls the fixed interface to the configurable template program, and the configurable template program determines and calls the preset interface of the target configuration template to configure the smart network card. At this point, the cloud management program no longer needs to be programmed multiple times, and the configuration can be completed by directly calling the standard API of the configuration template. The configuration of smart network cards from different manufacturers only needs to provide specific templates, which not only reduces the number of coding times of the cloud management program, but also reduces the overall management complexity.

[0101] The configuration method of the smart network card provided in the embodiment of the present application includes: obtaining the specification requirement information of the user for the target virtual machine; wherein the specification requirement information represents the requirement for the specification attributes of the target virtual machine; retrieving the relevant information of each server, screening out the target server according to the relevant information and specification requirement information of each server, 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. The scheme of the present application screens the target virtual network port through the specification requirement information, and calls the preset interface of the corresponding configuration template to realize the configuration of the smart network card. The devices of different manufacturers only need to provide the corresponding specific templates, which reduces the management complexity, realizes that the devices of different hardware manufacturers can be scheduled and used in the same cloud environment, and also realizes that the computing node side uses the same configuration strategy to complete the configuration management of multi-vendor devices, reducing the management cost.

[0102] Based on the above embodiments, in some possible embodiments, after completing the configuration of the smart network card, the following may be 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 to use the target virtual machine later.

[0104] For example, Figure 5 The following is a schematic diagram of the overall process of creating a virtual machine provided in the embodiment of the present application. Taking the OpenStack cloud platform as an example, Figure 5 As shown, after the user creates a virtual machine, he enters the corresponding specification requirement information. In the scheduling stage, the cloud scheduler in the OpenStack cloud platform can find out whether there is a matching server according to the user's specification requirement information, that is, find out whether there is a server that meets the specification requirement information. If there is no matching server, the user can adjust the specification requirement information. If there is a matching server, check whether there is an available virtual network port in the matching server. If there is an available virtual network port, the virtual network port can be allocated. If there is no available virtual network port, it ends directly. In the startup stage, after allocating the available virtual network port, the cloud scheduler notifies the computing node cloud management program (nova-compute) in the cloud platform that a virtual machine has been created, and the computing node cloud management program determines whether there is a corresponding exclusive configuration template. If there is an exclusive configuration template, the preset interface of the exclusive configuration template is called to configure the smart network card. If there is no exclusive configuration template, the preset interface of the general configuration template is called to configure the smart network card. After the configuration is completed, the preset virtual machine management interface (such as Libvirt interface) is called to pull up the virtual machine to complete 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 is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0106] Figure 6 The following is a schematic diagram of a configuration device for a smart 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 used to acquire 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.

[0108] The screening unit 602 is used to retrieve the relevant information of each server, screen out the target server according to 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 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.

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

[0111] Figure 7 A structural diagram of another configuration device of 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 acquisition unit 701 is used to acquire 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.

[0113] The screening unit 702 is used to retrieve the relevant information of each server, screen out the target server according to 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 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.

[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 and specification requirement information of each server, 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 used to lock any unlocked available virtual network port in the target server, and determine the locked 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 determination module 7031 is used to determine the manufacturer information of the smart network card that provides the target virtual network port based on the target virtual network port.

[0121] The second determination 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 determination 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 acquisition 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, and the launching unit 704 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 effect 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 only 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. And these modules can all be implemented in the form of software called by processing elements; they can also be all 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, it can also be stored in the memory of the above device in the form of program code, and the functions of the above data processing modules can be called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, all or part of these modules can 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 module above can be completed by an integrated logic circuit of hardware in the processor element or 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 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 the processor can also be any conventional processor, etc. The method disclosed in the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution.

[0131] An embodiment of the present application also 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 methods described above.

[0132] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to computer instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0133] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement any of the aforementioned methods when executed by a processor.

[0134] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0135] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

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 according to 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 a virtual machine that can be provided by the server; 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 Filter out target servers according to the relevant information of each server and the specification requirement information, including: The relevant information of each server is compared with the specification requirement information, a server that meets the specification requirement information is selected, and a 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, characterized in that: Based on the target virtual network port, determining a target configuration template includes: Based on the target virtual network port, determine the manufacturer information of the 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 general configuration template is determined as the target configuration template.

5. The method according to claim 1, characterized in that: 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, it also includes: The preset virtual machine management interface is called to start the target virtual machine.

8. A configuration device for a smart network card, characterized in that: The device comprises: An acquisition unit, configured to acquire specification requirement information of a user for a target virtual machine; wherein the specification requirement information represents the requirement for specification attributes of the target virtual machine; A screening unit, used to retrieve relevant information of each server, screen out a target server according to 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 a virtual machine that can be provided by the server; 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 comprises: 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

  • Virtual network configuration method and system of bare metal server and intelligent network card

    CN114070723A

  • Systems and methods for automated commissioning of virtualized distributed control systems

    WO2015048384A1

  • Data processing method, programmable network card device, physical server, and storage medium

    WO2023087938A1