cdff281f64
"ip link" commands allow to define VF rates independently. That means, first "rate" (max BW) can be set and in a second command "min" (min BW) (check LP bug description). However Pyroute2 command to set the VF rates requires to set both. If one value is missing ("min_tx_rate", "max_tx_rate"), the library sets this value to 0; in other words, the value is deleted. The Pyroute2 structures are built depending on the parameter names. In this case, {'vf': {'rate': ...}} will create a "vf_rate" [1] nla structure, that requires "min_tx_rate" and "max_tx_rate". This is part of the full structure passed to the "iproute" library [2]. This is an example of code that only sets the "max_tx_rate" for the 15th VF of "enp196s0f0": $ from neutron.plugins.ml2.drivers.mech_sriov.agent import pci_lib pci = pci_lib.PciDeviceIPWrapper("enp196s0f0") pci.set_vf_rate(15, {'max_tx_rate': 10}) The "msg" [3] (structure passed to "iproute" library) is this: https://paste.opendev.org/show/b2FZBOebGOCHMrYhPr6X/. The "min_tx_rate" is set to the default value 0. This patch reads first the existing rates ("min_tx_rate", "max_tx_rate") and populates the command parameters accordingly. [1] |
||
---|---|---|
api-ref | ||
devstack | ||
doc | ||
etc | ||
neutron | ||
playbooks | ||
rally-jobs | ||
releasenotes | ||
roles | ||
tools | ||
vagrant/ovn | ||
zuul.d | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.pylintrc | ||
.stestr.conf | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
README.rst | ||
TESTING.rst | ||
bindep.txt | ||
lower-constraints.txt | ||
plugin.spec | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
OpenStack Neutron
Neutron is an OpenStack project to provide "network connectivity as a service" between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova).
To learn more about neutron:
- Documentation: https://docs.openstack.org/neutron/latest/
- Features: https://specs.openstack.org/openstack/neutron-specs
- Defects: https://launchpad.net/neutron
- Release notes: https://docs.openstack.org/releasenotes/neutron/index.html
- Source: https://opendev.org/openstack/neutron
Get in touch via email. Use [Neutron] in your subject.
To learn how to contribute, please read the CONTRIBUTING.rst file.