Hi all!
I've found that CLI sometimes generate wrong config for RED/WRED qdiscs.
- set traffic-policy priority-queue prio1 default queue-type random-detect don't work: no bandwidth parameter is transferred to tc command:
qdisc add dev eth2 parent 1:2 red limit 73728 min 6144 max 18432 avpkt 1024 burst 10 probability 0.1 bandwidth ecn
- There is typo in formula, used for burst calculation (https://github.com/vyos/vyatta-cfg-qos/blob/current/lib/Vyatta/Qos/RandomDetect.pm#L121):
my $burst = ( 2 * $pred->{qmin} + $pred->{qmax} ) / 3;
need to be changed to:
my $burst = ( 2 * $pred->{qmin} + $pred->{qmax} ) / ( 3 * $pred->{avpkt} );
Also, there is a predefined average size of packet at 1024 bytes. It is not very good idea to fix this variable, especially at this value. In real Internet traffic average packet size is closer to 500 bytes, than to 1000. Better, if this is possible, will be allow to set own value, as traffic can be very different.