diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-10-22 19:53:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 19:53:34 +0300 |
commit | 9af3a9e64456174e053d855ebe6683b06d8313ee (patch) | |
tree | 230ccb5148b9a78c34edc74e9f1c039f2cde4ef4 /python | |
parent | de02d7815be4c28f1e98e486c2c7c54e934db335 (diff) | |
parent | 5218241e6293317f8837b3f7c3893d653d960993 (diff) | |
download | vyos-1x-9af3a9e64456174e053d855ebe6683b06d8313ee.tar.gz vyos-1x-9af3a9e64456174e053d855ebe6683b06d8313ee.zip |
Merge pull request #2391 from sever-sever/T5299
T5299: Add missed option ceiling for QoS shaper
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/qos/trafficshaper.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/vyos/qos/trafficshaper.py b/python/vyos/qos/trafficshaper.py index c63c7cf39..0d5f9a8a1 100644 --- a/python/vyos/qos/trafficshaper.py +++ b/python/vyos/qos/trafficshaper.py @@ -1,4 +1,4 @@ -# Copyright 2022 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright 2022-2023 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -89,6 +89,10 @@ class TrafficShaper(QoSBase): if 'priority' in cls_config: priority = cls_config['priority'] tmp += f' prio {priority}' + + if 'ceiling' in cls_config: + f_ceil = self._rate_convert(cls_config['ceiling']) + tmp += f' ceil {f_ceil}' self._cmd(tmp) tmp = f'tc qdisc replace dev {self._interface} parent {self._parent:x}:{cls:x} sfq' @@ -102,6 +106,9 @@ class TrafficShaper(QoSBase): if 'priority' in config['default']: priority = config['default']['priority'] tmp += f' prio {priority}' + if 'ceiling' in config['default']: + f_ceil = self._rate_convert(config['default']['ceiling']) + tmp += f' ceil {f_ceil}' self._cmd(tmp) tmp = f'tc qdisc replace dev {self._interface} parent {self._parent:x}:{default_minor_id:x} sfq' |