diff options
author | Christian Poessinger <christian@poessinger.com> | 2023-01-04 17:55:06 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2023-01-04 17:55:48 +0100 |
commit | 5867d21077d605f1246459881addffa72ef538ff (patch) | |
tree | 1712bea1f5ffc897bce2e4cc3e434491ce24ac0d /python/vyos/qos/roundrobin.py | |
parent | ae8935ce62e55ad047b51bebef8a1d9124ed1826 (diff) | |
download | vyos-1x-5867d21077d605f1246459881addffa72ef538ff.tar.gz vyos-1x-5867d21077d605f1246459881addffa72ef538ff.zip |
qos: T4284: replace qdisc/class instead of always adding it
This makes transitions/updates faster and less error prone
Diffstat (limited to 'python/vyos/qos/roundrobin.py')
-rw-r--r-- | python/vyos/qos/roundrobin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/qos/roundrobin.py b/python/vyos/qos/roundrobin.py index 4a0cb18aa..80814ddfb 100644 --- a/python/vyos/qos/roundrobin.py +++ b/python/vyos/qos/roundrobin.py @@ -26,10 +26,10 @@ class RoundRobin(QoSBase): if 'class' in config: for cls in config['class']: cls = int(cls) - tmp = f'tc class add dev {self._interface} parent 1:1 classid 1:{cls:x} drr' + tmp = f'tc class replace dev {self._interface} parent 1:1 classid 1:{cls:x} drr' self._cmd(tmp) - tmp = f'tc qdisc add dev {self._interface} parent 1:{cls:x} pfifo' + tmp = f'tc qdisc replace dev {self._interface} parent 1:{cls:x} pfifo' self._cmd(tmp) if 'default' in config: @@ -37,7 +37,7 @@ class RoundRobin(QoSBase): default_cls_id = int(class_id_max) +1 # class ID via CLI is in range 1-4095, thus 1000 hex = 4096 - tmp = f'tc class add dev {self._interface} parent 1:1 classid 1:{default_cls_id:x} drr' + tmp = f'tc class replace dev {self._interface} parent 1:1 classid 1:{default_cls_id:x} drr' self._cmd(tmp) # call base class |