CN115484212B - QoS adjustment method and device for VF and electronic equipment - Google Patents

QoS adjustment method and device for VF and electronic equipment Download PDF

Info

Publication number
CN115484212B
CN115484212B CN202210886382.7A CN202210886382A CN115484212B CN 115484212 B CN115484212 B CN 115484212B CN 202210886382 A CN202210886382 A CN 202210886382A CN 115484212 B CN115484212 B CN 115484212B
Authority
CN
China
Prior art keywords
target
vfs
qos
limit value
bandwidth limit
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.)
Active
Application number
CN202210886382.7A
Other languages
Chinese (zh)
Other versions
CN115484212A (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

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 QoS adjustment method and device for VF and electronic equipment, wherein the method comprises the following steps: determining a first number of target VFs with the states of single-root I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as first states; and adjusting the QoS bandwidth limit values of the N target VFs based on the first quantity. According to the QoS adjustment method of the VF, the plurality of target VFs are configured for one target virtual port, so that the consistency of QoS bandwidth speed limit values of the target virtual port can be maintained, the network port states of the plurality of target VFs are detected to adjust the QoS bandwidth speed limit values of the target VFs, the QoS value of each target VF can be flexibly adjusted according to the network card state, and the stability of the bandwidth speed limit values in network port single-point fault is ensured.

Description

QoS adjustment method and device for VF 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 a VF and an electronic device.
Background
In the NFV (Network Functions Virtualization, network function Virtualization) field, many scenarios require L2 redundancy of SR-IOV (Single Root I/O Virtualization) and QoS (Quality of Service ) for traffic bandwidth control.
In the related art, this is typically achieved by configuring a plurality of virtual ports and allocating different VFs (Virtual Functions ) to virtual ports of different physical network cards, and configuring QoS policies for each virtual port separately.
Because QoS strategy needs to be configured for each virtual port, consistency of bandwidth speed limit values needs to be ensured artificially, and virtual ports are independent, the SR-IOV network port of one VF is failed, the QoS bandwidth speed limit value is reduced, and the QoS bandwidth speed limit value is unstable.
Disclosure of Invention
The invention provides a QoS (quality of service) adjusting method and device of VF (variable frequency) and electronic equipment, which are used for solving the defect of unstable QoS bandwidth limit value in the prior art and realizing the effect of improving the stability of the bandwidth limit value in single-point failure.
The invention provides a QoS adjustment method of VF, which is applied to a virtual machine and comprises the following steps:
determining a first number of target VFs with the states of single-root I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as first states;
based on the first number, adjusting the QoS bandwidth limit values of N target VFs;
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 QoS adjustment method for VF provided by the present invention, 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 includes:
evenly 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 to be 0; the target QoS bandwidth limit value is the maximum QoS bandwidth limit value of the target virtual port.
According to the QoS adjustment method for a VF provided by the present invention, after the QoS bandwidth limit value of the QoS of N target VFs is adjusted based on the first number, the method further includes:
the number of the target VFs, of which the states of the SR-IOV network ports belong to are first states, is redetermined according to the target period;
and under the condition that the number of the target VFs which are currently determined is different from the number of the target VFs which are determined last time, readjusting QoS bandwidth limit values of N target VFs based on the number of the target VFs which are currently determined.
According to the QoS adjustment method of a VF provided in the present invention, before determining that the state of a single I/O virtualized SR-IOV portal to which the N target virtual functions VF belongs is the first number of target VFs in the first state, the method further includes:
configuring the QoS bandwidth limit value of the target virtual port as the target QoS bandwidth limit value, and generating a virtual port update event;
under the condition that an update notification of the virtual port update event is received, the target QoS bandwidth limit value is evenly distributed to N target VFs;
the first states of the N target VFs are up states.
According to the method for adjusting the QoS of the VF, before the configuring the QoS bandwidth limit value of the target virtual port to be the target QoS bandwidth limit value, the method further includes:
receiving input of a user, and determining a QoS bandwidth limit value strategy of the target virtual port;
and determining the target QoS bandwidth limit value based on the QoS bandwidth limit value strategy of the target virtual port.
According to the QoS adjustment method of the VF provided by the invention, the MAC addresses and the VLAN of the N target VFs are both the MAC addresses and the VLAN of the target virtual ports.
The invention also provides a QoS adjusting device of the VF, which comprises:
the first processing module is used for determining the first number of target VFs with the states of the single I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as the first states;
the second processing module is used for adjusting the QoS bandwidth limit values of N target VFs based on the first quantity;
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 invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the QoS adjustment method of the VF according to any one of the above when executing the program.
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 QoS adjustment method for VF as described in any one of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a QoS adjustment method for VF as described in any one of the above.
According to the QoS adjustment method, the QoS adjustment device and the electronic equipment for the VFs, the consistency of QoS bandwidth limit values of the target virtual ports can be maintained by configuring the plurality of target VFs for one target virtual port, the QoS bandwidth limit values of the target VFs are adjusted by detecting the network port states of the plurality of target VFs, the QoS value of each target VF can be flexibly adjusted according to the network card states, and the stability of the bandwidth limit values in network port single-point fault is ensured.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a QoS adjustment method of VF provided in the present invention;
FIG. 2 is a schematic diagram of a virtual machine according to the present invention;
FIG. 3 is a second schematic diagram of a virtual machine according to the present invention;
FIG. 4 is a second flowchart of a QoS adjustment method for VF according to the present invention;
fig. 5 is a schematic structural diagram of a QoS adjusting device for VF provided by the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The QoS adjustment method, apparatus and electronic device for VF of the present invention are described below with reference to FIGS. 1-6.
The QoS adjustment method of the VF in the embodiment of the invention is mainly applied to Virtual Machines (VM). The QoS adjustment method of VF according to the embodiment of the present invention will be described below with a virtual machine as an execution body.
As shown in fig. 1, the QoS adjustment method of the VF in the embodiment of the present invention mainly includes step 110 and step 120.
Step 110, determining that the state of the single root I/O virtualized SR-IOV portal belonging to the N target virtual functions VFs is the first number of target VFs in 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 the virtual machine, and one virtual port corresponds to multiple target VFs, improving VF redundancy. When one target VF in one target virtual port has faults, other VFs can be utilized to replace the faults, so that the reliability of the virtual machine is improved.
OpenStack is an open-source cloud computing management platform project and is a combination of a series of software open-source projects. After the OpenStack introduces the SR-IOV, a VF can be directly associated through the SR-IOV virtual port. In other embodiments, the scheme that one virtual port corresponds to one VF in the prior art may also be compatible.
In some embodiments, the local area network MAC addresses and virtual local area network VLANs of the N target VFs are the same. The MAC addresses and VLAN among N target VFs are the same, so that the problem that security detection needs to be closed during aggregation can be avoided, and the security is improved.
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 and the VLAN of VF2 are the same.
In this case, as shown in fig. 2 and 3, one destination virtual port mounts two destination VFs, and there are a network interface controller (Network Interface Controller, NIC) 1 and NIC2 in a Host bond (mode 4), the link aggregation control protocol LACP (Link Aggregation Control Protocol) is turned on, NIC1 is connected to ETH0 through VF1, and NIC2 is connected to ETH1 through VF 2.
Inside the virtual machine, the Guest bond (virtual machine set bond, mode 2) aggregates ETH0 and ETH1, and closes the 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 fault of the virtual machine is solved, the reliability of the virtual machine is improved, the MAC addresses and VLAN of the plurality of target VFs are the same, a safety trust switch is not required to be started, and the safety is improved.
It can be understood that the SR-IOV portal has two states of up and down. For example, the first state may be an 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 a virtual machine Neutron component, so as to determine the first number of target VFs in the N target VFs, where the network port state of the SR-IOV is the first state.
For example, N is 2. The first state is the up state, and if it is detected that only one of the target VFs is in the up state, the first number is 1.
Step 120, based on the first number, adjusts the quality of service QoS bandwidth limit for the N target VFs.
In this case, the QoS bandwidth limit values of the N target VFs may be automatically reassigned and adjusted according to the QoS bandwidth limit value corresponding to the current target virtual port.
In some embodiments, the first state is an up state, adjusting the QoS bandwidth limit value for the N target VFs based on the first number includes equally distributing the target QoS bandwidth limit value to the target VFs whose first state is the up state, and configuring the QoS bandwidth limit value for the target VF of the N target VFs whose first state is the down state to be 0.
The target QoS bandwidth limit value is the maximum QoS bandwidth limit value of the target virtual port.
For example, the QoS bandwidth limit for the current target virtual port is Q, and the QoS bandwidth limits for the N target VFs may be configured to be Q/N prior to detection.
If the network port states of the SR-IOVs of the N targets VF are respectively detected, and the network port states of the M targets VF obtained through detection are converted from the up state to the down state, the first number is N-M, and M is a positive integer greater than or equal to 1 and smaller than N.
In this case, the neutral-sriov-agent updates the QoS bandwidth limit value of each target VF, and may configure the maximum QoS bandwidth limit value of the N-M target VFs that evenly allocate the target virtual port.
In other words, the QoS bandwidth limit value of N-M target VFs whose portal status is up status is updated to Q/(N-M), and the QoS bandwidth limit value of M target VFs whose portal status is down status is updated to 0.
In this embodiment, when M SR-IOV ports fail, the maximum QoS bandwidth limit value of the N-M target VFs that are evenly allocated to the target virtual port may be dynamically adjusted, and when the failure recovers, the QoS bandwidth limit value of the N target VFs in the normal state may be dynamically adjusted.
As shown in fig. 2, the QoS bandwidth limit value corresponding to the current target virtual port is Q, and N is 2. The first state is the up state and the QoS bandwidth limit value of each target VF is Q/2.
As shown in fig. 3, if it is detected that only one of the target VFs is in the up state, the first number is 1. The QoS bandwidth limit value of the target VF with the up state can be adjusted to Q/1 by Q/2, namely Q. While the QoS bandwidth limit of the target VF whose other state is down may be adjusted to 0 by Q/2.
According to the QoS adjustment method of the VF, provided by the embodiment of the invention, the consistency of QoS bandwidth speed limit values of the target virtual ports can be maintained by configuring a plurality of target VFs for one target virtual port, the QoS bandwidth speed limit values of the target VFs can be adjusted by detecting the network port states of the target VFs, the QoS value of each target VF can be flexibly adjusted according to the network card state, and the stability of the bandwidth speed limit values in network port single-point fault is ensured.
In some embodiments, after adjusting the QoS bandwidth limit of the N target VFs based on the first number, the method further includes redefining, at the target period, the number of target VFs whose state of the SR-IOV portal to which the N target VFs belong is the first state.
It can be understood that the number of the fault network ports and the normal network ports can be continuously and timely determined according to the target period, so that the allocation of the QoS bandwidth limit values of each target VF can be timely adjusted.
And under the condition that the number of the currently determined target VFs is the same as the number of the target VFs determined last time, maintaining the QoS bandwidth 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 last determined target VFs, readjusting QoS bandwidth 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 network port states of the SR-IOVs of the N target VFs are detected respectively, and the detected network 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 portal status of Y target VFs in the M target VFs is restored to the up status, the maximum QoS bandwidth limit value of the target virtual port may be evenly distributed to each target VF whose SR-IOV portal status is in the up status, and the QoS bandwidth limit value of the remaining target VFs is set to 0.
In this case, the QoS bandwidth limit values of (N-M+Y) target VFs whose SR-IOV portal status is up may be set to Q/(N-M+Y), and the QoS bandwidth limit values of (M-Y) target VFs whose SR-IOV portal status is down may be set to 0.
In the embodiment, the SR-IOV network port state of the target VF can be continuously detected, and the QoS bandwidth limit value of each target VF can be timely adjusted when the network port of the new target VF fails, so that the stability of the bandwidth limit value when the network port fails is ensured.
In some embodiments, before determining that the state of the single I/O virtualized SR-IOV portal belonging to the N target virtual functions VF is the first number of target VFs in the first state, the QoS adjustment method of the VF in the embodiment of the present invention further includes: and configuring the QoS bandwidth limit value of the target virtual port as the target QoS bandwidth limit value, and generating a virtual port update event.
In this embodiment, a maximum QoS bandwidth limit value may be configured for a target virtual port by calling an API (Application Program Interface ) of a Neutron-server, and a virtual port update event is generated and sent to the Neutron-sriov-agent.
In the case that the Neutron-sriov-agent receives the update notification of the virtual port update event, the Neutron-sriov-agent evenly distributes the target QoS bandwidth limit to N target VFs. Wherein the first state of the N target VFs is the up state.
In this case, if the maximum QoS bandwidth limit value is Q, the QoS bandwidth limit value of each target VF is configured to be Q/N such that the QoS bandwidth limit value of each target VF of the target virtual port is the same.
In some embodiments, before configuring the QoS bandwidth limit value of the target virtual port to be the target QoS bandwidth limit value, the QoS adjustment method of the VF in the embodiment of the present invention further includes: and receiving input of a user, and determining a QoS bandwidth limit value strategy of the target virtual port.
It will be appreciated that the QoS bandwidth limit policy of the target virtual port may be determined by receiving an operation of a user invoking an API of the neutron-server component through the front-end user interaction interface to create the QoS bandwidth limit policy.
In this case, a specific value of the target QoS bandwidth limit may be determined based on the QoS bandwidth limit policy of the target virtual port.
In this embodiment, the QoS bandwidth limit policy of the target virtual port may be determined in a user-defined manner, so as to determine the QoS bandwidth limit of each target VF conveniently.
As shown in FIG. 4, in some embodiments, after creating a virtual machine with SR-IOV virtual ports, N target VFs may be directly associated at one virtual port.
On this basis, a QoS bandwidth limit value strategy can be created by calling the API of the neutron-server component by a user, and a QoS bandwidth limit value rule, namely a maximum QoS bandwidth limit value, is set in the strategy.
After determining the maximum QoS bandwidth limit value, an API of a Neutron-server can be called to configure the QoS bandwidth limit value strategy for the target virtual port, and a target virtual port update event is sent to the Neutron-sriov-agent.
In the case where the Neutron-sriov-agent receives the update notification of the virtual port update event, the QoS bandwidth limit value of each target VF is updated and configured as Q/N.
And continuously detecting the network port states of the SR-IOVs to which each target VF belongs by the Neutron-sriov-agent according to the target period, and updating the QoS bandwidth speed limit value of each target VF by the Neutron-sriov-agent if the network port states of the M target VFs are converted from up state to down state.
The QoS bandwidth limit value of N-M target VFs with the network port state of SR-IOV being up state is updated to Q/(N-M), and the QoS bandwidth limit value of M target VFs with the network port state of SR-IOV being down state is updated to 0.
In the process of continuing to detect, if the SR-IOV network port state of Y target VFs in the M target VFs is restored to the up state, the Neutron-sriov-agent updates the QoS bandwidth limit value of each target VF.
The QoS bandwidth limit values of (N-M+Y) target VFs whose SR-IOV portal status is up status can be set to Q/(N-M+Y), and the QoS bandwidth limit values of (M-Y) target VFs whose other SR-IOV portal status is down status are set to 0.
In the continuous detection process, if the SR-IOV network port state of the target VF is detected to change, the QoS bandwidth limit value of each target VF is continuously updated, so that the dynamic update of the QoS bandwidth limit value of the target VF is realized.
With reference to fig. 5, the following description will describe a QoS adjustment device of a VF provided by the present invention, and the QoS adjustment device of the VF described below and the QoS adjustment method of the VF described above may be referred to correspondingly to each other.
The QoS adjustment device for a VF in an 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 a first number of target VFs, where a state of a single I/O virtualized SR-IOV portal belonging to the N target virtual functions VFs is a first state;
the second processing module 520 is configured to adjust quality of service 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.
According to the QoS adjustment device for the VF provided by the embodiment of the invention, the consistency of QoS bandwidth speed limit values of the target virtual ports can be maintained by configuring a plurality of target VFs for one target virtual port, the QoS bandwidth speed limit values of each target VF can be adjusted by detecting the network port states of the plurality of target VFs, the QoS value of each target VF can be flexibly adjusted according to the network card state, and the stability of the bandwidth speed limit values in network port single-point fault is ensured.
In some embodiments, the first state is an up state, the second processing module 520 is further configured to evenly distribute the target QoS bandwidth limit value to the target VF whose first state is an up state, and configure the QoS bandwidth limit value of the target VF whose first state is a down state to be 0; the target QoS bandwidth limit is the maximum QoS bandwidth limit for the target virtual port.
In some embodiments, the QoS adjustment device for a VF in the embodiment of the present invention further includes a third processing module, where the third processing module is configured to redetermine, according to a target period, the number of target VFs whose states of SR-IOV interfaces to which the N target VFs belong are first states; and under the condition that the number of the currently determined target VFs is different from the number of the last determined target VFs, readjusting QoS bandwidth limit values of the N target VFs based on the number of the currently determined target VFs.
In some embodiments, the QoS adjustment device for VF in the embodiments of the present invention further includes a fourth processing module, where the fourth processing module is configured to configure a QoS bandwidth limit value of a target virtual port to be a target QoS bandwidth limit value, and generate a virtual port update event; under the condition that an update notification of a virtual port update event is received, the target QoS bandwidth limit value is evenly distributed to N target VFs; wherein the first state of the N target VFs is the up state.
In some embodiments, the QoS adjustment device for a VF in 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 limit policy of a target virtual port; and determining a target QoS bandwidth limit value based on the QoS bandwidth limit value strategy of the target virtual port.
In some embodiments, the MAC address and VLAN of the N destination VFs each employ the MAC address and VLAN of the destination virtual port.
Fig. 6 illustrates a physical schematic diagram of an electronic device, as shown in fig. 6, which may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to perform the QoS adjustment method for the VF, which includes: determining a first number of target VFs with the states of single-root I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as first states; based on the first quantity, adjusting QoS bandwidth limit values of 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.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program 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 a QoS adjustment method for VF provided by the above methods, and the method includes: determining a first number of target VFs with the states of single-root I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as first states; based on the first quantity, adjusting QoS bandwidth limit values of 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, is implemented to perform a QoS adjustment method for VF provided by the above methods, the method comprising: determining a first number of target VFs with the states of single-root I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as first states; based on the first quantity, adjusting QoS bandwidth limit values of 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 apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A QoS adjustment method for a VF, wherein the method is applied to a virtual machine, the method comprising:
determining a first number of target VFs with the states of single-root I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as first states;
based on the first number, adjusting the QoS bandwidth limit values of N target VFs;
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 first state is an up state, and the adjusting the QoS bandwidth limit values of the N target VFs based on the first number includes:
evenly 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 to be 0; the target QoS bandwidth limit value is the maximum QoS bandwidth limit value of the target virtual port.
2. The QoS adjustment method of VF according to claim 1, wherein after said adjusting the quality of service QoS bandwidth limit value of N of said target VFs based on said first number, said method further comprises:
the number of the target VFs, of which the states of the SR-IOV network ports belong to are first states, is redetermined according to the target period;
and under the condition that the number of the target VFs which are currently determined is different from the number of the target VFs which are determined last time, readjusting QoS bandwidth limit values of N target VFs based on the number of the target VFs which are currently determined.
3. The QoS adjustment method of VF according to claim 1, further comprising, before said determining that the state of the single I/O virtualized SR-IOV portal to which the N target virtual functions VF belongs is the first number of target VFs of the first state:
configuring the QoS bandwidth limit value of the target virtual port as the target QoS bandwidth limit value, and generating a virtual port update event;
under the condition that an update notification of the virtual port update event is received, the target QoS bandwidth limit value is evenly distributed to N target VFs;
the first states of the N target VFs are up states.
4. The QoS adjustment method of VF according to claim 3, further comprising, prior to said configuring the QoS bandwidth limit value of the target virtual port to the target QoS bandwidth limit value:
receiving input of a user, and determining a QoS bandwidth limit value strategy of the target virtual port;
and determining the target QoS bandwidth limit value based on the QoS bandwidth limit value strategy of the target virtual port.
5. The QoS adjustment method of a VF according to any one of claims 1-4, wherein the MAC addresses and the VLANs of N target VFs each employ the MAC address and VLAN of the target virtual port.
6. A QoS adjustment device for VF, comprising:
the first processing module is used for determining the first number of target VFs with the states of the single I/O virtualization SR-IOV network interfaces belonging to the N target virtual functions VFs as the first states;
the second processing module is used for adjusting the QoS bandwidth limit values of N target VFs based on the first quantity;
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 first state is an up state, and the adjusting the QoS bandwidth limit values of the N target VFs based on the first number includes:
evenly 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 to be 0; the target QoS bandwidth limit value is the maximum QoS bandwidth limit value of the target virtual port.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the QoS adjustment method of VF as claimed in any one of claims 1 to 5 when the program is executed by the processor.
8. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements a QoS adjustment method of VF according to any one of claims 1 to 5.
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 CN115484212A (en) 2022-12-16
CN115484212B true 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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN114762304A (en) * 2019-11-19 2022-07-15 甲骨文国际公司 System and method for supporting RDMA bandwidth restriction in private architecture in high performance computing environment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8862739B2 (en) * 2011-01-11 2014-10-14 International Business Machines Corporation Allocating resources to virtual functions
JP5871233B2 (en) * 2012-03-22 2016-03-01 株式会社日立製作所 Computer and bandwidth control method
US9459905B2 (en) * 2014-12-16 2016-10-04 International Business Machines Corporation Implementing dynamic SRIOV virtual function resizing
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013161165A (en) * 2012-02-02 2013-08-19 Hitachi Ltd Computer system and method of allocating pcie device
CN103049331A (en) * 2012-12-06 2013-04-17 华中科技大学 Dynamic scheduling method with virtual function
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

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).2019,全文. *
刘权.SR-IOV环境下虚拟机网络带宽动态分配的研究.中国优秀硕士论文电子期刊网.2018,全文. *
李南 ; 封卫兵 ; 张武 ; 彭俊杰 ; .一种基于SR-IOV扩展的VF分配模型.计算机应用与软件.2013,(11),全文. *

