OpenStack Networking (Neutron)
Go to file
Rodolfo Alonso Hernandez cdff281f64 [SR-IOV] Fix QoS extension to set min/max values
"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]a9564dff8e/pyroute2.core/pr2modules/netlink/rtnl/ifinfmsg/__init__.py (L712-L717)
[2]c8d9d92544/ip/ipaddress.c (L454-L470)
[3]a9564dff8e/pyroute2.core/pr2modules/iproute/linux.py (L1499)

Closes-Bug: #1962844
Change-Id: Ibbb6d938355440c42850812e368224b76b1fce19
2022-03-04 11:43:08 +00:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
devstack Merge "Remove installation of the ovs from the source in Devstack plugin" 2022-01-19 19:30:16 +00:00
doc Fix typo in the third instruction paragraph of "Controller nodes" block 2022-03-01 21:07:17 +09:00
etc Sync rootwrap.conf from oslo.rootwrap 2022-01-03 09:17:04 +09:00
neutron [SR-IOV] Fix QoS extension to set min/max values 2022-03-04 11:43:08 +00:00
playbooks Add functional and fullstack jobs with FIPS enabled 2021-11-17 13:41:40 +01:00
rally-jobs [ci] Fix several rally task arguments 2020-05-06 14:56:27 +03:00
releasenotes [OVN] Off-path SmartNIC DPU Port Binding with OVN 2022-02-18 07:17:36 +01:00
roles Make configure_for_func_testing compatible with e.g. Centos 2022-01-17 12:32:04 +01:00
tools [ OVN ][Migration] Reload systemctl daemon after removal 2022-03-02 12:35:42 +01:00
vagrant/ovn Fix local neutron folder path in ovn/sparse/Vagrantfile 2020-11-03 17:02:34 +01:00
zuul.d Merge "Switch to cirros uec image in ovn tempest jobs" 2022-03-01 18:19:26 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Add etc/neutron/*.sample files to be ignored by git 2019-12-12 12:38:24 +01:00
.gitreview OpenDev Migration Patch 2019-04-19 19:38:27 +00:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Remove "six" library 2020-07-28 16:55:52 +00:00
.stestr.conf Fix post gate hook to accommodate for new os-testr 2017-09-12 14:20:12 -06:00
CONTRIBUTING.rst [Community goal] Add contributor and PTL guide 2020-03-03 04:43:26 +01:00
HACKING.rst Follow up for replacing assertItemsEqual 2021-06-03 16:04:07 +00:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
README.rst Start README.rst with a better title 2019-11-19 17:42:57 +01:00
TESTING.rst Fix links for Source code references 2021-12-02 20:12:34 +05:30
bindep.txt Add functional and fullstack jobs with FIPS enabled 2021-11-17 13:41:40 +01:00
lower-constraints.txt Bump python-neutronclient version to 7.8.0 2022-02-23 08:55:49 +08:00
plugin.spec Add OVN migration OSP 16.2 option 2021-01-24 17:18:55 +02:00
requirements.txt Bump python-neutronclient version to 7.8.0 2022-02-23 08:55:49 +08:00
setup.cfg Merge "Updating python testing as per Yoga testing runtime" 2022-02-15 13:54:32 +00:00
setup.py Updated from global requirements 2017-03-04 11:19:58 +00:00
test-requirements.txt Follow-up: Move linters dependencies to tox.ini 2021-01-07 04:26:07 +09:00
tox.ini Use TOX_CONSTRAINTS_FILE 2021-12-24 10:44:01 +08:00

README.rst

OpenStack Neutron

image

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:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute, please read the CONTRIBUTING.rst file.