Disclosure of Invention
In a first aspect, the present application provides a method for managing virtual functions. The management method comprises the following steps: configuring at least one physical function through physical function driving, and configuring at least one virtual function with a first corresponding relation with the at least one physical function by utilizing single-root input-output virtualization; loading one or more virtual functions in the at least one virtual function through a virtual function driver, distributing universal unique identifiers to the loaded one or more virtual functions, notifying the one or more virtual functions of respective universal unique identifiers to the physical function driver, configuring at least one virtual machine with a second corresponding relation with the one or more virtual functions, and enabling the virtual function meeting the second corresponding relation to be directly connected with the virtual machine; and managing, by the physical function driver, respective bandwidth configurations and the number of network subinterfaces of the at least one virtual machine based on respective universal unique identifiers of the one or more virtual functions.
According to the first aspect of the application, on the basis of constructing the first corresponding relation and constructing the second corresponding relation, the first corresponding relation between the configured physical function and the configured virtual function and the second corresponding relation between the loaded virtual function and the virtual machine are respectively determined, the loading process of the virtual function is optimized, the virtual function driver is allocated with a universal unique identifier when loading the virtual function, and the physical function driver is also informed of the respective universal unique identifier of the one or more virtual functions, so that the physical function driver can distinguish each loaded virtual function by utilizing the universal unique identifier; on the one hand, the direct connection between the virtual machine and the loaded virtual function is maintained, on the other hand, only the virtual function loaded by the virtual function driver is notified to the physical function driver by the universal unique mark know the talent, which means that only the virtual function channel actually utilized is brought into the management range of the physical function driver, thus effectively overcoming the problem caused by independently setting the maximum data transmission rate or the maximum network sub-interface number for each virtual function; in addition, the physical function driver can refine the virtual functions corresponding to each physical function by utilizing the universal unique identifier, namely the virtual functions which are loaded in the virtual functions corresponding to each physical function and are allocated with the universal unique identifier are managed in a refined mode, so that flexible and rich configuration can be carried out in the framework of the overall resource management strategy; because the additional resource management interface is provided through the physical function drive, and the virtual function is obtained through the single-root input-output virtualization from the physical function virtualization, the respective bandwidth configuration and the number of network sub-interfaces of the virtual machine are managed through the physical function drive, the direct connection of a data plane is not influenced, and meanwhile, the flexibility of a control plane is maintained; high bandwidth utilization and high resource utilization are realized, and the complexity in the aspect of virtual function resource management of the virtual machine can be flexibly dealt with.
In a possible implementation manner of the first aspect of the present application, the management method further includes: removing a first virtual function in the at least one virtual function through the virtual function driver, and notifying the universal unique identifier of the first virtual function to the physical function driver; and determining a first virtual machine which meets the second corresponding relation between the at least one virtual machine and the first virtual function based on the universal unique identification of the first virtual function through the physical function drive, deleting the bandwidth configuration of the first virtual machine which is associated with the first virtual function, and recycling the distributed network sub-interface of the first virtual machine which is associated with the first virtual function.
In a possible implementation manner of the first aspect of the present application, the management method further includes: and managing, by the physical function driver, resource applications from the one or more virtual functions based on the respective universal unique identifiers of the one or more virtual functions.
In a possible implementation manner of the first aspect of the present application, the physical function driver is implemented by expanding a network interface configuration command: and managing respective bandwidth configurations and network sub-interface numbers of the at least one virtual machine based on the respective universal unique identifiers of the one or more virtual functions.
In a possible implementation manner of the first aspect of the present application, the bandwidth configuration includes a downstream maximum bandwidth, an upstream maximum bandwidth, and a source machine address fraud prevention check.
In a possible implementation manner of the first aspect of the present application, the physical function driver is deployed in a kernel mode of a host machine, the virtual function driver is provided by a system simulator, and the system simulator is deployed in a user mode of the host machine, and the system simulator is configured to: analyzing the universal unique identifiers of the one or more virtual functions so as to determine the bus device function identifiers of the physical functions meeting the first corresponding relation between the one or more virtual functions, notifying the universal unique identifiers of the one or more virtual functions to the physical function driver, and notifying the bus device function identifiers of the physical functions meeting the first corresponding relation between the one or more virtual functions to the physical function driver.
In a possible implementation manner of the first aspect of the present application, a hardware side connected to the host includes a microprocessor, where the microprocessor is configured to provide a group policy management device, where the group policy management device is configured to provide, for the at least one physical function, a sending rate speed limit configuration and a device specification configuration of a group-level physical function, where the group-level physical function includes at least two physical functions of the at least one physical function.
In a possible implementation manner of the first aspect of the present application, the group policy management means is configured to provide hardware resource management across physical functions.
In a possible implementation manner of the first aspect of the present application, the at least one physical function includes a first physical function and a second physical function, the first correspondence is satisfied between a first set of virtual functions in the at least one virtual function and the first physical function, the first correspondence is satisfied between a second set of virtual functions in the at least one virtual function and the second physical function, the second correspondence is satisfied between a second virtual machine in the at least one virtual machine and the first set of virtual functions, and the second correspondence is satisfied between the second virtual machine and the second set of virtual functions, the management method further includes: and executing unified sending rate speed limiting configuration and equipment specification configuration on the virtual functions meeting the second corresponding relation with the second virtual machine through a group policy management device.
In a possible implementation manner of the first aspect of the present application, the physical function and the virtual function that satisfy the first correspondence correspond to a same ethernet port and use a bandwidth of the same ethernet port.
In a possible implementation manner of the first aspect of the present application, the second virtual machine uses bandwidths of ethernet ports corresponding to the first physical function and the second physical function respectively.
In a second aspect, embodiments of the present application further provide a computer device, the computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a method according to any one of the implementations of any one of the above aspects when the computer program is executed.
In a third aspect, embodiments of the present application also provide a computer-readable storage medium storing computer instructions that, when run on a computer device, cause the computer device to perform a method according to any one of the implementations of any one of the above aspects.
In a fourth aspect, embodiments of the present application also provide a computer program product comprising instructions stored on a computer-readable storage medium, which when run on a computer device, cause the computer device to perform a method according to any one of the implementations of any one of the above aspects.
In a fifth aspect, the embodiment of the present application further provides a virtual function management system. The management system includes: physical function driver for: configuring at least one physical function, and configuring at least one virtual function with a first correspondence between the at least one physical function using single root input-output virtualization; virtual function driver for: loading one or more virtual functions in the at least one virtual function, distributing universal unique identifiers to the loaded one or more virtual functions, notifying the one or more virtual functions of respective universal unique identifiers to the physical function driver, configuring at least one virtual machine with a second corresponding relation with the one or more virtual functions, and enabling a virtual function meeting the second corresponding relation to be directly connected with the virtual machine, wherein the physical function driver is further used for: and managing respective bandwidth configurations and network sub-interface numbers of the at least one virtual machine based on the respective universal unique identifiers of the one or more virtual functions.
According to the fifth aspect of the application, on the basis of constructing the first corresponding relation and constructing the second corresponding relation, the first corresponding relation between the configured physical function and the configured virtual function and the second corresponding relation between the loaded virtual function and the virtual machine are respectively determined, the loading process of the virtual function is optimized, the virtual function driver is allocated with a universal unique identifier when loading the virtual function, and the physical function driver is also informed of the respective universal unique identifier of the one or more virtual functions, so that the physical function driver can distinguish each loaded virtual function by utilizing the universal unique identifier; on the one hand, the direct connection between the virtual machine and the loaded virtual function is maintained, on the other hand, only the virtual function loaded by the virtual function driver is notified to the physical function driver by the universal unique mark know the talent, which means that only the virtual function channel actually utilized is brought into the management range of the physical function driver, thus effectively overcoming the problem caused by independently setting the maximum data transmission rate or the maximum network sub-interface number for each virtual function; in addition, the physical function driver can refine the virtual functions corresponding to each physical function by utilizing the universal unique identifier, namely the virtual functions which are loaded in the virtual functions corresponding to each physical function and are allocated with the universal unique identifier are managed in a refined mode, so that flexible and rich configuration can be carried out in the framework of the overall resource management strategy; because the additional resource management interface is provided through the physical function drive, and the virtual function is obtained through the single-root input-output virtualization from the physical function virtualization, the respective bandwidth configuration and the number of network sub-interfaces of the virtual machine are managed through the physical function drive, the direct connection of a data plane is not influenced, and meanwhile, the flexibility of a control plane is maintained; high bandwidth utilization and high resource utilization are realized, and the complexity in the aspect of virtual function resource management of the virtual machine can be flexibly dealt with.
In a possible implementation manner of the fifth aspect of the present application, the virtual function driver is further configured to: removing a first virtual function in the at least one virtual function, and notifying the universal unique identification of the first virtual function to the physical function driver; the physical function driver is further configured to: based on the universal unique identifier of the first virtual function, determining a first virtual machine which meets the second corresponding relation between the at least one virtual machine and the first virtual function, deleting bandwidth configuration of the first virtual machine associated with the first virtual function, and recycling an allocated network sub-interface of the first virtual machine associated with the first virtual function.
In a possible implementation manner of the fifth aspect of the present application, the physical function driver is deployed in a kernel mode of a host machine, the virtual function driver is provided by a system simulator, and the system simulator is deployed in a user mode of the host machine, and the system simulator is configured to: analyzing the universal unique identifiers of the one or more virtual functions so as to determine the bus device function identifiers of the physical functions meeting the first corresponding relation between the one or more virtual functions, notifying the universal unique identifiers of the one or more virtual functions to the physical function driver, and notifying the bus device function identifiers of the physical functions meeting the first corresponding relation between the one or more virtual functions to the physical function driver.
In a possible implementation manner of the fifth aspect of the present application, a hardware side connected to the host includes a microprocessor, where the microprocessor is configured to provide a group policy management device, where the group policy management device is configured to provide, for the at least one physical function, a sending rate speed limit configuration and a device specification configuration of a group-level physical function, where the group-level physical function includes at least two physical functions of the at least one physical function.
In a possible implementation manner of the fifth aspect of the present application, the at least one physical function includes a first physical function and a second physical function, the first correspondence is satisfied between a first set of virtual functions in the at least one virtual function and the first physical function, the first correspondence is satisfied between a second set of virtual functions in the at least one virtual function and the second physical function, the second correspondence is satisfied between a second virtual machine in the at least one virtual machine and the first set of virtual functions, the second correspondence is satisfied between the second virtual machine and the second set of virtual functions, and the management system further includes a group policy management device, where the group policy management device is configured to: and executing unified sending rate speed limiting configuration and equipment specification configuration on the virtual functions which meet the second corresponding relation with the second virtual machine.
Detailed Description
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that in the description of the application, "at least one" means one or more than one, and "a plurality" means two or more than two. In addition, the words "first," "second," and the like, unless otherwise indicated, are used solely for the purposes of description and are not to be construed as indicating or implying a relative importance or order.
Fig. 1 is a flow chart of a virtual function management method according to an embodiment of the present application. As shown in fig. 1, the management method includes the following steps.
Step S110: at least one physical function is configured through physical function driving, and at least one virtual function having a first correspondence with the at least one physical function is configured by single-root input-output virtualization.
Step S120: loading one or more virtual functions in the at least one virtual function through a virtual function driver, distributing universal unique identifiers to the loaded one or more virtual functions, notifying the one or more virtual functions of respective universal unique identifiers to the physical function driver, configuring at least one virtual machine with a second corresponding relation with the one or more virtual functions, and enabling the virtual function meeting the second corresponding relation to be directly connected with the virtual machine.
Step S130: and managing, by the physical function driver, respective bandwidth configurations and the number of network subinterfaces of the at least one virtual machine based on respective universal unique identifiers of the one or more virtual functions.
Referring to fig. 1, the virtual function management method shown in fig. 1 can be applied to technical fields such as cloud computing, large-scale data centers and the like, and can be used for cloud games, short videos, network function virtualization (Network Function Virtualization, NFV) and the like, and the technical fields and applications have higher requirements on data throughput rate and network delay. In order to customize input and output resources by users and to improve the utilization rate of the resources, a Single Root Input and Output Virtualization (SRIOV) is utilized to virtualize a plurality of virtual functions by one physical function, and then the virtual functions are directly connected to a virtual machine, so that the input and output processing performance of the virtual functions can be improved, and the time delay is reduced and the throughput rate is improved. A through relation may be established between a virtual machine and a plurality of virtual functions, the virtual machine can realize message transceiving of a plurality of network ports through the plurality of virtual functions, data reading and writing of a plurality of storage disks, a plurality of data channels and the like, so that a user of the virtual machine has higher flexibility and operation space in the aspect of customizing input and output resources. However, the multiple virtual functions that establish the through relationship with the same virtual machine may be from the same physical function or from different physical functions, so that the association relationship between the multiple virtual functions that establish the through relationship with the same virtual machine is difficult to predict, which brings challenges to managing virtual function resources of the entire virtual machine. If the maximum data transmission rate or the maximum number of network subinterfaces is set for each virtual function individually, it is disadvantageous to fully utilize limited bandwidth resources and interface resources, which is disadvantageous to cloud vendors to manage virtual machines and users to use the virtual machines, and if each virtual performs bandwidth speed limiting according to an individual speed limiting scheme, it means that the maximum bandwidth is limited by the number of enabled virtual functions, and all bandwidths can be utilized only when each virtual function participates in input and output, which is not friendly to both cloud vendors and users. The following describes in detail, in connection with a specific embodiment of the present application, how the management method of virtual functions shown in fig. 1 achieves high bandwidth utilization and high resource utilization, and can flexibly cope with complexity in terms of virtual function resource management of a virtual machine.
With continued reference to fig. 1, at step S110, at least one physical function is configured through physical function driving, and at least one virtual function having a first correspondence with the at least one physical function is configured using single root input output virtualization. Thus, flexible configuration of input and output resources is realized, and the first corresponding relation defines the corresponding relation between the at least one physical function and the at least one virtual function, so that by analyzing the first corresponding relation, the physical function corresponding to a certain virtual function can be determined, or the corresponding virtual function obtained by virtualizing the certain physical function by utilizing single input and output virtualization can be determined. Then, in step S120, one or more virtual functions of the at least one virtual function are loaded through a virtual function driver, a universal unique identifier is assigned to the loaded one or more virtual functions, the one or more virtual functions are notified of their respective universal unique identifiers to the physical function driver, and at least one virtual machine having a second correspondence relationship with the one or more virtual functions is configured, and a pass-through between the virtual function satisfying the second correspondence relationship and the virtual machine is made. In this way, on the basis of the first correspondence between the physical function and the virtual function constructed in step S110, the loading process of the virtual function is optimized in step S120. It should be understood that loading one or more of the at least one virtual functions means that the one or more virtual functions are loaded virtual functions, i.e. virtual functions that are actually enabled, while virtual functions that are not loaded are not currently enabled. For the loaded virtual functions, i.e. the one or more virtual functions, the virtual function driver assigns a universally unique identifier (Universally Unique Identifier, UUID) to the virtual function when loading the virtual functions, so that each loaded, i.e. enabled, virtual function is assigned a universally unique identifier for distinguishing each loaded virtual function. The virtual function driver also informs the physical function driver of the respective universal unique identifier of the one or more virtual functions so that the physical function driver can distinguish each loaded virtual function using the universal unique identifier. The virtual function driver further configures at least one virtual machine having a second correspondence with the one or more virtual functions, and causes a pass-through between the virtual function satisfying the second correspondence and the virtual machine. Thus, the loaded one or more virtual functions and the virtual machine are directly connected, so that the input and output processing performance of the virtual functions can be improved, and the time delay and the throughput rate are reduced. The second correspondence defines a correspondence between the loaded virtual function and the virtual machine, so that by analyzing the second correspondence, the virtual machine corresponding to a certain virtual function (i.e., a through relationship exists) can be determined, or all virtual functions corresponding to a certain virtual machine (i.e., a through relationship exists) can be determined.
With continued reference to fig. 1, on the basis of the first correspondence constructed in step S110 and the second correspondence constructed in step S120, a first correspondence between the configured physical function and the configured virtual function and a second correspondence between the loaded virtual function and the virtual machine are respectively determined, and the loading process of the virtual function is optimized, and the virtual function driver is assigned with a universal unique identifier when loading the virtual function, and also notifies the physical function driver of the respective universal unique identifiers of the one or more virtual functions, so that the physical function driver can distinguish each loaded virtual function by using the universal unique identifier. then, in step S130, the respective bandwidth configuration and the number of network subinterfaces of the at least one virtual machine are managed by the physical function driver based on the respective universal unique identifiers of the one or more virtual functions. In this way, the loading process of the virtual function is optimized on the basis of the through between the virtual machine and the loaded virtual function, and the virtual function driver allocates a universal unique identifier to each loaded virtual function, so that the physical function driver can distinguish and manage the loaded virtual function corresponding to the virtual function based on the universal unique identifier, and the physical function driver can provide a resource management interface based on the universal unique identifier, for example, configure a downlink maximum bandwidth, configure an uplink maximum bandwidth, configure the number of subinterfaces, configure source physical address fraud prevention check, and the like, and can also create private configuration and private configuration files and subdirectories for the virtual machine through the universal unique identifier. Because the respective bandwidth configuration and the number of network subinterfaces of the at least one virtual machine are managed through the physical function driver, the virtual functions corresponding to each physical function can be refined, and the loaded, i.e. enabled, virtual functions can be subjected to bandwidth speed limiting and interface number limiting by utilizing the respective universal unique identification of the one or more virtual functions. Therefore, on the one hand, the direct connection between the virtual machine and the loaded virtual function is maintained, on the other hand, only the virtual function loaded by the virtual function driver is notified of the physical function driver by the universal unique label know the talent, which means that only the virtual function channel actually utilized is brought into the management range of the physical function driver, thus effectively overcoming the problem caused by individually setting the maximum data transmission rate or the maximum number of network subinterfaces for each virtual function. And because the physical function driver can use the universal unique identifier to refine the virtual functions corresponding to each physical function, namely, to finely manage the virtual functions loaded in the virtual functions corresponding to each physical function and allocated with the universal unique identifier, flexible and rich configuration can be performed in the framework of the overall resource management strategy, for example, the downlink maximum bandwidth is configured, the uplink maximum bandwidth is configured, the number of sub-interfaces is configured, the source physical address fraud prevention check is configured, and private configuration files and sub-directories can be created for the virtual machine through the universal unique identifier, so that the user customization requirement is better met. further, because the additional resource management interface is provided through the physical function driver, and the virtual function is obtained through the single-root input-output virtualization and the physical function virtualization, the respective bandwidth configuration and the number of network sub-interfaces of the virtual machine are managed through the physical function driver, the pass-through of the data plane is not affected, and meanwhile, the flexibility of the control plane is maintained. Further, the virtual function management method shown in fig. 1 optimizes the loading process of the virtual functions, the virtual function driver allocates a universal unique identifier when loading the virtual functions, and also notifies the physical function driver of the respective universal unique identifiers of the one or more virtual functions, so that the physical function driver can distinguish each loaded virtual function by using the universal unique identifier; therefore, the configuration scheme is convenient to apply to the existing configuration scheme of physical functions and virtual functions, the change range of the kernel-mode physical function drive is small, the network interface configuration command (IP LINK) can be driven by expanding the physical function, for example, the command line command is expanded and parameterized configuration is added, so that the overall resource planning can be realized, and higher flexibility and operation space in the aspect of customizing input and output resources can be realized.
In summary, the virtual function management method shown in fig. 1 respectively determines, based on the construction of the first correspondence and the construction of the second correspondence, the first correspondence between the configured physical function and the configured virtual function and the second correspondence between the loaded virtual function and the virtual machine, optimizes the loading process of the virtual function, allocates a universal unique identifier when the virtual function is loaded, and also notifies the physical function driver of the respective universal unique identifier of the one or more virtual functions, so that the physical function driver can distinguish each loaded virtual function by using the universal unique identifier; on the one hand, the direct connection between the virtual machine and the loaded virtual function is maintained, on the other hand, only the virtual function loaded by the virtual function driver is notified to the physical function driver by the universal unique mark know the talent, which means that only the virtual function channel actually utilized is brought into the management range of the physical function driver, thus effectively overcoming the problem caused by independently setting the maximum data transmission rate or the maximum network sub-interface number for each virtual function; in addition, the physical function driver can refine the virtual functions corresponding to each physical function by utilizing the universal unique identifier, namely the virtual functions which are loaded in the virtual functions corresponding to each physical function and are allocated with the universal unique identifier are managed in a refined mode, so that flexible and rich configuration can be carried out in the framework of the overall resource management strategy; because the additional resource management interface is provided through the physical function drive, and the virtual function is obtained through the single-root input-output virtualization from the physical function virtualization, the respective bandwidth configuration and the number of network sub-interfaces of the virtual machine are managed through the physical function drive, the direct connection of a data plane is not influenced, and meanwhile, the flexibility of a control plane is maintained; high bandwidth utilization and high resource utilization are realized, and the complexity in the aspect of virtual function resource management of the virtual machine can be flexibly dealt with.
In one possible implementation manner, the management method further includes: removing a first virtual function in the at least one virtual function through the virtual function driver, and notifying the universal unique identifier of the first virtual function to the physical function driver; and determining a first virtual machine which meets the second corresponding relation between the at least one virtual machine and the first virtual function based on the universal unique identification of the first virtual function through the physical function drive, deleting the bandwidth configuration of the first virtual machine which is associated with the first virtual function, and recycling the distributed network sub-interface of the first virtual machine which is associated with the first virtual function. In this way, the physical function driver can refine the virtual functions corresponding to each physical function by using the universal unique identifier, namely, the virtual functions which are loaded in the virtual functions corresponding to each physical function and are allocated with the universal unique identifier are managed in a refined manner, so that flexible and rich configuration can be performed in the framework of the overall resource management strategy, virtual function removal, corresponding bandwidth configuration deletion and recovery of allocated network subinterfaces are provided, and resource recovery and reutilization are facilitated, and resource utilization is improved.
In one possible implementation manner, the management method further includes: and managing, by the physical function driver, resource applications from the one or more virtual functions based on the respective universal unique identifiers of the one or more virtual functions. In this way, the physical function driver can refine to the virtual function corresponding to each physical function by using the universal unique identifier, that is, the virtual function which is loaded in the virtual function corresponding to each physical function and is allocated with the universal unique identifier is managed in a refined manner, so that flexible and rich configuration can be performed within the framework of the overall resource management strategy.
In one possible implementation, the physical function driver is implemented by expanding a network interface configuration command: and managing respective bandwidth configurations and network sub-interface numbers of the at least one virtual machine based on the respective universal unique identifiers of the one or more virtual functions. Therefore, the configuration scheme is convenient to apply to the existing configuration scheme of physical functions and virtual functions, the change range of the kernel-mode physical function drive is small, the network interface configuration command (IP LINK) can be driven by expanding the physical function, for example, the command line command is expanded and parameterized configuration is added, so that the overall resource planning can be realized, and higher flexibility and operation space in the aspect of customizing input and output resources can be realized.
In one possible implementation, the bandwidth configuration includes a downstream maximum bandwidth, an upstream maximum bandwidth, and a source machine address fraud prevention check. In this way, the physical function driver can refine to the virtual function corresponding to each physical function by using the universal unique identifier, that is, the virtual function which is loaded in the virtual function corresponding to each physical function and is allocated with the universal unique identifier is managed in a refined manner, so that flexible and rich configuration can be performed within the framework of the overall resource management strategy.
In one possible implementation, the physical function driver is deployed in a kernel mode of a host machine, the virtual function driver is provided by a system simulator, and the system simulator is deployed in a user mode of the host machine, the system simulator is configured to: analyzing the universal unique identifiers of the one or more virtual functions so as to determine the bus device function identifiers of the physical functions meeting the first corresponding relation between the one or more virtual functions, notifying the universal unique identifiers of the one or more virtual functions to the physical function driver, and notifying the bus device function identifiers of the physical functions meeting the first corresponding relation between the one or more virtual functions to the physical function driver. As such, various virtualization technologies and products, such as open-source virtual machine monitors and simulators employed in applications of cloud computing and cloud services, may be adapted for simulating various hardware platforms.
In some embodiments, a hardware side connected to the host includes a microprocessor for providing a group policy management means for providing a transmission rate limit configuration and a device specification configuration of a group level of physical functions for the at least one physical function, the group level of physical functions including at least two of the at least one physical function. Thus, on the basis of the management implemented by the physical function driver (based on the respective universal unique identifier of the one or more virtual functions, the respective bandwidth configuration and the number of network subinterfaces of the at least one virtual machine are managed by the physical function driver), an additional management means is provided, so that the physical function driver maintains the management of the own virtual function and the universal unique identifier, and a microprocessor, such as a micro control unit (Microcontroller Unit, MCU), is added on the hardware side, so that the virtual functions corresponding to the respective physical functions can be supported to join the same virtual machine. Therefore, by supporting the virtual functions corresponding to the physical functions to join the same virtual machine and providing a group policy management device for resource management of the virtual functions, the input/output bandwidth of hardware is fully utilized, the reliability of the system is improved, and cloud manufacturers can manage the virtual functions based on the whole hardware resources without being limited by the division of the hardware resources by the physical functions. For example, taking a network card as an example, one physical function and its corresponding virtual function correspond to one ethernet port, by supporting that virtual functions corresponding to multiple physical functions are added to the same virtual machine, the bandwidths of multiple ethernet ports can be used, so that the interruption of the flow of the whole virtual machine caused by the failure of one ethernet port can be avoided. In some embodiments, the set of policy management means is for providing hardware resource management across physical functions. In this way, cloud vendors are facilitated to manage based on the entire hardware resources, without being limited by the partitioning of the hardware resources by physical functions.
In one possible implementation manner, the at least one physical function includes a first physical function and a second physical function, the first correspondence is satisfied between a first set of virtual functions of the at least one virtual function and the first physical function, the first correspondence is satisfied between a second set of virtual functions of the at least one virtual function and the second physical function, the second correspondence is satisfied between a second virtual machine of the at least one virtual machine and the first set of virtual functions, the second correspondence is satisfied between the second virtual machine and the second set of virtual functions, and the management method further includes: and executing unified sending rate speed limiting configuration and equipment specification configuration on the virtual functions meeting the second corresponding relation with the second virtual machine through a group policy management device. In this way, cloud vendors are facilitated to manage based on the entire hardware resources, without being limited by the partitioning of the hardware resources by physical functions.
In some embodiments, the physical and virtual functions satisfying the first correspondence correspond to the same ethernet port and use the bandwidth of the same ethernet port. In some embodiments, the second virtual machine uses the bandwidth of the ethernet port to which the first physical function and the second physical function each correspond. Therefore, by supporting the virtual functions corresponding to the physical functions to join the same virtual machine and providing a group policy management device for resource management of the virtual functions, the input/output bandwidth of hardware is fully utilized, the reliability of the system is improved, and the bandwidths of a plurality of Ethernet panel ports can be used, so that the flow interruption of the whole virtual machine caused by the failure of one Ethernet panel port can be avoided.
Fig. 2 is a schematic diagram of a management system for virtual functions according to an embodiment of the present application. As shown in fig. 2, the management system includes: a physical function driver 202 for: configuring at least one physical function, and configuring at least one virtual function with a first correspondence between the at least one physical function using single root input-output virtualization; virtual function driver 204 for: loading one or more virtual functions in the at least one virtual function, distributing universal unique identifiers to the loaded one or more virtual functions, notifying the one or more virtual functions of respective universal unique identifiers to the physical function driver 202, configuring at least one virtual machine with a second corresponding relation with the one or more virtual functions, and enabling the virtual function meeting the second corresponding relation to be directly connected with the virtual machine. Wherein the physical function driver 202 is further configured to: and managing respective bandwidth configurations and network sub-interface numbers of the at least one virtual machine based on the respective universal unique identifiers of the one or more virtual functions. As shown in FIG. 2, the physical function driver 202 is deployed in a host kernel mode 250, the virtual function driver 204 is provided by a system simulator 260, and the system simulator 260 is deployed in the host user mode 252. The system simulator 260 is configured to: analyzing the universal unique identifiers of the one or more virtual functions to determine the bus device function identifiers of the physical functions meeting the first correspondence relationship with the one or more virtual functions, notifying the physical function driver 202 of the universal unique identifiers of the one or more virtual functions, and notifying the physical function driver 202 of the bus device function identifiers of the physical functions meeting the first correspondence relationship with the one or more virtual functions.
Referring to fig. 2, at least one physical function and at least one virtual function are exemplarily shown in fig. 2. The first correspondence defines a correspondence between the at least one physical function and the at least one virtual function, so that by analyzing the first correspondence, a physical function corresponding to a certain virtual function can be determined, or a corresponding virtual function obtained by virtualizing the certain physical function by using single input/output virtualization can be determined. As shown in fig. 2, the physical function driver 202 configures a physical function a210 and a physical function B220, and also configures a virtual function a212 of the physical function a210, a virtual function B214 of the physical function a210, a virtual function C222 of the physical function B220, and a virtual function D224 of the physical function B220. The system simulator 260 may be an open-source virtual machine monitor and simulator (QEMU) employed in applications of cloud computing and cloud services, operable to simulate a plurality of hardware platforms. A through relation may be established between a virtual machine and a plurality of virtual functions, the virtual machine can realize message transceiving of a plurality of network ports through the plurality of virtual functions, data reading and writing of a plurality of storage disks, a plurality of data channels and the like, so that a user of the virtual machine has higher flexibility and operation space in the aspect of customizing input and output resources. However, the plurality of virtual functions that establish the through relationship with the same virtual machine may be from the same physical function or may be from different physical functions, and therefore, the association relationship between the plurality of virtual functions that establish the through relationship with the same virtual machine is difficult to predict. For example, the virtual function a212 of the physical function a210 and the virtual function C222 of the physical function B220 shown in fig. 2 correspond to the physical function a210 and the physical function B220, respectively, and the same virtual machine may support two ports using the virtual function a212 of the physical function a210 and the virtual function C222 of the physical function B220, respectively, or be used to support data channels of two storage disks. Because the physical function driver 202 can use the universal unique identifier to refine to the virtual function corresponding to each physical function, that is, to finely manage the virtual functions loaded and allocated with the universal unique identifier in the virtual functions corresponding to each physical function, flexible and rich configuration can be performed within the framework of the overall resource management policy.
With continued reference to fig. 2, in some embodiments, the hardware side 254 coupled to the host includes a microprocessor 270, the microprocessor 270 being configured to provide a group policy management device 272, the group policy management device 272 being configured to provide a transmission rate limiting configuration and a device specification configuration of group-level physical functions for the at least one physical function, the group-level physical functions including at least two of the at least one physical function. In this way, on the basis of the management implemented by the physical function driver 202 (by the physical function driver 202, based on the respective universal unique identifier of the one or more virtual functions, the respective bandwidth configuration and the number of network subinterfaces of the at least one virtual machine are managed), an additional management means is provided, so that the physical function driver 202 maintains the management of the own virtual function and the universal unique identifier, and a microprocessor 270, such as a micro control unit (Microcontroller Unit, MCU), is added to the hardware side 254, so as to support the virtual functions corresponding to the multiple physical functions to join the same virtual machine. In this way, by supporting the virtual functions corresponding to the physical functions to join the same virtual machine, and providing the group policy management device 272 for resource management of the virtual functions, it is beneficial to fully utilize the input/output bandwidth of the hardware and improve the reliability of the system, and also beneficial to the cloud manufacturer to manage based on the whole hardware resources, without being limited by the division of the hardware resources by the physical functions. For example, taking a network card as an example, one physical function and its corresponding virtual function correspond to one ethernet port, by supporting that virtual functions corresponding to multiple physical functions are added to the same virtual machine, the bandwidths of multiple ethernet ports can be used, so that the interruption of the flow of the whole virtual machine caused by the failure of one ethernet port can be avoided.
In summary, the management system for virtual functions shown in fig. 2 determines, based on the construction of the first correspondence and the construction of the second correspondence, the first correspondence between the configured physical function and the configured virtual function and the second correspondence between the loaded virtual function and the virtual machine, optimizes the loading process of the virtual function, allocates a universal unique identifier to the virtual function driver 204 when loading the virtual function, and also notifies the physical function driver 202 of the respective universal unique identifier of the one or more virtual functions, so that the physical function driver 202 can distinguish each loaded virtual function by using the universal unique identifier; on the one hand, the direct connection between the virtual machine and the loaded virtual function is maintained, on the other hand, only the virtual function loaded by the virtual function driver 204 is notified to the physical function driver 202 by the universal unique label know the talent, which means that only the virtual function channel which is actually utilized is brought into the management range of the physical function driver 202, thus effectively overcoming the problem caused by individually setting the maximum data transmission rate or the maximum number of network subinterfaces for each virtual function; moreover, because the physical function driver 202 can use the universal unique identifier to refine to the virtual function corresponding to each physical function, that is, to finely manage the virtual function which is loaded and allocated with the universal unique identifier in the virtual functions corresponding to each physical function, flexible and rich configuration can be performed in the framework of the overall resource management policy; because the physical function driver 202 is used for providing an additional resource management interface, and the virtual function is obtained by virtualization of the physical function through single-root input/output virtualization, the respective bandwidth configuration and the number of network sub-interfaces of the virtual machine are managed through the physical function driver 202, the direct connection of a data plane is not influenced, and meanwhile, the flexibility of a control plane is maintained; high bandwidth utilization and high resource utilization are realized, and the complexity in the aspect of virtual function resource management of the virtual machine can be flexibly dealt with.
Referring to fig. 2, in one possible implementation, the virtual function driver 204 is further configured to: removing a first virtual function of the at least one virtual function, notifying the physical function driver 202 of a universally unique identification of the first virtual function; the physical function driver 202 is further configured to: based on the universal unique identifier of the first virtual function, determining a first virtual machine which meets the second corresponding relation between the at least one virtual machine and the first virtual function, deleting bandwidth configuration of the first virtual machine associated with the first virtual function, and recycling an allocated network sub-interface of the first virtual machine associated with the first virtual function. Thus, virtual function removal, corresponding bandwidth configuration deletion and recovery of allocated network subinterfaces are provided, which is beneficial to resource recovery and reuse and resource utilization improvement.
In one possible implementation, the at least one physical function includes a first physical function and a second physical function, the first correspondence is satisfied between a first set of virtual functions of the at least one virtual function and the first physical function, the first correspondence is satisfied between a second set of virtual functions of the at least one virtual function and the second physical function, the second correspondence is satisfied between a second virtual machine of the at least one virtual machine and the first set of virtual functions, the second correspondence is satisfied between the second virtual machine and the second set of virtual functions, the management system further includes a group policy management device 272, and the group policy management device 272 is configured to: and executing unified sending rate speed limiting configuration and equipment specification configuration on the virtual functions which meet the second corresponding relation with the second virtual machine. In this way, cloud vendors are facilitated to manage based on the entire hardware resources, without being limited by the partitioning of the hardware resources by physical functions.
Fig. 3 is a schematic structural diagram of a computing device according to an embodiment of the present application, where the computing device 300 includes: one or more processors 310, a communication interface 320, and a memory 330. The processor 310, the communication interface 320 and the memory 330 are interconnected by a bus 340. Optionally, the computing device 300 may further include an input/output interface 350, where the input/output interface 350 is connected to an input/output device for receiving parameters set by a user, etc. The computing device 300 can be used to implement some or all of the functionality of the device embodiments or system embodiments of the present application described above; the processor 310 can also be used to implement some or all of the operational steps of the method embodiments described above in connection with the embodiments of the present application. For example, specific implementations of the computing device 300 performing various operations may refer to specific details in the above-described embodiments, such as the processor 310 being configured to perform some or all of the steps of the above-described method embodiments or some or all of the operations of the above-described method embodiments. For another example, in an embodiment of the present application, the computing device 300 may be configured to implement some or all of the functionality of one or more components of the apparatus embodiments described above, and the communication interface 320 may be configured to implement communication functions and the like necessary for the functionality of the apparatus, components, and the processor 310 may be configured to implement processing functions and the like necessary for the functionality of the apparatus, components.
It should be appreciated that the computing device 300 of fig. 3 may include one or more processors 310, and that the plurality of processors 310 may cooperatively provide processing power in a parallelized connection, a serialized connection, a serial-parallel connection, or any connection, or the plurality of processors 310 may constitute a processor sequence or processor array, or the plurality of processors 310 may be separated into primary and secondary processors, or the plurality of processors 310 may have different architectures such as employing heterogeneous computing architectures. In addition, the computing device 300 shown in FIG. 3, the associated structural and functional descriptions are exemplary and not limiting. In some example embodiments, computing device 300 may include more or fewer components than shown in fig. 3, or combine certain components, or split certain components, or have a different arrangement of components.
Processor 310 may take many specific forms, for example, processor 310 may include one or more combinations of a central processing unit (central processing unit, CPU), a graphics processor (graphic processing unit, GPU), a neural network processor (neural-network processing unit, NPU), a tensor processor (tensor processing unit, TPU), or a data processor (data processing unit, DPU), and embodiments of the present application are not limited in this respect. Processor 310 may also be a single-core processor or a multi-core processor. The processor 310 may be formed by a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (FPGA) GATE ARRAY, generic array logic (GENERIC ARRAY logic, GAL), or any combination thereof. Processor 310 may also be implemented solely with logic devices incorporating processing logic, such as an FPGA or Digital Signal Processor (DSP), etc. The communication interface 320 may be a wired interface, which may be an ethernet interface, a local area network (local interconnect network, LIN), etc., or a wireless interface, which may be a cellular network interface, or use a wireless lan interface, etc., for communicating with other modules or devices.
The memory 330 may be a nonvolatile memory such as a read-only memory (ROM), a Programmable ROM (PROM), an erasable programmable ROM (erasable PROM, EPROM), an electrically erasable programmable EPROM (EEPROM), or a flash memory. Memory 330 may also be volatile memory, which may be random access memory (random access memory, RAM) used as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (double DATA RATE SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCHLINK DRAM, SLDRAM), and direct memory bus random access memory (direct rambus RAM, DR RAM). Memory 330 may also be used to store program code and data such that processor 310 invokes the program code stored in memory 330 to perform some or all of the operational steps of the method embodiments described above, or to perform corresponding functions in the apparatus embodiments described above. Moreover, computing device 300 may contain more or fewer components than shown in FIG. 3, or may have a different configuration of components.
Bus 340 may be a peripheral component interconnect express (PERIPHERAL COMPONENT INTERCONNECT EXPRESS, PCIe) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, a unified bus (unified bus, ubus or UB), a computer quick link (compute express link, CXL), a cache coherent interconnect protocol (cache coherent interconnect for accelerators, CCIX), or the like. The bus 340 may be divided into an address bus, a data bus, a control bus, and the like. The bus 340 may include a power bus, a control bus, a status signal bus, and the like in addition to a data bus. But is shown with only one bold line in fig. 3 for clarity of illustration, but does not represent only one bus or one type of bus.
The method and the device provided by the embodiment of the application are based on the same inventive concept, and because the principle of solving the problem by the method and the device is similar, the embodiment, the implementation, the example or the implementation of the method and the device can be mutually referred, and the repetition is not repeated. Embodiments of the present application also provide a system comprising a plurality of computing devices, each of which may be structured as described above. The functions or operations that may be implemented by the system may refer to specific implementation steps in the above method embodiments and/or specific functions described in the above apparatus embodiments, which are not described herein.
Embodiments of the present application also provide a computer-readable storage medium having stored therein computer instructions which, when executed on a computer device (e.g., one or more processors), implement the method steps of the method embodiments described above. The specific implementation of the processor of the computer readable storage medium in executing the above method steps may refer to specific operations described in the above method embodiments and/or specific functions described in the above apparatus embodiments, which are not described herein again.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. The application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Embodiments of the application may be implemented, in whole or in part, in software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein. The computer program product includes one or more computer instructions. When loaded or executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc. that contain one or more collections of available media. Usable media may be magnetic media (e.g., floppy disks, hard disks, tape), optical media, or semiconductor media. The semiconductor medium may be a solid state disk, or may be a random access memory, flash memory, read only memory, erasable programmable read only memory, electrically erasable programmable read only memory, register, or any other form of suitable storage medium.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. Each flow and/or block of the flowchart and/or block diagrams, and combinations of flows and/or blocks in the flowchart and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments. It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit or scope of the embodiments of the application. The steps in the method of the embodiment of the application can be sequentially adjusted, combined or deleted according to actual needs; the modules in the system of the embodiment of the application can be divided, combined or deleted according to actual needs. The present application is also intended to include such modifications and alterations if they come within the scope of the claims and the equivalents thereof.