Page MenuHomeVyOS Platform

Implement behavior like in VyOS 1.3 for qos random detect policy
Open, LowPublicENHANCEMENT

Description

Qdisc DSMARK was retired on Linux kernel.

Should find a workaround way to implement similar behavior, because when we use a simple GRED from tc - packets are not automatically distributed to virtual queues.

see old implementation here

test:
configure traffic policy on VyOS 1.3

conf
set traffic-policy random-detect tst 
set interfaces ethernet eth0 traffic-policy out tst 
commit

make simple test(from host to VM with vyos on gns3):

sudo nping --udp --dest-ip 192.168.122.13 --dest-port 80 --data-length 1000 -c 10
sudo nping --tcp --dest-ip 192.168.122.13 --dest-port 80 --data-length 1000 -c 10

see tc qdisc statistic:

vyos@vyos# tc -s qdisc show dev eth0
qdisc dsmark 1: root refcnt 2 indices 0x0008 set_tc_index 
 Sent 6524 bytes 22 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc gred 2: parent 1: vqs 8 default 0 grio limit 1514000b 
 vq 0 prio 8 limit 72Kb min 9Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 12 (624b) 
 vq 1 prio 7 limit 72Kb min 10Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 0 (0b) 
 vq 2 prio 6 limit 72Kb min 11Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 0 (0b) 
 vq 3 prio 5 limit 72Kb min 12Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 0 (0b) 
 vq 4 prio 4 limit 72Kb min 13Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 0 (0b) 
 vq 5 prio 3 limit 72Kb min 14Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 0 (0b) 
 vq 6 prio 2 limit 72Kb min 15Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 10 (5900b) 
 vq 7 prio 1 limit 72Kb min 16Kb max 18Kb 
  Queue size: average 0b current 0b 
  Dropped packets: forced 0 early 0 pdrop 0 other 0 
  Marked packets: forced 0 early 0 
  Total packets: 0 (0b) 
 Sent 6524 bytes 22 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0

In this statistic we can see different traffic type in different queues
total 22 pkt in dsmark as root, and 12 pkt in default vq 0 and 10 pkt in vq 6

but in VyOS 1.4 and more I see all packets in the default vq with the same test and config
qos config:

conf
set qos interface eth0 egress tst
set qos policy random-detect tst
commit

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)