]> xenbits.xensource.com Git - libvirt.git/commit
virnetdevbandwidth.c: Put a limit to "quantum"
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 24 Apr 2024 14:55:34 +0000 (16:55 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 25 Apr 2024 07:40:15 +0000 (09:40 +0200)
commitac9c3c0b2ce4ce8b2501ec3f2e27fe2bf4dd61f4
tree39f59711d9c22cb66e15f64c9d078f5d8fc9084e
parent948d496d2546807e8c3af634fa982615b2a3153b
virnetdevbandwidth.c: Put a limit to "quantum"

The "quantum" attribute of HTB is documented as:

  Number of bytes to serve from this class before the scheduler
  moves to the next class.

Since v1.3.2-rc1~225 we compute what we think is the appropriate
value and pass it on the TC command line. But kernel and
subsequently TC use uint32_t to store this value. If we compute
value outside of this type then TC fails and prints usage which
we then interpret as an error message. Needlessly long error
message. While there's not much we can do about the latter, we
can put a cap on the value and stop tickling this behavior of TC.

Fixes: 065054daa71f645fc83aff0271f194d326208616
Resolves: https://issues.redhat.com/browse/RHEL-34112
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virnetdevbandwidth.c