summaryrefslogtreecommitdiff
path: root/src/systemd/isc-dhcp-relay.service
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-02-07 16:34:27 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-02-07 16:34:27 +0000
commitce1035e1e8642bf740e2a21693a72fe2127b8f72 (patch)
tree87353d1fa2ebb731a832d20b199b2d7f393ef83a /src/systemd/isc-dhcp-relay.service
parent9d74ae52092e97aa0ef285df4d44a5eb7ae93fbf (diff)
downloadvyos-1x-ce1035e1e8642bf740e2a21693a72fe2127b8f72.tar.gz
vyos-1x-ce1035e1e8642bf740e2a21693a72fe2127b8f72.zip
T6021: Fix QoS shaper r2q calculation
The current calculation `r2q` is wrong as it uses `Floor division` but expecting `division` This way `math.ceil` calculate wrong value as we expect round a number upward to its nearest integer For example for speed 710 mbits expected value `444` but we get `443` ``` from math import ceil MAXQUANTUM = 200000 speed = 710000000 speed_bps = int(speed) // 8 >>> speed_bps // MAXQUANTUM 443 >>> speed_bps / MAXQUANTUM 443.75 >>> >>> >>> ceil(speed_bps // MAXQUANTUM) 443 >>> ceil(speed_bps / MAXQUANTUM) 444 >>> ```
Diffstat (limited to 'src/systemd/isc-dhcp-relay.service')
0 files changed, 0 insertions, 0 deletions