Also Published As

Publication number Publication date
CN115484212A (en) 2022-12-16

Similar Documents

Publication Publication Date Title
US9727386B2 (en) Method and apparatus for network resource virtual partitioning
EP3482532B1 (en) Automatic service function validation in a virtual network environment
US20180302326A1 (en) Multiple active l3 gateways for logical networks
US8639783B1 (en) Policy based configuration of interfaces in a virtual machine environment
EP2430802B1 (en) Port grouping for association with virtual interfaces
US11606254B2 (en) Automatic configuring of VLAN and overlay logical switches for container secondary interfaces
US11561817B2 (en) High availability for virtual network functions
US9559968B2 (en) Technique for achieving low latency in data center network environments
KR102516167B1 (en) Method and apparatus for dynamic virtual system on chip
US9083611B2 (en) Method and system for virtual network interface cards (VNICs) over aggregation spanning multiple switches
CN104468568A (en) Virtual machine security isolation method
US20230028837A1 (en) Scaling for split-networking datapath
US11838206B2 (en) Edge node with datapath split between pods
CN109039958B (en) FC port virtualization method and device and FC terminal equipment
CN115484212B (en) QoS adjustment method and device for VF and electronic equipment
CN109032754B (en) Method and apparatus for improving reliability of communication path
US20230231815A1 (en) Multi-tenant resource management in a gateway
CN113127144A (en) Processing method, processing device and storage medium
CN106921553A (en) The method and system of High Availabitity are realized in virtual network
CN111124593A (en) Information processing method and device, network element and storage medium
CN115314380B (en) VF configuration method and device
CN117978758B (en) Adaptation method for data processing unit, computer device and medium
CN117978758A (en) Adaptation method for data processing unit, computer device and medium
CN114064263A (en) Method and system for binding virtual equipment by multiple physical equipment and related equipment
CN115469969A (en) Network card binding method and system of virtual machine

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