[SR-IOV] QoS extension doesn't set max-tx-rate and min-tx-rate in the same port
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Rodolfo Alonso |
Bug Description
The SR-IOV agent extension can handle max-BW and min-BW QoS rules, but currently doesn't apply both to the same port at the same time.
The problem is how the Pyroute2 command is used. The "ip link" command allows to set "rate" and "min" rules in two independent commands. E.g.:
$ ip link set dev enp196s0f0 vf 5 rate 30
$ ip l show dev enp196s0f0
vf 5 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, tx rate 30 (Mbps), max_tx_rate 30Mbps
$ ip link set dev enp196s0f0 vf 5 min 20
$ ip l show dev enp196s0f0
vf 5 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, tx rate 30 (Mbps), max_tx_rate 30Mbps, min_tx_rate 20Mbps
The second command setting the min-BW rate doesn't remove the max-BW rate.
However, the Pyroute2 command to set the VF rates requires to set both.
> ip.link('set', 'enp196s0f0', index=idx, {'max_tx_rate': 100, 'min_tx_rate': 20})
If one key is missing, the value will be set to zero (the QoS rule will be removed). E.g.:
> ip.link('set', 'enp196s0f0', index=idx, {'max_tx_rate': 100}) --> this command will set a max-BW of 100Mbps and will remove any min-BW rule already defined.
Changed in neutron: | |
assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master) | #1 |
Changed in neutron: | |
status: | New → In Progress |
Changed in neutron: | |
importance: | Undecided → Medium |
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master) | #2 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit cdff281f642511e
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 3 02:57:07 2022 +0000
[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.
pci = pci_lib.
The "msg" [3] (structure passed to "iproute" library) is this:
https:/
"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]https:/
[2]https:/
[3]https:/
Closes-Bug: #1962844
Change-Id: Ibbb6d938355440
Changed in neutron: | |
status: | In Progress → Fix Released |
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/xena) | #3 |
Fix proposed to branch: stable/xena
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/wallaby) | #4 |
Fix proposed to branch: stable/wallaby
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/victoria) | #5 |
Fix proposed to branch: stable/victoria
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri) | #6 |
Fix proposed to branch: stable/ussuri
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/train) | #7 |
Fix proposed to branch: stable/train
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 20.0.0.0rc1 | #8 |
This issue was fixed in the openstack/neutron 20.0.0.0rc1 release candidate.
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/xena) | #9 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit 0c9e9b27527d5ee
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 3 02:57:07 2022 +0000
[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.
pci = pci_lib.
The "msg" [3] (structure passed to "iproute" library) is this:
https:/
"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]https:/
[2]https:/
[3]https:/
Closes-Bug: #1962844
Change-Id: Ibbb6d938355440
(cherry picked from commit cdff281f642511e
tags: | added: in-stable-xena |
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/wallaby) | #10 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 1cadfc84a565075
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 3 02:57:07 2022 +0000
[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.
pci = pci_lib.
The "msg" [3] (structure passed to "iproute" library) is this:
https:/
"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]https:/
[2]https:/
[3]https:/
Conflicts:
Closes-Bug: #1962844
Change-Id: Ibbb6d938355440
(cherry picked from commit cdff281f642511e
tags: | added: in-stable-wallaby |
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/train) | #11 |
Change abandoned by "Rodolfo Alonso <email address hidden>" on branch: stable/train
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri) | #12 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit 98fe52e15eb7c05
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 3 02:57:07 2022 +0000
[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.
pci = pci_lib.
The "msg" [3] (structure passed to "iproute" library) is this:
https:/
"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]https:/
[2]https:/
[3]https:/
Conflicts:
Closes-Bug: #1962844
Change-Id: Ibbb6d938355440
(cherry picked from commit cdff281f642511e
(cherry picked from commit 1cadfc84a565075
tags: | added: in-stable-ussuri |
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/victoria) | #13 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit 42a9b7cafa96f1b
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Thu Mar 3 02:57:07 2022 +0000
[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.
pci = pci_lib.
The "msg" [3] (structure passed to "iproute" library) is this:
https:/
"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]https:/
[2]https:/
[3]https:/
Conflicts:
Closes-Bug: #1962844
Change-Id: Ibbb6d938355440
(cherry picked from commit cdff281f642511e
(cherry picked from commit 1cadfc84a565075
tags: | added: in-stable-victoria |
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master) | #14 |
Related fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/yoga) | #15 |
Related fix proposed to branch: stable/yoga
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/xena) | #16 |
Related fix proposed to branch: stable/xena
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/wallaby) | #17 |
Related fix proposed to branch: stable/wallaby
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/victoria) | #18 |
Related fix proposed to branch: stable/victoria
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/ussuri) | #19 |
Related fix proposed to branch: stable/ussuri
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master) | #20 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 837fda7566fc8d2
Author: elajkat <email address hidden>
Date: Fri Apr 8 09:29:14 2022 +0200
Change set_device_rate calls according to new signature
[1] changed the signature of set_device_rate to be alligned with how
pyroute2 expects rate parameters, some method which calls
set_device_rate needs to be changed also to use the new dict format for
calling it.
[1]: https:/
Related-Bug: #1962844
Closes-Bug: #1968206
Change-Id: I7256747f45308b
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/yoga) | #21 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit 480bd3f563cbae7
Author: elajkat <email address hidden>
Date: Fri Apr 8 09:29:14 2022 +0200
Change set_device_rate calls according to new signature
[1] changed the signature of set_device_rate to be alligned with how
pyroute2 expects rate parameters, some method which calls
set_device_rate needs to be changed also to use the new dict format for
calling it.
[1]: https:/
Related-Bug: #1962844
Closes-Bug: #1968206
Change-Id: I7256747f45308b
(cherry picked from commit 837fda7566fc8d2
tags: | added: in-stable-yoga |
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/xena) | #22 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit 40c3671339b4ee6
Author: elajkat <email address hidden>
Date: Fri Apr 8 09:29:14 2022 +0200
Change set_device_rate calls according to new signature
[1] changed the signature of set_device_rate to be alligned with how
pyroute2 expects rate parameters, some method which calls
set_device_rate needs to be changed also to use the new dict format for
calling it.
[1]: https:/
Related-Bug: #1962844
Closes-Bug: #1968206
Change-Id: I7256747f45308b
(cherry picked from commit 837fda7566fc8d2
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/wallaby) | #23 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 9a94e2855a05aeb
Author: elajkat <email address hidden>
Date: Fri Apr 8 09:29:14 2022 +0200
Change set_device_rate calls according to new signature
[1] changed the signature of set_device_rate to be alligned with how
pyroute2 expects rate parameters, some method which calls
set_device_rate needs to be changed also to use the new dict format for
calling it.
[1]: https:/
Related-Bug: #1962844
Closes-Bug: #1968206
Change-Id: I7256747f45308b
(cherry picked from commit 837fda7566fc8d2
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/victoria) | #24 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit 7caeebbbc31a928
Author: elajkat <email address hidden>
Date: Fri Apr 8 09:29:14 2022 +0200
Change set_device_rate calls according to new signature
[1] changed the signature of set_device_rate to be alligned with how
pyroute2 expects rate parameters, some method which calls
set_device_rate needs to be changed also to use the new dict format for
calling it.
[1]: https:/
Related-Bug: #1962844
Closes-Bug: #1968206
Change-Id: I7256747f45308b
(cherry picked from commit 837fda7566fc8d2
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/ussuri) | #25 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/ussuri
commit 13bb2554da87671
Author: elajkat <email address hidden>
Date: Fri Apr 8 09:29:14 2022 +0200
Change set_device_rate calls according to new signature
[1] changed the signature of set_device_rate to be alligned with how
pyroute2 expects rate parameters, some method which calls
set_device_rate needs to be changed also to use the new dict format for
calling it.
[1]: https:/
Related-Bug: #1962844
Closes-Bug: #1968206
Change-Id: I7256747f45308b
(cherry picked from commit 837fda7566fc8d2
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 17.4.0 | #26 |
This issue was fixed in the openstack/neutron 17.4.0 release.
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.3.0 | #27 |
This issue was fixed in the openstack/neutron 18.3.0 release.
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 19.2.0 | #28 |
This issue was fixed in the openstack/neutron 19.2.0 release.
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron ussuri-eol | #29 |
This issue was fixed in the openstack/neutron ussuri-eol release.
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/831830
Review: https:/