CN113127144A - Processing method, processing device and storage medium - Google Patents

Processing method, processing device and storage medium Download PDF

Info

Publication number
CN113127144A
CN113127144A CN202010041685.XA CN202010041685A CN113127144A CN 113127144 A CN113127144 A CN 113127144A CN 202010041685 A CN202010041685 A CN 202010041685A CN 113127144 A CN113127144 A CN 113127144A
Authority
CN
China
Prior art keywords
virtual machine
sriov
port
vfs
binding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010041685.XA
Other languages
Chinese (zh)
Other versions
CN113127144B (en
Inventor
李宙洲
曲悦
张�浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010041685.XA priority Critical patent/CN113127144B/en
Publication of CN113127144A publication Critical patent/CN113127144A/en
Application granted granted Critical
Publication of CN113127144B publication Critical patent/CN113127144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a processing method, comprising the following steps: creating a logical port; creating a receiving Single Root Input Output Virtualized (SRIOV) virtual machine based on the logical port; respectively obtaining a virtual function VF from two physical network cards, and distributing the respectively obtained VFs to the SRIOV virtual machine; the obtained two VFs have the same MAC address; and binding the two VFs. Therefore, the SRIOV virtual machine port can realize binding operation, the influence of load on a user is reduced, and the high availability of the network of the SRIOV virtual machine of the user is ensured.

Description

Processing method, processing device and storage medium
Technical Field
The invention relates to the technical field of cloud computing, in particular to a processing method, a processing device and a storage medium.
Background
In the related technology, a Single Root I/O Virtualization (SRIOV) Virtual machine transparent transfer Virtual Function (VF) is mainly used in an OpenStack cloud computing platform as a port (port) Function of an SRIOV Virtual machine, however, the port does not support binding operation, which causes that the port binding (port binding) Function of the SRIOV Virtual machine cannot be used, increases the influence of load on a user, and also reduces the network high availability of the SRIOV Virtual machine of the user; therefore, it has not been clarified how to provide the port binding function for the SRIOV virtual machine.
Disclosure of Invention
Embodiments of the present invention provide a processing method, an apparatus, and a storage medium, so that a port of an SRIOV virtual machine has a binding function, an influence of a load on a user is reduced, and high availability of a network of the SRIOV virtual machine of the user can be ensured.
The technical scheme of the embodiment of the invention is realized as follows:
creating a logical port;
creating a receiving Single Root Input Output Virtualized (SRIOV) virtual machine based on the logical port;
respectively obtaining a virtual function VF from two physical network cards, and distributing the respectively obtained VFs to the SRIOV virtual machine; the two obtained VFs have the same Media Access Control (MAC) address;
and binding the two VFs.
In the foregoing solution, the creating an SRIOV virtual machine based on the logical port includes:
creating the SRIOV virtual machine based on the logical port and SRIOV virtual machine parameters;
the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
In the above scheme, the method further comprises:
caching port information formed in the process that the obtained VFs are distributed to the SRIOV virtual machine;
the port information includes: port slot information of the two VFs.
In the scheme, the port information is cached in a mode of asynchronously calling a Neutron interface in the cloud platform.
In the foregoing scheme, the binding the two VFs includes:
and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
In the above scheme, the method further comprises:
configuring the related information of the two VFs according to the MAC address;
adding the logic port to a physical network card of the SRIOV virtual machine;
the related information includes at least one of: the state of the two VFs, a spoofing checking (spoofing checking) state, or Quality of Service (QoS) information.
The present application further provides a processing apparatus, the apparatus is applied to a cloud platform, including:
a creating unit for creating a logical port; for creating a receive Single Root Input Output Virtualized (SRIOV) virtual machine based on the logical port;
an obtaining unit, configured to obtain a virtual function VF from each of the two physical network cards, and allocate the obtained VFs to the SRIOV virtual machine; the obtained two VFs have the same MAC address;
and the binding unit is used for binding the two VFs.
In the foregoing solution, the creating unit is further configured to:
creating the SRIOV virtual machine based on the logical port and SRIOV virtual machine parameters;
the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
In the above scheme, the apparatus further comprises:
a storage unit, configured to cache port information formed in a process in which the obtained VFs are allocated to the SRIOV virtual machine;
the port information includes: port slot information of the two VFs.
In the foregoing solution, the storage unit is further configured to:
and caching the port information in a mode of asynchronously calling a Neutron interface inside the cloud platform.
In the foregoing solution, the binding unit is further configured to:
and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
In the above scheme, the apparatus further comprises:
a configuration unit, configured to configure the relevant information of the two VFs according to the MAC address; the physical network card is used for adding the logic port to the SRIOV virtual machine;
the related information includes at least one of: the state of the two VFs, a spoofing detection spoofchecking state, or QoS information.
The application also provides a storage medium, which stores an executable program, and when the executable program is executed by a processor, the processing method of the scheme is realized.
According to the processing method, the processing device and the storage medium provided by the embodiment of the invention, the SRIOV virtual machine is created based on the logical port by creating the logical port, and in the process of creating the SRIOV virtual machine, one VF with the same MAC address is respectively obtained from two physical network cards, and the two VFs with the same MAC address are distributed to the SRIOV virtual machine, so that the port of the SRIOV virtual machine has a binding function, the influence of load on a user is reduced, and the high availability of the network of the SRIOV virtual machine of the user can be ensured.
Drawings
FIG. 1 is a schematic diagram of an alternative structure of an SRIOV network card in the related art;
fig. 2 is a first schematic flow chart of an alternative processing method provided in the embodiment of the present application;
fig. 3 is a schematic view illustrating an alternative flow of a processing method according to an embodiment of the present application;
fig. 4 is a third schematic flow chart of an alternative processing method provided in the embodiment of the present application;
fig. 5 is a first schematic structural diagram of an alternative processing method provided in an embodiment of the present application;
fig. 6 is a schematic diagram of an alternative structure of the processing method according to the embodiment of the present application.
Detailed Description
The present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Before further detailed description of the present invention, terms and expressions referred to in the embodiments of the present invention are described, and the terms and expressions referred to in the embodiments of the present invention are applicable to the following explanations.
Cloud Computing (Cloud Computing) is an internet-based Computing method by which shared software resources, hardware resources, and information can be distributed to computers and other devices according to the requirements of the computers and other devices. OpenStack has been widely used in important fields such as communications, finance, industry, etc., as a resource management and scheduling platform in a cloud computing environment.
The OpenStack is an open-source cloud computing management platform project and is a combination of a series of software open-source projects. Before version I, data communication of virtual machines was typically implemented using virtual machines connected to linux bridges or open virtual switch standard (OVS) bridges. OpenStack introduces SRIOV from Juno version, directly associates a VF through SRIOV port, where SRIOV port is bridged by Hardware-based Ethernet Bridging (HW VEB), or SRIOV port is connected to MACvtap device and then accesses Virtual Network Interface Card (vNIC), so as to implement data communication of Virtual machine.
SRIOV is a technique that does not require software emulation to share I/O devices. The method solves the problem of hardware resource limitation caused by Peripheral Component Interconnect (PCI Pass-through) technology. SRIOV achieves near-native performance by virtualizing the functions of input/output (In/Out, I/O) physical device ports into multiple, each virtual function being assigned directly to a virtual machine. In general, SRIOV achieves the goal of assigning Peripheral Component Interconnect (PCI) functions to multiple virtual interfaces such that the resources of one PCI device are shared in a virtualized environment. SRIOV enables network traffic to bypass the software emulation layer and be distributed directly to virtual machines. This reduces the I/O overhead in the software emulation layer and achieves I/O performance comparable to native performance.
SRIOV enables a single functional unit (e.g., an ethernet port) to become a physical device with multiple independent functions. A physical device with SRIOV functionality can be configured as a plurality of functional units.
Fig. 1 is a schematic diagram illustrating an alternative structure of an SRIOV network card in the related art, which will be described according to various parts.
The SRIOV includes a Physical Function (PF), a PCI for supporting SRIOV functions, and contains an SRIOV functional structure for managing SRIOV functions. The PF has the full functionality of Peripheral Component Interconnect Express (PCIe), and can discover, manage, and process like any other PCIe device. The PF has all the configuration resources that can be used to configure or control the PCIe device. The SRIOV also includes a VF, which is a lightweight PCIe function that may share one or more physical resources with a physical function and other VFs associated with the same physical function. The VF only allows possession of configuration resources for its own behavior.
A Network Interface Card (NIC) generates a number of Virtual ports (Vport) after SRIOV is enabled, forwarding data between the physical ports and the Virtual ports.
In the related art, in order to solve the problem that the SRIOV network card cannot be deployed reasonably and dynamically, the SRIOV network card resources are generally deployed to the network virtual machines, then the real-time service state data of all the virtual machines are collected, and the current service operation status of each virtual machine is evaluated according to the real-time service state data collected in the first preset period; acquiring a virtual machine to be migrated according to the current service operation state of each virtual machine, and taking the virtual machine with the deployed SRIOV network card resource as a virtual machine to be migrated, wherein the current service operation state of the virtual machine to be migrated is not superior to that of the virtual machine to be migrated; and migrating the SRIOV network card resource of the virtual machine to be migrated to the virtual machine to be migrated. The scheme dynamically and reasonably deploys the SRIOV network card resources, and the purpose of load balancing is achieved. In the scheme, the service flow is monitored in real time, and the flow of the SRIOV virtual machine is ensured to achieve the purpose of load balancing by migrating the migration virtual machine into the migration virtual machine according to the service operation condition. However, the above scheme involves virtual machine resource migration, the operation and the flow are complex, and a large amount of physical resources are additionally consumed in the migration process.
Or, in order to increase the reliability of the network device in the related art, a virtual network card created for the network device and at least two physical network cards installed on the network device are also acquired; utilizing an ifenslave control tool to designate the virtual network card to adopt the at least two physical network cards as physical ports; determining a working mode of the virtual network card for calling the physical port; and writing the virtual network card and the working mode thereof into a specified configuration file so as to load a binding module for driving the virtual network card according to the specified configuration file when a system of the network equipment is started, thereby realizing the binding of the network card. In the scheme, binding operation is performed from a physical network card of a physical machine, and the cloud environment and the SRIOV technology are not involved.
Or, the related art also provides that a plurality of ethernet cards are configured for each network device to realize connection of every two network devices; establishing a virtual network card for each network device based on the bond technology and configuring a corresponding IP; sending/receiving an ARP request to establish routing rules between network devices; the technical scheme is that the data packet is transmitted based on the routing rule. The network cards are connected in pairs, the network cards are managed based on the bond technology, and independent switches can be saved by acquiring address information between the network devices to realize the data transmission process, so that the existing system is favorably improved.
Alternatively, the related art further provides an apparatus for automatically configuring a portal bond, where the apparatus includes: the system configuration module is used for configuring a Linux OS; the script configuration module is used for configuring scripts for the network port bond under the Linux OS; the network port bond module is used for executing the script for the network port bond so as to check the connection state of the network port; selecting a network port needing bond; and selecting a network port bond mode; correspondingly configuring a network port needing bond and a network port bond mode; and restarting the network to complete the network port bond. The bond that can automatic configuration net gape has simplified work flow greatly, has saved the configuration time, has reduced manpower resources's consumption simultaneously, has promoted the work efficiency of server greatly.
However, the scheme cannot solve the problem of binding the SRIOV virtual machine network card under the OpenStack cloud platform.
Based on the problems existing in the binding of the network card of the SRIOV virtual machine at present, the embodiment of the present application provides a processing method, which can solve the technical problems and disadvantages that cannot be solved in the prior art.
Fig. 2 is a schematic view illustrating an alternative flow of a processing method provided in an embodiment of the present application, which will be described according to various steps.
Step S101, a logical port is created.
In some embodiments, one of the components of the OpenStack cloud platform creates one logical port. One of the components of the OpenStack cloud platform may be Neutron.
In some embodiments, the logical port is used to create an SRIOV virtual machine.
In some embodiments, the Neutron cannot create two ports with the same MAC address, so that the Neutron creates one logical port, and in the subsequent process of creating the SRIOV virtual machine by using the logical port, the VF with the same MAC address can be created on the other component side of the OpenStack cloud platform, so as to provide a port binding function for the SRIOV virtual machine. Another component of the OpenStack cloud platform may be Nova.
In some embodiments, the logical port is a port with a bond attribute.
Step S102, creating an SRIOV virtual machine based on the logic port.
In some embodiments, one of the components of the OpenStack cloud platform creates an SRIOV virtual machine based on the logical port.
In some embodiments, one of the components of the OpenStack cloud platform may be Nova. The Nova creates the SRIOV virtual machine based on the logical port and SRIOV virtual machine parameters.
In some embodiments, the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
Step S103, respectively obtaining a VF from the two physical network cards, and distributing the obtained VF to the SRIOV virtual machine.
In some embodiments, in the process of creating the SRIOV virtual machine, one component of the OpenStack cloud platform obtains one VF from each of two physical network cards, and allocates the obtained VF to the SRIOV virtual machine.
In some embodiments, the obtaining a VF from two physical network cards includes: and respectively creating a PCI device with the same MAC address on the two physical network cards. The PCI device includes: and VF.
In some embodiments, the two VFs with the same MAC address may be bound, so that the SRIOV virtual machine has a bond function.
Step S104, the binding operation is performed on the two VFs.
In some embodiments, one of the components of the OpenStack cloud platform performs a binding operation on two VFs on the SRIOV virtual machine having the same MAC address, including: and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
In some further embodiments, the binding two VFs on the SRIOV virtual machine with the same MAC address further comprises: and carrying out bonding operation manually.
In some embodiments, the binding information includes: and at least one of a bond mode, a link monitoring interval, an IP address, a subnet mask, a port ID, and a broadcast address.
In some embodiments, the Bond mode comprises: at least one of a balanced loop mode, a master/standby mode, a balanced load mode, a broadcast mode, an IEEE 802.3ad dynamic link aggregation mode, an adapter transmission load balancing mode, and an adapter adaptive load balancing mode.
In this way, under the condition that the OpenStack cloud platform cannot create two identical MAC addresses for binding operation, one logic port is created, and an SRIOV virtual machine is created based on the logic port; and in the process of creating the SRIOV virtual machine, obtaining a VF with the same MAC address from two physical network cards respectively, and distributing the two VFs with the same MAC address to the SRIOV virtual machine, so that a port of the SRIOV virtual machine has a binding function, the influence of load on a user is reduced, and the high availability of a network of the SRIOV virtual machine of the user can be ensured.
Meanwhile, in the embodiment provided by the application, the binding operation is performed inside the virtual machine through the metadata of one component of the cloud platform, so that the defect that network card drive support is needed to perform VF binding operation on a physical machine in the related technology, and the dependence on the network card drive is large is avoided.
In addition, in the related art, in order to ensure high availability of the SRIOV virtual machine network, only the active/standby mode may be used, that is, one virtual machine is in a working state as a host, the other virtual machine is in a monitoring state as a standby, and the standby synchronizes data of the host. However, the active/standby mode consumes a lot of physical resources, and the switching requires a long time and the switching process is complicated. The SRIOV virtual machine port binding method provided in the embodiment of the present application is based on the bond function of Linux, and is completed using an OpenStack cloud platform without adding additional physical resource overhead.
Fig. 3 is a schematic view of an alternative flow chart of a processing method according to an embodiment of the present application, which will be described according to various steps.
In step S201, a logical port is created.
In some embodiments, Neutron in the OpenStack cloud platform creates one logical port.
In some embodiments, the logical port is used to create an SRIOV virtual machine.
In some embodiments, the Neutron cannot create two ports with the same MAC address, so that the Neutron creates one logical port, and in the subsequent process of creating the SRIOV virtual machine by using the logical port, the VF with the same MAC address can be created on the other component side of the OpenStack cloud platform, so as to provide a port binding function for the SRIOV virtual machine.
In some embodiments, after the Neutron creates the logical port, the logical port is sent to a Nova-Application Programming Interface (Nova-Api).
Step S202, receiving the logical port.
In some embodiments, the Nova-api is provided with functionality to receive a logical port and to identify the logical port as an SRIOV virtual machine.
In some embodiments, Nova-api receives the logical port created and sent by Neutron and identifies the logical port as an SRIOV virtual machine. And the Nova-api encapsulates the SRIOV virtual machine parameters and the logic port in an SRIOV virtual machine creating instruction, and sends the SRIOV virtual machine creating instruction to the Nova-computer through the Nova-conductor.
In some embodiments, the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
Step S203, the SRIOV virtual machine is created according to the SRIOV virtual machine creation instruction.
In some embodiments, Nova-computer of the OpenStack cloud platform receives an SRIOV virtual machine creation instruction sent by Nova-api through Nova-conductor, the SRIOV virtual machine creation instruction including: logical port and SRIOV virtual machine parameters.
In other embodiments, the Nova-computer creates an SRIOV virtual machine based on the logical port.
Step S204, respectively obtaining a VF from the two physical network cards, and distributing the obtained VF to the SRIOV virtual machine.
In some embodiments, during the process of creating the SRIOV virtual machine, Nova-computer of the OpenStack cloud platform obtains one VF from each of two physical network cards, and allocates the VF obtained from each of the two physical network cards to the SRIOV virtual machine.
In some embodiments, the obtaining of the VF by the Nova-computer from two physical network cards includes: and respectively creating a PCI device with the same MAC address on the two physical network cards. The PCI device includes: and VF.
In some embodiments, the Nova-computer allocates the two VFs with the same MAC address to the SRIOV virtual machine.
In some embodiments, the two VFs with the same MAC address may perform a binding operation, so that the SRIOV virtual machine has a binding function.
Step S205, cache the port information formed by the process of distributing the obtained VFs to the SRIOV virtual machine.
In some embodiments, in the process that Nova-computer obtains one VF from each of two physical network cards and allocates the VF obtained from each of the two physical network cards to the SRIOV virtual machine, Nova generates port information, where the port information includes Slot (PCI Slot) information of the two VFs having the same MAC address.
In some embodiments, said caching said port information comprises: and writing the port information into a Neutron database by asynchronously calling the Neutron port by the Nova-computer.
Step S206, configure the two VFs with the same MAC address.
In some embodiments, Neutron-SRIOV-nic-agent of the OpenStack cloud platform configures the two VFs with the same MAC address, and adds the logical port to a physical network card of the SRIOV virtual machine.
In some embodiments, the configuring the two VFs having the same MAC address comprises: configuring the related information of the two VFs according to the MAC address; the related information includes at least one of: the state of the two VFs, the spoofchecking state, or the QoS information.
Step S207, performing a binding operation on the two VFs on the SRIOV virtual machine having the same MAC address.
In some embodiments, Nova of the OpenStack cloud platform performs a binding operation on two VFs on the SRIOV virtual machine with the same MAC address, including: and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
In some further embodiments, the binding two VFs on the SRIOV virtual machine with the same MAC address further comprises: and carrying out bonding operation manually.
In some embodiments, the binding information includes: and at least one of a bond mode, a link monitoring interval, an IP address, a subnet mask, a port ID, and a broadcast address.
In some embodiments, the bond mode comprises: at least one of a balanced loop mode, a master/standby mode, a balanced load mode, a broadcast mode, an IEEE 802.3ad dynamic link aggregation mode, an adapter transmission load balancing mode, and an adapter adaptive load balancing mode.
Therefore, in the embodiment of the application, based on a mature OpenStack cloud platform, the binding operation is performed on the SRIOV virtual machine, so that not only is the manual configuration cost reduced, but also the high availability of the network of the SRIOV virtual machine can be ensured, the network throughput is improved, and the influence of network faults and loads on user services is reduced. Meanwhile, the embodiment provided by the application performs the bonding operation in the virtual machine through the Nova metadata of the cloud platform, thereby avoiding the defect that the network card drive is highly dependent on the network card drive because the VF bonding operation is performed on the physical machine in the related technology. In addition, in the related art, in order to ensure high availability of the SRIOV virtual machine network, only the active/standby mode may be used, but the active/standby mode may consume a large amount of material resources, and the switching time is long, and the switching process is also complex. However, the SRIOV virtual machine port binding method provided in the embodiment of the present application is based on the bond function of Linux, and is completed using an OpenStack cloud platform without adding additional physical resource overhead.
Fig. 4 is a schematic flow chart illustrating a third alternative processing method provided in the embodiment of the present application, which will be described according to various steps.
The optional embodiment of the application comprises a control node and a computing node, wherein the control node is provided with Neutron-server software and Nova-api software; and the computing node is provided with Neutron-sriov-nic-agent software and Nova-computer software. The control node and the computing node are physical machines.
In step S301, a logical port is created.
In some embodiments, because Neutron cannot create two ports with the same MAC, in order to ensure the implementation of SRIOV port binding, Neutron needs to be used to create a logical port, that is, a bond port, and in the process of creating a virtual machine by using the bond port, two PCI devices with the same MAC address can be created on the Nova side for the virtual machine to bind.
Step S302, Nova-api receives an SRIOV virtual machine creation command with a bond port.
In some embodiments, the Nova-api needs to be able to receive a port with a bond attribute and identify it as a function of the SRIOV virtual machine. And the Nova-api integrates the parameters of the virtual machine and sends the parameters to the Nova-computer through the Nova-conductor.
Step S303, the Nova-computer establishes an SRIOV virtual machine with a bond port;
when the Nova-computer receives the parameters of the SRIOV virtual machine with the bond port sent by the Nova-controller, when distributing a PCI device (VF), one VF needs to be respectively taken from two different physical network cards and distributed to the SRIOV virtual machine. At this time, Nova may form a port cache (port cache) including the PCI slots of the two VFs, and write the port cache into the Neutron database by asynchronously calling a Neutron port interface.
S304, configuring VF correspondingly by Neutron-sriov-nic-agent;
the Neutron-SRIOV-nic-agent is responsible for setting the state of the VF, the spoofcheck and the QoS, so that the SRIOV-nic-agent receives the bond port and adds the bond port to the SRIOV physical network card, and needs to configure the related information on the two VFs according to the MAC address.
Therefore, in the embodiment of the application, based on a mature OpenStack cloud platform, the binding operation is performed on the SRIOV virtual machine, so that not only is the manual configuration cost reduced, but also the high availability of the network of the SRIOV virtual machine can be ensured, the network throughput is improved, and the influence of network faults and loads on user services is reduced. Meanwhile, the embodiment provided by the application performs the bonding operation in the virtual machine through the Nova metadata of the cloud platform, thereby avoiding the defect that the network card drive is highly dependent on the network card drive because the VF bonding operation is performed on the physical machine in the related technology. In addition, in the related art, in order to ensure high availability of the SRIOV virtual machine network, only the active/standby mode may be used, but the active/standby mode may consume a large amount of material resources, and the switching time is long, and the switching process is also complex. However, the SRIOV virtual machine port binding method provided in the embodiment of the present application is based on the bond function of Linux, and is completed using an OpenStack cloud platform without adding additional physical resource overhead.
Fig. 5 is a schematic diagram illustrating an alternative structure of a processing apparatus according to an embodiment of the present application, which will be described according to various steps.
A creating unit 501, configured to create a logical port; the method comprises the steps of creating and receiving a Single Root Input and Output Virtual (SRIOV) virtual machine based on the logic port.
An obtaining unit 502, configured to obtain a virtual function VF from each of two physical network cards, and allocate the obtained VFs to the SRIOV virtual machine; the two obtained VFs have the same MAC address.
A binding unit 503, configured to perform a binding operation on the two VFs.
The creating unit 501 is further configured to: creating the SRIOV virtual machine based on the logical port and SRIOV virtual machine parameters; the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
A storage unit 504, configured to cache port information formed by the process in which the obtained VFs are allocated to the SRIOV virtual machine; the port information includes: port slot information of the two VFs.
The storage unit 504 is further configured to: and caching the port information in a mode of asynchronously calling a Neutron interface inside the cloud platform.
The binding unit 503 is further configured to: and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
A configuring unit 505, configured to configure relevant information of the two VFs according to the MAC address; the physical network card is used for adding the logic port to the SRIOV virtual machine; the related information includes at least one of: the state of the two VFs, a spoofing detection spoofchecking state, or QoS information.
Fig. 6 is a schematic diagram showing an alternative structure of a processing apparatus provided in an embodiment of the present application, which will be described according to various steps.
The Neutron-server is used for creating a logical port-bond port, and when the bond port is used for creating a virtual machine, two PCI devices with the same MAC address can be created on the Nova side for the virtual machine to perform bonding; and also used for storing the port cache sent by Nova-computer.
And the Nova-api is used for receiving the port with the bond attribute, identifying the port as the SRIOV virtual machine, and integrating the parameters of the virtual machine and sending the parameters of the virtual machine to the Nova-computer through the Nova-conductor.
The Nova-computer is used for receiving the parameters of the SRIOV virtual machine with the bond port sent by the Nova-controller, and when distributing PCI equipment (VF), one VF is respectively taken from two different physical network cards and distributed to the SRIOV virtual machine. At this time, Nova may form a port cache (including the PCI slots of the two VFs), update the port cache (binding information) by asynchronously calling the Neutron network interface, and send the updated port cache to the Neutron-server through rpc messages after completion.
The Neutron-SRIOV-nic-agent is used for receiving the bond port and adding the bond port to a physical network card of the SRIOV virtual machine; and is also used to configure related information on the two VFs according to the MAC address.
Those of ordinary skill in the art will understand that: all or part of the steps of implementing the above method embodiments may be implemented by hardware related to program commands, and the foregoing program may be stored in a storage medium, where the storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which is stored in a storage medium and includes several commands for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (14)

1. A processing method is applied to a cloud platform and comprises the following steps:
creating a logical port;
creating a receiving Single Root Input Output Virtualized (SRIOV) virtual machine based on the logical port;
respectively obtaining a virtual function VF from two physical network cards, and distributing the respectively obtained VFs to the SRIOV virtual machine; the obtained two VFs have the same MAC address;
and binding the two VFs.
2. The method of claim 1, wherein creating the SRIOV virtual machine based on the logical port comprises:
creating the SRIOV virtual machine based on the logical port and SRIOV virtual machine parameters;
the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
3. The method of claim 1, further comprising:
caching port information formed in the process that the obtained VFs are distributed to the SRIOV virtual machine;
the port information includes: port slot information of the two VFs.
4. The method of claim 3,
and caching the port information in a mode of asynchronously calling a Neutron interface inside the cloud platform.
5. The method of claim 1, wherein the binding the two VFs comprises:
and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
6. The method of claim 1, further comprising:
configuring the related information of the two VFs according to the MAC address;
adding the logic port to a physical network card of the SRIOV virtual machine;
the related information includes at least one of: the state of the two VFs, a spoofing detection spoofchecking state, or advanced service QoS information.
7. A processing apparatus applied to a cloud platform, the apparatus comprising:
a creating unit for creating a logical port; for creating a receive Single Root Input Output Virtualized (SRIOV) virtual machine based on the logical port;
an obtaining unit, configured to obtain a virtual function VF from each of the two physical network cards, and allocate the obtained VFs to the SRIOV virtual machine; the obtained two VFs have the same MAC address;
and the binding unit is used for binding the two VFs.
8. The apparatus of claim 7, wherein the creating unit is further configured to:
creating the SRIOV virtual machine based on the logical port and SRIOV virtual machine parameters;
the SRIOV virtual machine parameters include at least one of: an operating system of the SRIOV virtual machine, an application in the operating system, a characteristic of the application, a number of processors included in the SRIOV virtual machine, a memory of the SRIOV virtual machine, or a bound port of the SRIOV virtual machine.
9. The apparatus of claim 7, further comprising:
a storage unit, configured to cache port information formed in a process in which the obtained VFs are allocated to the SRIOV virtual machine;
the port information includes: port slot information of the two VFs.
10. The apparatus of claim 9, wherein the storage unit is further configured to:
and caching the port information in a mode of asynchronously calling a Neutron interface inside the cloud platform.
11. The apparatus of claim 7, wherein the binding unit is further configured to:
and transmitting binding information through metadata of an NOVA (non-uniform virtual access value) in the cloud platform, and binding two VFs on the SRIOV virtual machine with the same MAC (media access control) address according to the binding information.
12. The apparatus of claim 7, further comprising:
a configuration unit, configured to configure the relevant information of the two VFs according to the MAC address; the physical network card is used for adding the logic port to the SRIOV virtual machine;
the related information includes at least one of: the state of the two VFs, a spoofing detection spoofchecking state, or advanced service QoS information.
13. A storage medium storing an executable program, wherein the executable program, when executed by a processor, implements the processing method of any one of claims 1 to 6.
14. A processing apparatus comprising a memory, a processor and an executable program stored on the memory and executable by the processor, wherein the steps of the processing method according to any one of claims 1 to 6 are performed when the executable program is executed by the processor.
CN202010041685.XA 2020-01-15 2020-01-15 Processing method, processing device and storage medium Active CN113127144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010041685.XA CN113127144B (en) 2020-01-15 2020-01-15 Processing method, processing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010041685.XA CN113127144B (en) 2020-01-15 2020-01-15 Processing method, processing device and storage medium

Publications (2)

Publication Number Publication Date
CN113127144A true CN113127144A (en) 2021-07-16
CN113127144B CN113127144B (en) 2023-04-14

Family

ID=76771306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010041685.XA Active CN113127144B (en) 2020-01-15 2020-01-15 Processing method, processing device and storage medium

Country Status (1)

Country Link
CN (1) CN113127144B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244715A (en) * 2021-12-17 2022-03-25 浪潮商用机器有限公司 vNIC master/slave port selection method, device and medium
CN115484212A (en) * 2022-07-26 2022-12-16 浪潮通信技术有限公司 VF QoS adjustment method, device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181679A (en) * 2016-03-09 2017-09-19 中兴通讯股份有限公司 A kind of port binding implementation method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107181679A (en) * 2016-03-09 2017-09-19 中兴通讯股份有限公司 A kind of port binding implementation method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244715A (en) * 2021-12-17 2022-03-25 浪潮商用机器有限公司 vNIC master/slave port selection method, device and medium
CN115484212A (en) * 2022-07-26 2022-12-16 浪潮通信技术有限公司 VF QoS adjustment method, device and electronic equipment
CN115484212B (en) * 2022-07-26 2023-10-20 浪潮通信技术有限公司 QoS adjustment method and device for VF and electronic equipment

Also Published As

Publication number Publication date
CN113127144B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN111542064B (en) Container arrangement management system and arrangement method for wireless access network
US11068355B2 (en) Systems and methods for maintaining virtual component checkpoints on an offload device
CN107566541B (en) Container network resource allocation method, system, storage medium and electronic device
US20220377045A1 (en) Network virtualization of containers in computing systems
US10909066B2 (en) Virtual RDMA switching for containerized applications
US10768972B2 (en) Managing virtual machine instances utilizing a virtual offload device
WO2017152633A1 (en) Port binding implementation method and device
US9424067B2 (en) Managing virtual machine instances utilizing an offload device
US9158567B2 (en) System and method for reconfigurable network services using modified network configuration with modified bandwith capacity in dynamic virtualization environments
US8589554B2 (en) Intelligent and elastic resource pools for heterogeneous datacenter environments
US8769040B2 (en) Service providing system, a virtual machine server, a service providing method, and a program thereof
US10003568B2 (en) Dynamically assigning network addresses
US20100031258A1 (en) Virtual machine system and control method of the virtual machine system
EP3905588A1 (en) Cloud platform deployment method and apparatus, server and storage medium
CN111880902A (en) Pod creation method, device, equipment and readable storage medium
US11336521B2 (en) Acceleration resource scheduling method and apparatus, and acceleration system
CN113312143B (en) Cloud computing system, command processing method and virtualization simulation device
CN113127144B (en) Processing method, processing device and storage medium
WO2017082757A1 (en) Computer data processing system and method for communication traffic based optimization of virtual machine communication
EP4184323A1 (en) Performance tuning in a network system
US11537425B2 (en) Methods for application deployment across multiple computing domains and devices thereof
CN113886153B (en) Network card pressure testing method and device based on container
CN115442285A (en) Network testing method, device, equipment and medium based on virtualization configuration
CN117472440B (en) Chip control method and device, storage medium and electronic equipment
US10761874B2 (en) Dynamic virtual input/output and NUMA node management

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant