Description of problem: errors about boundaries parameter checking of virsh domiftune Version-Release number of selected component (if applicable): libvirt-6.10.0-1.module+el8.4.0+8898+a84e86e1.x86_64 kernel-4.18.0-260.el8.x86_64 How reproducible: 100% Steps to Reproduce: Scenario A: set the guest interface's inbound bandwidth parameters # virsh domiftune vm1 vnet8 --inbound 4294967295 # virsh domiftune vm1 vnet8 inbound.average: 4294967295 inbound.peak : 0 inbound.burst : 0 inbound.floor : 0 outbound.average: 0 outbound.peak : 0 outbound.burst : 0 (The upper boundary of inbound average is 4294967 of libvirt-daemon-6.0.0-10, it is 2^32-1, seems to be no upper limit.) Scenario B: set the guest interface's outbound bandwidth parameters 1. # virsh domiftune vm1 vnet8 --outbound 4294967295 error: Unable to set interface parameters error: internal error: Child process (tc filter add dev vnet8 parent ffff: protocol all u32 match u32 0 0 police rate 4294967295kbps burst 4294967295kb mtu 64kb drop flowid :1) unexpected exit status 255: Error: argument "4294967295kb" is wrong: buffer 2. # virsh domiftune vm1 vnet8 --outbound 4294967295,4294967295,4194303 # virsh domiftune vm1 vnet8 inbound.average: 4294967295 inbound.peak : 0 inbound.burst : 0 inbound.floor : 0 outbound.average: 4294967295 outbound.peak : 4294967295 outbound.burst : 4194303 (For the outbound boundary, it is the same with inbound boundary. However, the logical parameter setting via virsh cmd is not the same with inbound, please refer to Scenario A) Scenario C: Set the outbound/inbound peak parameter outside of boundary # virsh domiftune vm1 vnet8 --outbound 4294967295,4294967296,4194303 error: outbound rate larger than maximum 4294967295 (The error is better to be "error: outbound peak larger than maximum 4294967295" ) Actual results: Check the descriptions in brackets at the end of every Scenario.
Scenario A: set the guest interface's inbound bandwidth parameters (The upper boundary of inbound average is 4294967 of libvirt-daemon-6.0.0-10, now it is 2^32-1, seems to be no upper limit.)
Is it same as Bug 1910745 - [tc-htb] error when setting burst max value? Please check.
(In reply to Fangge Jin from comment #2) > Is it same as Bug 1910745 - [tc-htb] error when setting burst max value? > Please check. Almost the the same, but one point that I am confused is # virsh domiftune vm1 vnet8 --inbound 4294967295 # echo $? 0 for outbound # virsh domiftune vm1 vnet8 --outbound 4294967295 error: Unable to set interface parameters error: internal error: Child process (tc filter add dev vnet8 parent ffff: protocol all u32 match u32 0 0 police rate 4294967295kbps burst 4294967295kb mtu 64kb drop flowid :1) unexpected exit status 255: Error: argument "4294967295kb" is wrong: buffer The logic of setting the bandwidth parameter are not the same between inbound and outbound
(In reply to Lili Zhu from comment #0) > Description of problem: > errors about boundaries parameter checking of virsh domiftune > > Version-Release number of selected component (if applicable): > libvirt-6.10.0-1.module+el8.4.0+8898+a84e86e1.x86_64 > kernel-4.18.0-260.el8.x86_64 > ... > 1. # virsh domiftune vm1 vnet8 --outbound 4294967295 > error: Unable to set interface parameters > error: internal error: Child process (tc filter add dev vnet8 parent ffff: > protocol all u32 match u32 0 0 police rate 4294967295kbps burst 4294967295kb > mtu 64kb drop flowid :1) unexpected exit status 255: Error: argument > "4294967295kb" is wrong: buffer I've seen almost the same error message when setting max values, issue in iproute: BZ1910745 Additional info 4. There it seems tc command isn't handling the max burst values well.
Lili, can you please elaborate why this is a bug? I mean, setting a value that is outside of boundaries should produce an error. Or is it that libvirt could provide better error message?
(In reply to Michal Privoznik from comment #5) > Lili, can you please elaborate why this is a bug? I mean, setting a value > that is outside of boundaries should produce an error. Or is it that libvirt > could provide better error message? Hi, Michal I am just confused about the difference for setting the "average" value. I can only set the average value of inbound via # virsh domiftune vm1 vnet8 --inbound 4294967295 # echo $? 0 But I can not do the same for outbound average value # virsh domiftune vm1 vnet8 --outbound 4294967295 error: Unable to set interface parameters error: internal error: Child process (tc filter add dev vnet8 parent ffff: protocol all u32 match u32 0 0 police rate 4294967295kbps burst 4294967295kb mtu 64kb drop flowid :1) unexpected exit status 255: Error: argument "4294967295kb" is wrong: buffer As the testing result shows, the boundaries for outbound and inbound are exactly the same: # virsh domiftune avocado-vt-vm1 vnet8 inbound.average: 4294967295 inbound.peak : 4294967295 inbound.burst : 4194303 inbound.floor : 0 outbound.average: 4294967295 outbound.peak : 4294967295 outbound.burst : 4194303 I thought outbound and inbound are equivalent, but the values for them can not be set via the same logic.
Patch proposed upstream: https://listman.redhat.com/archives/libvir-list/2021-March/msg00288.html
Merged upstream as: 01e206c3e3 virnetdevbandwidth: Don't generate burst outside of boundaries v7.1.0-144-g01e206c3e3
Verify this bug with: libvirt-7.4.0-1.module+el8.5.0+11218+83343022.x86_64 # virsh domiftune avocado-vt-vm1 vnet4 --outbound 4294967295 # virsh domiftune avocado-vt-vm1 vnet4 inbound.average: 0 inbound.peak : 0 inbound.burst : 0 inbound.floor : 0 outbound.average: 4294967295 outbound.peak : 0 outbound.burst : 0 Now can set the outbound average value alone to the value larger than 4194303, mark the bug as verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684