Page MenuHomeVyOS Platform

QoS class cannot calculate correctly the default bandwidth auto
Closed, ResolvedPublicBUG

Description

QoS default class cannot get the correct default bandwidth auto (the same with percent 50%)
When bandwidth is not set for the class, it uses the default value auto, but tc class can not calculate it correctly and uses rate rate -1000000
Initial configuration:

set qos interface eth0 egress 'test'
set qos policy shaper test bandwidth '330mbit'
set qos policy shaper test class 23 match 10 ip destination address '192.168.122.11'
set qos policy shaper test default bandwidth '300mbit'
set qos policy shaper test default queue-type 'fair-queue'

optional:

set qos policy shaper test class 23 bandwidth 50%

Debug:

DEBUG/QoS: tc qdisc replace dev eth0 root handle 1: htb r2q 206 default 18
DEBUG/QoS: tc class replace dev eth0 parent 1: classid 1:1 htb rate 330000000

WARNING: Interface speed cannot be determined (assuming 10 Mbit/s)

DEBUG/QoS: tc class replace dev eth0 parent 1:1 classid 1:17 htb rate -1000000 burst 15k quantum 1514
DEBUG/QoS: tc qdisc replace dev eth0 parent 1:17 sfq

{'bandwidth': '330mbit',
 'class': {'23': {'bandwidth': 'auto',
                  'burst': '15k',
                  'codel_quantum': '1514',
                  'flows': '1024',
                  'interval': '100',
                  'match': {'10': {'ip': {'destination': {'address': '192.168.122.11'}}}},
                  'queue_type': 'fq-codel',
                  'target': '5'}},
 'default': {'bandwidth': '300mbit',
             'burst': '15k',
             'codel_quantum': '1514',
             'flows': '1024',
             'interval': '100',
             'priority': '20',
             'queue_type': 'fair-queue',
             'target': '5'}}

Speed

vyos@r14# sudo cat /sys/class/net/eth0/speed 
-1
[edit]
vyos@r14#

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.4-rolling-202306130317
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

If class['bandwidth'] == auto then we should get global bandwidth

Viacheslav changed the task status from Open to In progress.Jun 17 2023, 10:42 AM
Viacheslav claimed this task.
Viacheslav changed the task status from In progress to Needs testing.Jun 17 2023, 7:44 PM
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.