CN115484212A - VF QoS adjustment method, device and electronic equipment - Google Patents

VF QoS adjustment method, device and electronic equipment Download PDF

Info

Publication number
CN115484212A
CN115484212A CN202210886382.7A CN202210886382A CN115484212A CN 115484212 A CN115484212 A CN 115484212A CN 202210886382 A CN202210886382 A CN 202210886382A CN 115484212 A CN115484212 A CN 115484212A
Authority
CN
China
Prior art keywords
target
vfs
qos
speed limit
state
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
CN202210886382.7A
Other languages
Chinese (zh)
Other versions
CN115484212B (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.)
Inspur Communication Technology Co Ltd
Original Assignee
Inspur Communication 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 Inspur Communication Technology Co Ltd filed Critical Inspur Communication Technology Co Ltd
Priority to CN202210886382.7A priority Critical patent/CN115484212B/en
Publication of CN115484212A publication Critical patent/CN115484212A/en
Application granted granted Critical
Publication of CN115484212B publication Critical patent/CN115484212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a quality of service (QoS) adjusting method and device of a Variable Frequency (VF) and electronic equipment, wherein the method comprises the following steps: determining a first number of target Virtual Functions (VFs) with a first state, wherein the state of a single root I/O virtualization (SR-IOV) network port of the N target Virtual Functions (VFs) is the first state; and adjusting the service quality QoS bandwidth speed limit values of the N target VFs based on the first number. The VF QoS regulation method can keep the consistency of the QoS bandwidth speed limit values of the target virtual ports by configuring a plurality of target VFs for one target virtual port, and regulate the QoS bandwidth speed limit values of each target VF by detecting the network port states of the plurality of target VFs, can flexibly regulate the QoS numerical value of each target VF according to the network card state, and ensures the stability of the bandwidth speed limit values when a single point of network port fails.

Description

