summaryrefslogtreecommitdiff
path: root/python/vyos/qos/base.py
diff options
context:
space:
mode:
authorkhramshinr <khramshinr@gmail.com>2024-05-02 17:45:57 +0600
committerkhramshinr <khramshinr@gmail.com>2024-05-02 17:47:04 +0600
commit0b54c1bc411a21833ec573031cf5ad98fe709a2f (patch)
treeed027047f4fbc5b70d05ea0e698006ab655ef341 /python/vyos/qos/base.py
parentf97a3254c9e958f76b3ff3dfec7e9297cf48575c (diff)
downloadvyos-1x-0b54c1bc411a21833ec573031cf5ad98fe709a2f.tar.gz
vyos-1x-0b54c1bc411a21833ec573031cf5ad98fe709a2f.zip
qos: T6225: Fix qos random-detect policy
Fix default values for random-detect Remove dsmakr qdisc from gred cofig because dsmark was deleted from kernel
Diffstat (limited to 'python/vyos/qos/base.py')
-rw-r--r--python/vyos/qos/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/vyos/qos/base.py b/python/vyos/qos/base.py
index 4173a1a43..87927ba9d 100644
--- a/python/vyos/qos/base.py
+++ b/python/vyos/qos/base.py
@@ -90,13 +90,14 @@ class QoSBase:
else:
return value
- def _calc_random_detect_queue_params(self, avg_pkt, max_thr, limit=None, min_thr=None, mark_probability=None):
+ def _calc_random_detect_queue_params(self, avg_pkt, max_thr, limit=None, min_thr=None,
+ mark_probability=None, precedence=0):
params = dict()
avg_pkt = int(avg_pkt)
max_thr = int(max_thr)
mark_probability = int(mark_probability)
limit = int(limit) if limit else 4 * max_thr
- min_thr = int(min_thr) if min_thr else (9 * max_thr) // 18
+ min_thr = int(min_thr) if min_thr else ((9 + precedence) * max_thr) // 18
params['avg_pkt'] = avg_pkt
params['limit'] = limit * avg_pkt