Page MenuHomeVyOS Platform

Traffic-policy (shaper), returns: 'lowdelay unknown DSCP value'
In progress, NormalPublicBUG

Description

eg: applying.....

class 70 {

    bandwidth 4%
    burst 15k
    ceiling 98%
    match lowdelay {
        ip {
            dscp lowdelay
            protocol tcp
        }
    }
    priority 6
    queue-type fair-queue
}

we get: "lowdelay" unknown DSCP value

Details

Version
vyos-1.2.0-rolling+201806020337
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

syncer triaged this task as Normal priority.Jun 10 2018, 2:27 AM
syncer changed the task status from Open to Needs testing.Feb 8 2019, 12:01 AM
syncer reassigned this task from dmbaturin to zsdc.
syncer added a subscriber: dmbaturin.
zsdc changed the task status from Needs testing to Confirmed.Feb 26 2019, 1:57 PM
zsdc reassigned this task from zsdc to dmbaturin.
zsdc subscribed.

Hello!
Bug confirmed in 1.2.0-rolling+201902250337. Current way of checking values accept only that names, which is returned by cat /etc/iproute2/rt_dsfield (source). Currently with kernel 4.19.20-amd64-vyos this is:

# Differentiated field values
# These include the DSCP and unused bits
0x0	default
# Newer RFC2597 values
0x28	AF11
0x30	AF12
0x38	AF13
0x48	AF21
0x50	AF22
0x58	AF23
0x68	AF31
0x70	AF32
0x78	AF33
0x88	AF41
0x90	AF42
0x98	AF43
# Older values RFC2474
0x20	CS1
0x40	CS2
0x60	CS3
0x80	CS4
0xA0	CS5
0xC0	CS6
0xE0	CS7
# RFC 2598
0xB8	EF

Need to change way of checking or remove unavailable values.

Unknown Object (User) subscribed.Jun 10 2020, 8:28 PM

So these values don't work. VyOS 1.3-rolling-202007270117

set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp reliability
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp throughput 
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp lowdelay
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp priority
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp immediate
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp flash
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp flash-override
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp critical
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp internet
set traffic-policy shaper SHAPE class 79 match lowdelay ip dscp network

Let's get rid of them?

Well, does it not work, or was it removed upstream? Can we probably migrate it?

dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).

i retested this issue:
could not reproduce the original problem on versions 1.4 and 1.5

version 1.3.8

set interface ethernet eth1 traffic-policy out 'test'
set traffic-policy shaper test bandwidth '100mbit'
set traffic-policy shaper test class 10 bandwidth '50mbit'
set traffic-policy shaper test default bandwidth '100mbit'
commit
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp default 
[edit]
vyos@vyos# commit
[ traffic-policy shaper test ]
Error: cls_u32: Selector not specified.
We have an error talking to the kernel
Command failed -:7
TC command failed. at /opt/vyatta/sbin/vyatta-qos.pl line 236.
qdisc add dev eth1 root handle 1: htb r2q 63 default b
class add dev eth1 parent 1: classid 1:1 htb rate 100000000
class add dev eth1 parent 1:1 classid 1:b htb rate 100000000 burst 15k
qdisc add dev eth1 parent 1:b fq_codel noecn
class add dev eth1 parent 1:1 classid 1:a htb rate 50000000 burst 15k
qdisc add dev eth1 parent 1:a fq_codel noecn
filter add dev eth1 parent 1: prio 1 protocol all u32 flowid 1:a

[[traffic-policy]] failed
Commit failed

version 1.2.9-S1:

vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp reliability 
  "reliability" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp throughput

  "throughput" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp lowdelay

  "lowdelay" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp priority

  "priority" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp immediate

  "immediate" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp flash

  "flash" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
ides@vyos# set traffic-policy shaper test class 10 match m10 ip dscp flash-overr 

  "flash-override" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp critical

  "critical" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp internet

  "internet" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]
vyos@vyos# set traffic-policy shaper test class 10 match m10 ip dscp network

  "network" unknown DSCP value
  
  Value validation failed
  Set failed

[edit]

Also I found another issue:
When we use a number as dscp this is applied incorrectly in tc, because we apply this number as is without aligning a bit.
e.g
RFC 2597 recommend AF11 = '001010' (10 decimal) but tc used values from iproute2/rt_dsfield where AF11 = '0x28' (40 decimal)

set qos policy shaper test class 10 match m10 ip dscp AF11
commit

# tc -s filter show dev eth1
filter parent 1: protocol all pref 1 u32 chain 0 
filter parent 1: protocol all pref 1 u32 chain 0 fh 800: ht divisor 1 
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:a not_in_hw (rule hit 0 success 0)
  match 00280000/00ff0000 at 0 (success 0 )

but

set qos policy shaper test class 10 match m10 ip dscp 10
commit

# tc -s filter show dev eth1
filter parent 1: protocol all pref 1 u32 chain 0 
filter parent 1: protocol all pref 1 u32 chain 0 fh 800: ht divisor 1 
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:a not_in_hw (rule hit 0 success 0)
  match 000a0000/00ff0000 at 0 (success 0 )

Here we have different filters for named and number values

useful link: https://bytesolutions.com/dscp-tos-cos-precedence-conversion-chart/

HollyGurza changed the task status from Confirmed to In progress.Tue, Jan 14, 1:53 AM
HollyGurza claimed this task.