VF QoS adjustment method, device and electronic equipment
Technical Field
The present invention relates to the field of network virtualization technologies, and in particular, to a method and an apparatus for adjusting QoS of VF, and an electronic device.
Background
In the field of NFV (Network Functions Virtualization), many scenarios require L2 redundancy of SR-IOV (Single Root I/O Virtualization) and require QoS (Quality of Service) for traffic bandwidth control.
In the related art, the QoS policy is generally configured for each Virtual port by configuring a plurality of Virtual ports and allocating different VFs (Virtual Functions) to the Virtual ports of different physical network cards.
Because a QoS strategy needs to be configured for each virtual port, the consistency of bandwidth speed limit values needs to be artificially ensured, the virtual ports are independent, and the SR-IOV network port of one VF fails, the QoS bandwidth speed limit value is reduced, so that the QoS bandwidth speed limit value is unstable.
Disclosure of Invention
The invention provides a quality of service (QoS) adjusting method and device of Variable Frequency (VF) and electronic equipment, which are used for solving the defect of unstable QoS bandwidth speed limit value in the prior art and achieving the effect of improving the stability of the bandwidth speed limit value in single-point failure.
The invention provides a quality of service (QoS) adjusting method of Variable Frequency (VF), which is applied to a virtual machine and comprises the following steps:
determining a first number of target Virtual Functions (VFs) of which the states of single root I/O virtualization (SR-IOV) network ports belong to the N target VFs are in a first state;
adjusting the QoS bandwidth speed limit values of the N target VFs based on the first number;
the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
According to the method for adjusting the QoS of the VF provided by the present invention, the first state is an up state, and the adjusting the QoS bandwidth speed limit values of the N target VFs based on the first number includes:
averagely distributing a target QoS bandwidth speed limit value to the target VF with the first state being an up state, and configuring the QoS bandwidth speed limit value of the target VF with the first state being a down state as 0; the target QoS bandwidth speed limit value is the maximum QoS bandwidth speed limit value of the target virtual port.
According to the method for adjusting the QoS of the VF provided by the present invention, after the adjusting the QoS bandwidth limit values of the N target VFs based on the first number, the method further includes:
re-determining the number of the target VFs with the state of the SR-IOV network port of the N target VFs as the first state according to a target period;
and under the condition that the number of the target VF currently determined is not the same as the number of the target VF determined last time, readjusting the QoS bandwidth speed limit values of the N target VFs based on the number of the target VF currently determined.
According to the method for adjusting the QoS of the VF provided by the present invention, before determining the first number of the target VFs whose states of the single root I/O virtualization SR-IOV ports in the N target virtual functions VF are the first state, the method further includes:
configuring the QoS bandwidth speed limit value of the target virtual port as the target QoS bandwidth speed limit value, and generating a virtual port updating event;
under the condition of receiving an update notification of the virtual port update event, averagely distributing the target QoS bandwidth speed limit value to N target VFs;
wherein, the first state of the N target VFs is the up state.
According to the method for adjusting the QoS of the VF provided by the present invention, before the configuring the QoS bandwidth speed limit value of the target virtual port as the target QoS bandwidth speed limit value, the method further includes:
receiving the input of a user, and determining the QoS bandwidth speed limit value strategy of the target virtual port;
and determining the target QoS bandwidth speed limit value based on the QoS bandwidth speed limit value strategy of the target virtual port.
According to the QoS adjusting method of the VF provided by the invention, the MAC addresses and the VLANs of the N target VFs adopt the MAC addresses and the VLANs of the target virtual ports.
The present invention also provides a device for adjusting the QoS of a VF, comprising:
the first processing module is configured to determine a first number of target VFs whose states of single-root I/O virtualization SR-IOV ports in the N target virtual functions VF are in a first state;
a second processing module, configured to adjust the QoS bandwidth limit values of the N target VFs based on the first number;
the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
The present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for adjusting the QoS of the VF as described in any of the above methods when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements a method of QoS adjustment for a VF as described in any of the above.
The present invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a method of QoS adjustment for a VF as set forth in any of the above.
According to the VF QoS adjusting method, the device and the electronic equipment, the consistency of the QoS bandwidth speed limit values of the target virtual ports can be kept by configuring the target VFs for the target virtual ports, the QoS bandwidth speed limit values of the target VFs are adjusted by detecting the network port states of the target VFs, the QoS numerical value of each target VF can be flexibly adjusted according to the network card state, and the stability of the bandwidth speed limit values when a single point of network port fails is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for adjusting the QoS of a VF according to the present invention;
FIG. 2 is a schematic diagram of a virtual machine according to the present invention;
FIG. 3 is a second schematic structural diagram of a virtual machine according to the present invention;
FIG. 4 is a second flowchart illustrating a method for adjusting the QoS of a VF according to the present invention;
fig. 5 is a schematic structural diagram of a VF QoS adjusting apparatus according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method, apparatus and electronic device for adjusting the QoS of the VF according to the present invention are described below with reference to fig. 1-6.
The VF QoS adjusting method provided by the embodiment of the invention is mainly applied to Virtual Machines (VMs). The method for adjusting the QoS of the VF according to the embodiment of the present invention is described below with a virtual machine as an execution subject.
As shown in fig. 1, the method for adjusting the QoS of the VF according to the embodiment of the present invention mainly includes step 110 and step 120.
Step 110, determining the first number of the target VFs of which the states of the single root I/O virtualization SR-IOV ports to which the N target virtual functions VF belong are the first state.
It should be noted that N target VFs are configured on the same target virtual port, and N is a positive integer greater than 1, for example, N is 2.
In some embodiments, one target virtual port may flexibly mount multiple target VFs to a virtual machine, and one virtual port corresponds to multiple target VFs, thereby improving VF redundancy. When one target VF in one target virtual port has a fault, the fault can be replaced by other VFs, so that the reliability of the virtual machine is improved.
The OpenStack is an open-source cloud computing management platform project and is a combination of a series of software open-source projects. After the SR-IOV is introduced, openStack can directly associate a VF through an SR-IOV virtual port. In other embodiments, it is also compatible with the prior art scheme that one virtual port corresponds to one VF.
In some embodiments, the local area network MAC addresses and the virtual local area network VLANs of the N target VFs are all the same. Namely, the MAC addresses and VLANs between the N target VFs are all the same, which can avoid the problem that security detection needs to be closed during aggregation, and improve security.
For example, one target virtual port has 2 target VFs, the MAC address of VF1 is the same as the MAC address of VF2, and the VLAN of VF1 is the same as the VLAN of VF 2.
In this case, as shown in fig. 2 and fig. 3, one target virtual port mounts two target VFs, a Host bond (Host node group bond, mode 4) includes a Network Interface Controller (NIC) 1 and an NIC2, a Link Aggregation Control Protocol LACP (Link Aggregation Control Protocol) is started, the NIC1 is connected to the ETH0 through the VF1, and the NIC2 is connected to the ETH1 through the VF 2.
Inside the virtual machine, the Guest bond (virtual machine group bond, mode is 2) aggregates ETH0 and ETH1, and closes LACP, thereby implementing that one virtual port mounts two VFs.
In the embodiment, by configuring a plurality of target VFs for one target virtual port, the L2 redundancy of the SR-IOV is improved, the single-point failure of the virtual machine is solved, the reliability of the virtual machine is improved, the MAC addresses and the VLANs of the plurality of target VFs are the same, the security trust switch does not need to be turned on, and the security is improved.
As can be appreciated, the states of the SR-IOV portal have two states, up and down. For example, the first state may be the up state.
In some embodiments, the network port state of the SR-IOV to which each target VF belongs may be detected by a Neutron-sriov-agent corresponding to the Neutron component of the virtual machine, so as to determine that the network port state of the SR-IOV in the N target VFs is the first number of the target VFs in the first state.
For example, N is 2. The first state is the up state, and if it is detected that only one state of the target VF is the up state, the first number is 1.
And step 120, based on the first quantity, adjusting the QoS bandwidth speed limit values of the N target VFs.
In this case, the QoS bandwidth speed limit values of the N target VFs may be automatically reallocated and adjusted according to the QoS bandwidth speed limit value corresponding to the current target virtual port.
In some embodiments, the first state is an up state, and the adjusting the QoS bandwidth speed limit values of the N target VFs based on the first number includes averagely allocating the target QoS bandwidth speed limit values to the target VFs whose first state is the up state, and configuring the QoS bandwidth speed limit value of the target VF whose first state is a down state among the N target VFs to be 0.
It should be noted that the target QoS bandwidth speed limit value is the maximum QoS bandwidth speed limit value of the target virtual port.
For example, the QoS bandwidth limit of the current target virtual port is Q, and the QoS bandwidth limit of the N target VFs may be configured to be Q/N before detection.
If the network port states of the SR-IOVs of the N target VFs are detected respectively, and the network port states of the M target VFs obtained through detection are converted from the up state to the down state, the first number is N-M, where M is a positive integer greater than or equal to 1 and less than N.
In this case, the Neutron-sriov-agent updates the QoS bandwidth speed limit values of the target VFs, and may configure the maximum QoS bandwidth speed limit values of the target virtual ports to which the N-M target VFs are averagely allocated.
In other words, the QoS bandwidth speed limit values of the N-M target VFs whose gateway states of the SR-IOVs are up states are updated to Q/(N-M), and the QoS bandwidth speed limit values of the M target VFs whose gateway states of the SR-IOVs are down states are updated to 0.
In this embodiment, when M SR-IOV ports fail, the maximum QoS bandwidth limit value of the target virtual port averagely allocated to the N-M target VFs may be dynamically adjusted, and when the failure recovers, the maximum QoS bandwidth limit value of the target virtual port may be dynamically adjusted to the QoS bandwidth limit value in the normal state.
As shown in fig. 2, the QoS bandwidth speed limit value corresponding to the current target virtual port is Q, and N is 2. The first state is up state, and the QoS bandwidth speed limit value of each target VF is Q/2.
As shown in FIG. 3, if it is detected that the state of only one target VF is up, the first number is 1. The QoS bandwidth speed limit value of the target VF with the up state can be adjusted to Q/1 from Q/2, namely Q. While the QoS bandwidth limit of the target VF whose state is down can be adjusted to 0 by Q/2.
According to the VF QoS adjusting method provided by the embodiment of the invention, a plurality of target VFs are configured for one target virtual port, the consistency of the QoS bandwidth speed limit values of the target virtual port can be kept, the QoS bandwidth speed limit values of the target VFs are adjusted by detecting the network port states of the target VFs, the QoS numerical value of each target VF can be flexibly adjusted according to the network card state, and the stability of the bandwidth speed limit values when a single point of network port fails is ensured.
In some embodiments, after adjusting the QoS bandwidth limit values of the N target VFs based on the first number, the method further includes re-determining, according to the target period, the number of the target VFs whose states of the SR-IOV ports belong in the N target VFs are the first state.
It can be understood that the number of the failed internet access and the number of the normal internet access can be continuously and timely determined according to the target period, and then the distribution of the QoS bandwidth speed limit values of the target VFs can be timely adjusted.
And under the condition that the number of the currently determined target VFs is the same as that of the target VFs determined last time, maintaining the QoS bandwidth speed limit value of each target VF unchanged.
And under the condition that the number of the currently determined target VFs is different from the number of the target VFs determined last time, readjusting the QoS bandwidth speed limit values of the N target VFs based on the number of the currently determined target VFs.
For example, in the last detection process, if the port states of the SR-IOVs of the N target VFs are detected, and the detected port states of the M target VFs are converted from the up state to the down state, the first number is N-M, where M is a positive integer greater than or equal to 1 and less than N.
In the detection process, if the SR-IOV network port state of Y target VFs among the M target VFs is restored to the up state, the maximum QoS bandwidth speed limit value of the target virtual port may be evenly distributed to each target VF whose SR-IOV network port state is the up state, and the QoS bandwidth speed limit values of the remaining target VFs are set to 0.
In this case, the QoS bandwidth speed limit values of (N-M + Y) target VFs whose SR-IOV portal state is up state may be set to Q/(N-M + Y), and the QoS bandwidth speed limit values of (M-Y) target VFs whose remaining SR-IOV portal state is down state may be set to 0.
In this embodiment, the SR-IOV port status of the target VF can be continuously detected, and the QoS bandwidth speed limit value of each target VF can be timely adjusted when the new port of the target VF fails, so as to ensure the stability of the bandwidth speed limit value when the port fails.
In some embodiments, before determining that the state of the single root I/O virtualization SR-IOV port to which the N target virtual functions VF belongs is the first number of target VFs in the first state, the method for adjusting QoS of VFs according to the embodiment of the present invention further includes: and configuring the QoS bandwidth speed limit value of the target virtual port as a target QoS bandwidth speed limit value, and generating a virtual port update event.
In this embodiment, the maximum QoS bandwidth speed limit value may be configured for the target virtual port by calling an API (Application Program Interface) of the Neutron-server, and a virtual port update event is generated and sent to the Neutron-sriov-agent.
In the event that Neutron-sriov-agent receives an update notification of a virtual port update event, neutron-sriov-agent evenly distributes the target QoS bandwidth rate limit values to the N target VFs. Wherein, the first state of the N target VFs is the up state.
In this case, if the maximum QoS bandwidth speed limit is Q, the QoS bandwidth speed limit of each target VF is configured to be Q/N, so that the QoS bandwidth speed limit of each target VF of the target virtual port is the same.
In some embodiments, before configuring the QoS bandwidth speed limit value of the target virtual port as the target QoS bandwidth speed limit value, the method for adjusting the QoS of the VF according to the embodiment of the present invention further includes: and receiving the input of a user, and determining the QoS bandwidth speed limit value strategy of the target virtual port.
It will be appreciated that the QoS bandwidth speed limit policy for the target virtual port may be determined by receiving an operation of a user invoking the API of the neutron-server component to create the QoS bandwidth speed limit policy through the front-end user interface.
In this case, the specific value of the target QoS bandwidth speed limit may be determined based on the QoS bandwidth speed limit policy of the target virtual port.
In this embodiment, the QoS bandwidth speed limit policy of the target virtual port may be determined in a user-defined manner, so as to facilitate determination of the QoS bandwidth speed limit of each target VF.
As shown in FIG. 4, in some embodiments, after a virtual machine having SR-IOV virtual ports is created, the N target VFs may be directly associated at one virtual port.
On the basis, a QoS bandwidth speed limit value strategy can be created by calling an API of the neutron-server component by a user, and a QoS bandwidth speed limit value rule, namely the maximum QoS bandwidth speed limit value, is set in the strategy.
After the maximum QoS bandwidth speed limit value is determined, an API of a Neutron-server can be called to configure the QoS bandwidth speed limit value strategy for the target virtual port, and an update event of the target virtual port is sent to the Neutron-sriov-agent.
And under the condition that the Neutron-sriov-agent receives the update notice of the virtual port update event, updating the QoS bandwidth speed limit value of each target VF, wherein the QoS bandwidth speed limit value of each target VF is configured to be Q/N.
And continuously detecting the network port state of the SR-IOV to which each target VF belongs according to the target period by the Neutron-sriov-agent, and updating the QoS bandwidth speed limit value of each target VF by the Neutron-sriov-agent if the detected network port states of the M target VFs are converted from the up state to the down state.
The QoS bandwidth speed limit values of the N-M target VFs of which the network port state of the SR-IOV is the up state are updated to Q/(N-M), and the QoS bandwidth speed limit values of the M target VFs of which the network port state of the SR-IOV is the down state are updated to 0.
In the process of continuing detection, if the SR-IOV portal states of Y of the M target VFs are restored to the up state, the Neutron-sriov-agent updates the QoS bandwidth speed limit value of each target VF.
The QoS bandwidth speed limit values of (N-M + Y) target VFs whose SR-IOV network port states are up states may be set to Q/(N-M + Y), and the QoS bandwidth speed limit values of (M-Y) target VFs whose remaining SR-IOV network port states are down states may be set to 0.
In the process of continuous detection, if the SR-IOV network port state of the target VF is detected to be changed, the QoS bandwidth speed limit value of each target VF is continuously updated, and the dynamic update of the QoS bandwidth speed limit value of the target VF is realized.
Referring to fig. 5, the QoS adjusting apparatus for a VF provided by the present invention is described below, and the QoS adjusting apparatus for a VF described below and the QoS adjusting method for a VF described above may be referred to in correspondence with each other.
The device for adjusting the QoS of the VF according to the embodiment of the present invention includes a first processing module 510 and a second processing module 520.
The first processing module 510 is configured to determine that the state of a single root I/O virtualization SR-IOV portal to which the N target virtual functions VF belong is a first number of target VFs in a first state;
the second processing module 520 is configured to adjust the QoS bandwidth speed limit values of the N target VFs based on the first number;
the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
According to the VF QoS adjusting device provided by the embodiment of the invention, a plurality of target VFs are configured for one target virtual port, the consistency of the QoS bandwidth speed limit values of the target virtual port can be kept, the QoS bandwidth speed limit values of the target VFs are adjusted by detecting the network port states of the target VFs, the QoS numerical value of each target VF can be flexibly adjusted according to the network card state, and the stability of the bandwidth speed limit values when a single point of network port fails is ensured.
In some embodiments, the first state is an up state, the second processing module 520 is further configured to averagely allocate the target QoS bandwidth speed limit value to the target VF whose first state is the up state, and configure the QoS bandwidth speed limit value of the target VF whose first state is a down state as 0; the target QoS bandwidth speed limit value is the maximum QoS bandwidth speed limit value of the target virtual port.
In some embodiments, the VF QoS adjusting apparatus according to the embodiments of the present invention further includes a third processing module, where the third processing module is configured to re-determine, according to a target period, the number of target VFs whose states of the SR-IOV ports belong to the N target VFs are the first state; and under the condition that the number of the currently determined target VFs is different from the number of the target VFs determined last time, readjusting the QoS bandwidth speed limit values of the N target VFs based on the number of the currently determined target VFs.
In some embodiments, the VF QoS adjusting apparatus of the embodiments of the present invention further includes a fourth processing module, where the fourth processing module is configured to configure the QoS bandwidth speed limit value of the target virtual port as the target QoS bandwidth speed limit value, and generate a virtual port update event; under the condition of receiving an update notification of a virtual port update event, averagely distributing a target QoS bandwidth speed limit value to N target VFs; wherein, the first state of the N target VFs is the up state.
In some embodiments, the VF QoS adjusting apparatus according to the embodiments of the present invention further includes a fifth processing module, where the fifth processing module is configured to receive an input from a user, and determine a QoS bandwidth speed limit policy of a target virtual port; and determining the target QoS bandwidth speed limit value based on the QoS bandwidth speed limit value strategy of the target virtual port.
In some embodiments, the MAC addresses and VLANs of the N target VFs each employ the MAC address and VLAN of the target virtual port.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor) 610, a communication Interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform a method of QoS adjustment of a VF that includes: determining a first number of target Virtual Functions (VFs) with a first state, wherein the state of a single root I/O virtualization (SR-IOV) network port of the N target Virtual Functions (VFs) is the first state; based on the first number, adjusting the QoS bandwidth speed limit value of the N target VFs; the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention further provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the method for adjusting the QoS of the VF provided by the above methods, and the method includes: determining a first number of target Virtual Functions (VFs) with a first state, wherein the state of a single root I/O virtualization (SR-IOV) network port of the N target Virtual Functions (VFs) is the first state; based on the first quantity, adjusting the QoS bandwidth speed limit values of the N target VFs; the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method for QoS adjustment of a VF to perform the methods provided above, the method comprising: determining a first number of target Virtual Functions (VFs) of which the states of single root I/O virtualization (SR-IOV) network ports belong to the N target VFs are in a first state; based on the first quantity, adjusting the QoS bandwidth speed limit values of the N target VFs; the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A QoS adjustment method for a VF is characterized in that the method is applied to a virtual machine, and comprises the following steps:
determining a first number of target Virtual Functions (VFs) with a first state, wherein the state of a single root I/O virtualization (SR-IOV) network port of the N target Virtual Functions (VFs) is the first state;
adjusting the bandwidth speed limit values of the QoS (quality of service) of the N target VFs based on the first quantity;
the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
2. The method for adjusting the quality of service (QoS) of a VF according to claim 1, wherein the first state is an up state, and the adjusting the QoS bandwidth limit values of the N target VFs based on the first number comprises:
distributing the target QoS bandwidth speed limit value to the target VF with the first state being the up state on average, and configuring the QoS bandwidth speed limit value of the target VF with the first state being the down state as 0; the target QoS bandwidth speed limit value is the maximum QoS bandwidth speed limit value of the target virtual port.
3. The method of adjusting the QoS of a VF of claim 1, wherein after the adjusting quality of service (QoS) bandwidth limit values of N of the target VFs based on the first number, the method further comprises:
re-determining the number of the target VFs of which the states of the SR-IOV network ports belong to the N target VFs are the first states according to a target period;
and under the condition that the number of the currently determined target VFs is different from the number of the target VFs determined last time, readjusting the QoS bandwidth speed limit values of the N target VFs based on the currently determined number of the target VFs.
4. The method for adjusting the QoS of a VF as claimed in claim 2, wherein before the determining that the state of the single root I/O virtualization SR-IOV port belonging to the N target virtual functions VF is the first number of target VFs in the first state, the method further comprises:
configuring the QoS bandwidth speed limit value of the target virtual port as the target QoS bandwidth speed limit value, and generating a virtual port updating event;
under the condition of receiving an update notification of the virtual port update event, averagely distributing the target QoS bandwidth speed limit value to N target VFs;
wherein, the first state of the N target VFs is the up state.
5. The method of adjusting the QoS of a VF of claim 4, wherein before the configuring the QoS bandwidth limit value of the target virtual port to be the target QoS bandwidth limit value, the method further comprises:
receiving the input of a user, and determining a QoS bandwidth speed limit value strategy of the target virtual port;
and determining the target QoS bandwidth speed limit value based on the QoS bandwidth speed limit value strategy of the target virtual port.
6. The VF QoS adjustment method of any of claims 1-5, wherein the MAC address and the VLAN of N of the target VFs both use the MAC address and VLAN of the target virtual port.
7. An apparatus for adjusting QoS of VF, comprising:
the first processing module is configured to determine a first number of target VFs in which states of single-root I/O virtualization SR-IOV ports that belong to the N target virtual functions VF are first states;
a second processing module, configured to adjust the QoS bandwidth limit values of the N target VFs based on the first number;
the N target VFs are configured on the same target virtual port, the local area network MAC addresses of the N target VFs are the same as the virtual local area network VLAN, and N is a positive integer greater than 1.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method for QoS adjustment of a VF as defined in any one of claims 1 through 6.
9. A non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the QoS adjustment method of a VF according to any one of claims 1-6.
10. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the QoS adjustment method for a VF as claimed in any one of claims 1 to 6.
CN202210886382.7A 2022-07-26 2022-07-26 QoS adjustment method and device for VF and electronic equipment Active CN115484212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210886382.7A CN115484212B (en) 2022-07-26 2022-07-26 QoS adjustment method and device for VF and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210886382.7A CN115484212B (en) 2022-07-26 2022-07-26 QoS adjustment method and device for VF and electronic equipment

Publications (2)

Publication Number Publication Date
CN115484212A true CN115484212A (en) 2022-12-16
CN115484212B CN115484212B (en) 2023-10-20

Family

ID=84422708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210886382.7A Active CN115484212B (en) 2022-07-26 2022-07-26 QoS adjustment method and device for VF and electronic equipment

Country Status (1)

Country Link
CN (1) CN115484212B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120180048A1 (en) * 2011-01-11 2012-07-12 International Business Machines Corporation Allocating resources to virtual functions
CN103049331A (en) * 2012-12-06 2013-04-17 华中科技大学 Dynamic scheduling method with virtual function
JP2013161165A (en) * 2012-02-02 2013-08-19 Hitachi Ltd Computer system and method of allocating pcie device
US20130254767A1 (en) * 2012-03-22 2013-09-26 Hitachi, Ltd. Computer and bandwidth control method
US20160170789A1 (en) * 2014-12-16 2016-06-16 International Business Machines Corporation Implementing dynamic sriov virtual function resizing
WO2016101587A1 (en) * 2014-12-24 2016-06-30 中兴通讯股份有限公司 Link aggregation method and system for virtualization server, and intelligent network adapter thereof
CN109558216A (en) * 2018-12-11 2019-04-02 深圳先进技术研究院 It is a kind of that optimization method and its system are virtualized based on the single I/O migrated online
CN110113184A (en) * 2019-04-17 2019-08-09 中国科学院深圳先进技术研究院 KVM virtual machine network optimization method and device under SR-IOV environment
CN113127144A (en) * 2020-01-15 2021-07-16 中移(苏州)软件技术有限公司 Processing method, processing device and storage medium
US20210344619A1 (en) * 2020-05-01 2021-11-04 EMC IP Holding Company, LLC System and Method for Sharing of Network Devices in a Hyper Converged Environment
US20220052904A1 (en) * 2020-08-11 2022-02-17 F5 Networks, Inc. Managing network ports in a virtualization environment
CN114762304A (en) * 2019-11-19 2022-07-15 甲骨文国际公司 System and method for supporting RDMA bandwidth restriction in private architecture in high performance computing environment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120180048A1 (en) * 2011-01-11 2012-07-12 International Business Machines Corporation Allocating resources to virtual functions
JP2013161165A (en) * 2012-02-02 2013-08-19 Hitachi Ltd Computer system and method of allocating pcie device
US20130254767A1 (en) * 2012-03-22 2013-09-26 Hitachi, Ltd. Computer and bandwidth control method
CN103049331A (en) * 2012-12-06 2013-04-17 华中科技大学 Dynamic scheduling method with virtual function
US20160170789A1 (en) * 2014-12-16 2016-06-16 International Business Machines Corporation Implementing dynamic sriov virtual function resizing
WO2016101587A1 (en) * 2014-12-24 2016-06-30 中兴通讯股份有限公司 Link aggregation method and system for virtualization server, and intelligent network adapter thereof
CN109558216A (en) * 2018-12-11 2019-04-02 深圳先进技术研究院 It is a kind of that optimization method and its system are virtualized based on the single I/O migrated online
CN110113184A (en) * 2019-04-17 2019-08-09 中国科学院深圳先进技术研究院 KVM virtual machine network optimization method and device under SR-IOV environment
CN114762304A (en) * 2019-11-19 2022-07-15 甲骨文国际公司 System and method for supporting RDMA bandwidth restriction in private architecture in high performance computing environment
CN113127144A (en) * 2020-01-15 2021-07-16 中移(苏州)软件技术有限公司 Processing method, processing device and storage medium
US20210344619A1 (en) * 2020-05-01 2021-11-04 EMC IP Holding Company, LLC System and Method for Sharing of Network Devices in a Hyper Converged Environment
US20220052904A1 (en) * 2020-08-11 2022-02-17 F5 Networks, Inc. Managing network ports in a virtualization environment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
AMMAR RAFIQ; MUHAMMAD FAISAL HAYAT; MUHAMMAD USMAN YOUNUS: "Efficient Bandwidth Management (EBM) Algorithm for NG-EPON", 2018 IEEE 4TH INTERNATIONAL CONFERENCE ON COMPUTER AND COMMUNICATIONS (ICCC) *
刘权: "SR-IOV环境下虚拟机网络带宽动态分配的研究", 中国优秀硕士论文电子期刊网 *
李南;封卫兵;张武;彭俊杰;: "一种基于SR-IOV扩展的VF分配模型", 计算机应用与软件, no. 11 *

Also Published As

Publication number Publication date
CN115484212B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US11863352B2 (en) Hierarchical networking for nested container clusters
US9727386B2 (en) Method and apparatus for network resource virtual partitioning
US10389634B2 (en) Multiple active L3 gateways for logical networks
US11381507B2 (en) Virtual network device and related method
US9178800B1 (en) Policy based configuration of interfaces in a virtual machine environment
US20180375726A1 (en) Resource Configuration Method, Virtualized Network Function Manager, and Element Management System
EP4078369A1 (en) Distributed network plugin agents for container networking
KR102362826B1 (en) Method and apparatus for dynamic virtual system on chip
CN112688814B (en) Equipment access method, device, equipment and machine readable storage medium
CN108632155B (en) Cloud platform traffic scheduling method and system and computer-readable storage medium
CN104468568A (en) Virtual machine security isolation method
CN114338606B (en) Public cloud network configuration method and related equipment
CN112711479A (en) Load balancing system, method and device of server cluster and storage medium
CN115484212B (en) QoS adjustment method and device for VF and electronic equipment
CN111124593A (en) Information processing method and device, network element and storage medium
CN113127144A (en) Processing method, processing device and storage medium
CN106921553A (en) The method and system of High Availabitity are realized in virtual network
KR102174979B1 (en) Method for controlling transsion of packet in virtual switch
CN105094947B (en) The quota management method and system of a kind of virtual computing resource
CN108804018A (en) A kind of method and device of data partition
CN113890855A (en) Message forwarding method, system, equipment and medium
CN115314380B (en) VF configuration method and device
CN117978758B (en) Adaptation method for data processing unit, computer device and medium
WO2018129957A1 (en) Vbng system multi-virtual machine load sharing method and vbng system device
CN110912965A (en) Method and system for deploying Web server

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